Interface AssociationAggregateReference<T extends org.jmolecules.ddd.types.AggregateRoot<T,ID>,ID extends org.jmolecules.ddd.types.Identifier>
- All Superinterfaces:
AggregateReference<T,
ID>
public interface AssociationAggregateReference<T extends org.jmolecules.ddd.types.AggregateRoot<T,ID>,ID extends org.jmolecules.ddd.types.Identifier>
extends AggregateReference<T,ID>
An
AggregateReference
that can also resolve into jMolecules Association
instances.- Since:
- 4.1
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionResolves the underlying URI into anAssociation
, potentially applying the configured identifier extractor.Resolves the underlying URI into anAssociation
, potentially applying the configured identifier extractor.withIdSource
(Function<UriComponents, Object> extractor) Creates a newAggregateReference
resolving the identifier source value from the givenUriComponents
.Methods inherited from interface org.springframework.data.rest.core.AggregateReference
getUri, resolveAggregate, resolveId, resolveRequiredAggregate, resolveRequiredId
-
Method Details
-
resolveAssociation
Resolves the underlying URI into anAssociation
, potentially applying the configured identifier extractor.- Returns:
- can be null.
- See Also:
-
resolveRequiredAssociation
Resolves the underlying URI into anAssociation
, potentially applying the configured identifier extractor.- Returns:
- will never be null.
- Throws:
IllegalStateException
- in case the value resolved is null.
-
withIdSource
Description copied from interface:AggregateReference
Creates a newAggregateReference
resolving the identifier source value from the givenUriComponents
.- Specified by:
withIdSource
in interfaceAggregateReference<T extends org.jmolecules.ddd.types.AggregateRoot<T,
ID>, ID extends org.jmolecules.ddd.types.Identifier> - Parameters:
extractor
- must not be null.- Returns:
- will never be null.
-