Schnittstelle Association<T extends AggregateRoot<T,ID>,ID extends Identifier>
- Alle Superschnittstellen:
Identifiable<ID>
public interface Association<T extends AggregateRoot<T,ID>,ID extends Identifier>
extends Identifiable<ID>
An association to an
AggregateRoot.- Autor:
- Christian Stettler, Henning Schwentner, Stephan Pirnbaum, Martin Schimak, John Sullivan, Oliver Drotbohm
- Siehe auch:
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <T extends AggregateRoot<T,ID>, ID extends Identifier>
Association<T, ID> forAggregate(T aggregate) static <T extends AggregateRoot<T,ID>, ID extends Identifier>
Association<T, ID> forId(ID identifier) Creates anAssociationpointing to the givenIdentifier.default booleandefault booleanReturns whether the currentAssociationpoints to the givenAggregateRoot.default booleanpointsToSameAggregateAs(Association<?, ID> other) Returns whether the currentAssociationpoints to the sameAggregateRootas the given one.Von Schnittstelle geerbte Methoden org.jmolecules.ddd.types.Identifiable
getId
-
Methodendetails
-
forAggregate
static <T extends AggregateRoot<T,ID>, Association<T,ID extends Identifier> ID> forAggregate(T aggregate) - Typparameter:
T- the concreteAggregateRoottype.ID- the concreteIdentifiertype.- Parameter:
aggregate- must not be null.- Gibt zurück:
- an
Associationpointing to theIdentifierof the givenAggregateRoot, will never be null. - Seit:
- 1.2
-
forId
static <T extends AggregateRoot<T,ID>, Association<T,ID extends Identifier> ID> forId(ID identifier) Creates anAssociationpointing to the givenIdentifier.- Typparameter:
T- the concreteAggregateRoottype.ID- the concreteIdentifiertype.- Parameter:
identifier- must not be null.- Gibt zurück:
- an
Associationpointing to the givenIdentifier, will never be null. - Seit:
- 1.2
-
pointsToSameAggregateAs
Returns whether the currentAssociationpoints to the sameAggregateRootas the given one. UnlikeandUngültige Referenz
#equals(Object)that also check for type equality of theUngültige Referenz
#hashCode()Associationitself, this only compares the targetIdentifierinstances.- Parameter:
other- must not be null.- Gibt zurück:
- whether the current
Associationpoints to the sameAggregateRootas the given one. - Seit:
- 1.2
-
pointsTo
Returns whether the currentAssociationpoints to theAggregateRootwith the givenIdentifier. UnlikeandUngültige Referenz
#equals(Object)that also check for type equality of theUngültige Referenz
#hashCode()Associationitself, this only compares the targetIdentifierinstances.- Parameter:
identifier-- Gibt zurück:
- whether the current
Associationpoints to theAggregateRootwith the givenIdentifier. - Seit:
- 1.4
-
pointsTo
Returns whether the currentAssociationpoints to the givenAggregateRoot. UnlikeandUngültige Referenz
#equals(Object)that also check for type equality of theUngültige Referenz
#hashCode()Associationitself, this only compares the targetIdentifierinstances.- Parameter:
aggregate- must not be null.- Gibt zurück:
- whether the current
Associationpoints to the givenAggregateRoot. - Seit:
- 1.4
-