se.citerus.dddsample.domain.model.handling
Enum HandlingEvent.Type

java.lang.Object
  extended by java.lang.Enum<HandlingEvent.Type>
      extended by se.citerus.dddsample.domain.model.handling.HandlingEvent.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<HandlingEvent.Type>, ValueObject<HandlingEvent.Type>
Enclosing class:
HandlingEvent

public static enum HandlingEvent.Type
extends java.lang.Enum<HandlingEvent.Type>
implements ValueObject<HandlingEvent.Type>

Handling event type. Either requires or prohibits a carrier movement association, it's never optional.


Enum Constant Summary
CLAIM
           
CUSTOMS
           
LOAD
           
RECEIVE
           
UNLOAD
           
 
Method Summary
 boolean prohibitsVoyage()
           
 boolean requiresVoyage()
           
 boolean sameValueAs(HandlingEvent.Type other)
          Value objects compare by the values of their attributes, they don't have an identity.
static HandlingEvent.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static HandlingEvent.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LOAD

public static final HandlingEvent.Type LOAD

UNLOAD

public static final HandlingEvent.Type UNLOAD

RECEIVE

public static final HandlingEvent.Type RECEIVE

CLAIM

public static final HandlingEvent.Type CLAIM

CUSTOMS

public static final HandlingEvent.Type CUSTOMS
Method Detail

values

public static HandlingEvent.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HandlingEvent.Type c : HandlingEvent.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HandlingEvent.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

requiresVoyage

public boolean requiresVoyage()
Returns:
True if a voyage association is required for this event type.

prohibitsVoyage

public boolean prohibitsVoyage()
Returns:
True if a voyage association is prohibited for this event type.

sameValueAs

public boolean sameValueAs(HandlingEvent.Type other)
Description copied from interface: ValueObject
Value objects compare by the values of their attributes, they don't have an identity.

Specified by:
sameValueAs in interface ValueObject<HandlingEvent.Type>
Parameters:
other - The other value object.
Returns:
true if the given value object's and this value object's attributes are the same.


Copyright © 2009. All Rights Reserved.