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 PaymentMethod

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

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

The PaymentMethod.

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

Constructor Summary
protected PaymentMethod()
          Deprecated. 
  PaymentMethod(PaymentMethod pm)
          The copy constructor.
  PaymentMethod(java.lang.String n, java.lang.String idc)
          Creates a new PaymentMethod from the given name and id code.
  PaymentMethod(java.lang.String n, java.lang.String idc, Price p)
          Creates a new PaymentMethod from the given name, id code and Price.
 
Method Summary
 int compareTo(PaymentMethod pm)
          Compares this PaymentMethod with the given PaymentMethod for order.
 boolean equals(java.lang.Object o)
          Determines whether the given Object is equal to this PaymentMethod.
 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 PaymentMethod.
 java.lang.String toString()
          Returns the String representation of this PaymentMethod.
 
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

PaymentMethod

@Deprecated
protected PaymentMethod()
Deprecated. 

The no-argument constructor.


PaymentMethod

public PaymentMethod(PaymentMethod pm)
The copy constructor.

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

PaymentMethod

public PaymentMethod(java.lang.String n,
                     java.lang.String idc)
Creates a new PaymentMethod 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.

PaymentMethod

public PaymentMethod(java.lang.String n,
                     java.lang.String idc, Price p)
Creates a new PaymentMethod 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(PaymentMethod pm)
Compares this PaymentMethod with the given PaymentMethod for order.

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

toString

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

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 PaymentMethod. Two PaymentMethods 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 PaymentMethod.

hashCode

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

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