Class Associations
java.lang.Object
org.springframework.data.rest.webmvc.mapping.Associations
A value object to for
Link
s representing associations.- Since:
- 2.1
- Author:
- Oliver Gierke, Greg Turnquist, Haroun Pacquee
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<org.springframework.hateoas.Link>
getLinksFor
(org.springframework.data.mapping.Association<? extends org.springframework.data.mapping.PersistentProperty<?>> association, Path path) Returns the links to render for the givenAssociation
.getMetadataFor
(Class<?> type) Returns theResourceMetadata
for the given type.boolean
isIdExposed
(org.springframework.data.mapping.PersistentEntity<?, ?> entity) boolean
isLinkableAssociation
(org.springframework.data.mapping.Association<? extends org.springframework.data.mapping.PersistentProperty<?>> association) Returns whether the givenAssociation
is linkable.boolean
isLinkableAssociation
(org.springframework.data.mapping.PersistentProperty<?> property) Returns whether the given property is an association that is linkable.boolean
isLookupType
(org.springframework.data.mapping.PersistentProperty<?> property) Returns whether the type of the givenPersistentProperty
is configured as lookup type.
-
Constructor Details
-
Associations
-
-
Method Details
-
getMappings
-
getLinksFor
public List<org.springframework.hateoas.Link> getLinksFor(org.springframework.data.mapping.Association<? extends org.springframework.data.mapping.PersistentProperty<?>> association, Path path) Returns the links to render for the givenAssociation
.- Parameters:
association
- must not be null.path
- must not be null.- Returns:
-
getMetadataFor
Returns theResourceMetadata
for the given type.- Parameters:
type
- must not be null.- Returns:
-
isLookupType
public boolean isLookupType(org.springframework.data.mapping.PersistentProperty<?> property) Returns whether the type of the givenPersistentProperty
is configured as lookup type.- Parameters:
property
- must not be null.- Returns:
-
isIdExposed
public boolean isIdExposed(org.springframework.data.mapping.PersistentEntity<?, ?> entity) -
isLinkableAssociation
public boolean isLinkableAssociation(org.springframework.data.mapping.Association<? extends org.springframework.data.mapping.PersistentProperty<?>> association) Returns whether the givenAssociation
is linkable.- Parameters:
association
- must not be null.- Returns:
-
isLinkableAssociation
public boolean isLinkableAssociation(org.springframework.data.mapping.PersistentProperty<?> property) Returns whether the given property is an association that is linkable.- Parameters:
property
- must not be null.- Returns:
-