se.citerus.dddsample.domain.model.voyage
Class Voyage

java.lang.Object
  extended by se.citerus.dddsample.domain.model.voyage.Voyage
All Implemented Interfaces:
Entity<Voyage>

public class Voyage
extends java.lang.Object
implements Entity<Voyage>

A Voyage.


Nested Class Summary
static class Voyage.Builder
          Builder pattern is used for incremental construction of a Voyage aggregate.
 
Field Summary
static Voyage NONE
           
 
Constructor Summary
Voyage(VoyageNumber voyageNumber, Schedule schedule)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean sameIdentityAs(Voyage other)
          Entities compare by identity, not by attributes.
 Schedule schedule()
           
 java.lang.String toString()
           
 VoyageNumber voyageNumber()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final Voyage NONE
Constructor Detail

Voyage

public Voyage(VoyageNumber voyageNumber,
              Schedule schedule)
Method Detail

voyageNumber

public VoyageNumber voyageNumber()
Returns:
Voyage number.

schedule

public Schedule schedule()
Returns:
Schedule.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

sameIdentityAs

public boolean sameIdentityAs(Voyage other)
Description copied from interface: Entity
Entities compare by identity, not by attributes.

Specified by:
sameIdentityAs in interface Entity<Voyage>
Parameters:
other - The other entity.
Returns:
true if the identities are the same, regardles of other attributes.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.