pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.shop.checkout
Class DispatchType

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.component.shop.checkout.DispatchType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DispatchType>

@Entity(name="checkout_DispatchType")
public class DispatchType
extends AbstractBasicEntity
implements java.lang.Comparable<DispatchType>

The DispatchType.

Version:
$Revision$
Author:
Christian Schatt
See Also:
Serialized Form

Constructor Summary
protected DispatchType()
          Deprecated. 
  DispatchType(DispatchType dt)
          The copy constructor.
  DispatchType(java.lang.String n, java.lang.String idc)
          Creates a new DispatchType from the given name and id code.
  DispatchType(java.lang.String n, java.lang.String idc, Price p)
          Creates a new DispatchType from the given name, id code and Price.
 
Method Summary
 int compareTo(DispatchType dt)
          Compares this DispatchType with the given DispatchType for order.
 boolean equals(java.lang.Object o)
          Determines whether the given Object is equal to this DispatchType.
 java.lang.String getIdCode()
          Returns the id code.
 java.lang.String getName()
          Returns the name.
 Price getPrice()
          Returns the Price.
 int hashCode()
          Returns the hash code for this DispatchType.
 java.lang.String toString()
          Returns the String representation of this DispatchType.
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, getFullQualifiedClassNameJAXB, getId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DispatchType

@Deprecated
protected DispatchType()
Deprecated. 

The no-argument constructor.


DispatchType

public DispatchType(DispatchType dt)
The copy constructor.

Parameters:
dt - the DispatchType to be copied.
Throws:
java.lang.IllegalArgumentException - if the given DispatchType is null.

DispatchType

public DispatchType(java.lang.String n,
                    java.lang.String idc)
Creates a new DispatchType from the given name and id code.

Parameters:
n - the name.
idc - the id code.
Throws:
java.lang.IllegalArgumentException - if the given name or id code is null.

DispatchType

public DispatchType(java.lang.String n,
                    java.lang.String idc, Price p)
Creates a new DispatchType from the given name, id code and Price.

Parameters:
n - the name.
idc - the id code.
p - the Price.
Throws:
java.lang.IllegalArgumentException - if the given name or id code is null.
Method Detail

getName

public final java.lang.String getName()
Returns the name.

Returns:
the name.

getIdCode

public final java.lang.String getIdCode()
Returns the id code.

Returns:
the id code.

getPrice

public final Price getPrice()
Returns the Price.

Returns:
the Price.

compareTo

public int compareTo(DispatchType dt)
Compares this DispatchType with the given DispatchType for order.

Specified by:
compareTo in interface java.lang.Comparable<DispatchType>
Parameters:
dt - the DispatchType to be compared.
Returns:
a negative integer, zero, or a positive integer as this DispatchType is less than, equal to, or greater than the given DispatchType.
Throws:
java.lang.IllegalArgumentException - if the given DispatchType is null.

toString

public java.lang.String toString()
Returns the String representation of this DispatchType.

Overrides:
toString in class java.lang.Object
Returns:
the String representation.

equals

public boolean equals(java.lang.Object o)
Determines whether the given Object is equal to this DispatchType. Two DispatchTypes are considered equal, if their names, id codes and Prices are equal.

Overrides:
equals in class AbstractBasicEntity
Parameters:
o - the Object.
Returns:
true, if the given Object is equal to this DispatchType.

hashCode

public int hashCode()
Returns the hash code for this DispatchType.

Overrides:
hashCode in class AbstractBasicEntity
Returns:
the hash code.
See Also:
AbstractBasicEntity.hashCode()