public class Associations extends Object
Links representing associations.| Constructor and Description |
|---|
Associations(@NonNull ResourceMappings mappings,
@NonNull RepositoryRestConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
List<org.springframework.hateoas.Link> |
getLinksFor(Association<? extends PersistentProperty<?>> association,
Path path)
Returns the links to render for the given
Association. |
@NonNull ResourceMappings |
getMappings() |
ResourceMetadata |
getMetadataFor(Class<?> type)
Returns the
ResourceMetadata for the given type. |
boolean |
isIdExposed(PersistentEntity<?,?> entity) |
boolean |
isLinkableAssociation(Association<? extends PersistentProperty<?>> association)
Returns whether the given
Association is linkable. |
boolean |
isLinkableAssociation(PersistentProperty<?> property)
Returns whether the given property is an association that is linkable.
|
boolean |
isLookupType(PersistentProperty<?> property)
Returns whether the type of the given
PersistentProperty is configured as lookup type. |
public Associations(@NonNull
@NonNull ResourceMappings mappings,
@NonNull
@NonNull RepositoryRestConfiguration config)
public List<org.springframework.hateoas.Link> getLinksFor(Association<? extends PersistentProperty<?>> association, Path path)
Association.association - must not be null.path - must not be null.public ResourceMetadata getMetadataFor(Class<?> type)
ResourceMetadata for the given type.type - must not be null.public boolean isLookupType(PersistentProperty<?> property)
PersistentProperty is configured as lookup type.property - must not be null.public boolean isIdExposed(PersistentEntity<?,?> entity)
public boolean isLinkableAssociation(Association<? extends PersistentProperty<?>> association)
Association is linkable.association - must not be null.public boolean isLinkableAssociation(PersistentProperty<?> property)
property - must not be null.@NonNull public @NonNull ResourceMappings getMappings()
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.