Class Associations

java.lang.Object
org.springframework.data.rest.webmvc.mapping.Associations

public class Associations extends Object
A value object to for Links representing associations.
Since:
2.1
Author:
Oliver Gierke, Greg Turnquist, Haroun Pacquee
  • Constructor Details

  • Method Details

    • getMappings

      public ResourceMappings getMappings()
    • getLinksFor

      public List<org.springframework.hateoas.Link> getLinksFor(Association<? extends PersistentProperty<?>> association, Path path)
      Returns the links to render for the given Association.
      Parameters:
      association - must not be null.
      path - must not be null.
      Returns:
    • getMetadataFor

      public ResourceMetadata getMetadataFor(Class<?> type)
      Returns the ResourceMetadata for the given type.
      Parameters:
      type - must not be null.
      Returns:
    • isLookupType

      public boolean isLookupType(PersistentProperty<?> property)
      Returns whether the type of the given PersistentProperty is configured as lookup type.
      Parameters:
      property - must not be null.
      Returns:
    • isIdExposed

      public boolean isIdExposed(PersistentEntity<?,?> entity)
    • isLinkableAssociation

      public boolean isLinkableAssociation(Association<? extends PersistentProperty<?>> association)
      Returns whether the given Association is linkable.
      Parameters:
      association - must not be null.
      Returns:
    • isLinkableAssociation

      public boolean isLinkableAssociation(PersistentProperty<?> property)
      Returns whether the given property is an association that is linkable.
      Parameters:
      property - must not be null.
      Returns: