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 Details

    • resolveAssociation

      @Nullable default org.jmolecules.ddd.types.Association<T,ID> resolveAssociation()
      Resolves the underlying URI into an Association, potentially applying the configured identifier extractor.
      Returns:
      can be null.
      See Also:
    • resolveRequiredAssociation

      default org.jmolecules.ddd.types.Association<T,ID> resolveRequiredAssociation()
      Resolves the underlying URI into an Association, 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 new AggregateReference resolving the identifier source value from the given UriComponents.
      Specified by:
      withIdSource in interface AggregateReference<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.