Package org.jmolecules.ddd.types
Class SimpleAssociation<T extends AggregateRoot<T,ID>,ID extends Identifier>
java.lang.Object
org.jmolecules.ddd.types.SimpleAssociation<T,ID>
- All Implemented Interfaces:
Association<T,
,ID> Identifiable<ID>
class SimpleAssociation<T extends AggregateRoot<T,ID>,ID extends Identifier>
extends Object
implements Association<T,ID>
Simple implementation of
Association
to effectively only define equals(Object)
and
hashCode()
on Association
's static factory methods.- Since:
- 1.2
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleAssociation
(Supplier<ID> identifier) Creates a newSimpleAssociation
for the given identifier. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jmolecules.ddd.types.Association
pointsTo, pointsTo, pointsToSameAggregateAs
-
Field Details
-
identifier
-
-
Constructor Details
-
SimpleAssociation
Creates a newSimpleAssociation
for the given identifier.- Parameters:
identifier
- must not be null.
-
-
Method Details
-
getId
Description copied from interface:Identifiable
Returns the identifier.- Specified by:
getId
in interfaceIdentifiable<T extends AggregateRoot<T,
ID>> - Returns:
-
toString
-
equals
-
hashCode
public int hashCode()
-