public class LinkCollectingAssociationHandler extends Object implements org.springframework.data.mapping.SimpleAssociationHandler
SimpleAssociationHandler
that will collect Link
s for all linkable associations.Constructor and Description |
---|
LinkCollectingAssociationHandler(org.springframework.data.mapping.context.PersistentEntities entities,
Path path,
Associations associations)
Creates a new
LinkCollectingAssociationHandler for the given PersistentEntities , Path and
Associations . |
Modifier and Type | Method and Description |
---|---|
void |
doWithAssociation(org.springframework.data.mapping.Association<? extends org.springframework.data.mapping.PersistentProperty<?>> association) |
List<org.springframework.hateoas.Link> |
getLinks()
Returns the links collected after the
Association has been traversed. |
LinkCollectingAssociationHandler |
nested() |
public LinkCollectingAssociationHandler(org.springframework.data.mapping.context.PersistentEntities entities, Path path, Associations associations)
LinkCollectingAssociationHandler
for the given PersistentEntities
, Path
and
Associations
.entities
- must not be null.path
- must not be null.associations
- must not be null.public LinkCollectingAssociationHandler nested()
public List<org.springframework.hateoas.Link> getLinks()
Association
has been traversed.public void doWithAssociation(org.springframework.data.mapping.Association<? extends org.springframework.data.mapping.PersistentProperty<?>> association)
doWithAssociation
in interface org.springframework.data.mapping.SimpleAssociationHandler
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.