© 2002 BEA Systems, Inc.


com.beasys.commerce.foundation
Class SmartKey

java.lang.Object
  |
  +--com.beasys.commerce.foundation.SmartKey
Direct Known Subclasses:
com.beasys.commerce.axiom.contact.ContactPk, OrderPk, PaymentTransactionPk, ShippingMethodPk

public abstract class SmartKey
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

For each Entity there must be a primary key class derived from SmartKey. Implementing SmartKey requires that the classes be serializable and comparable.

See Also:
Entity, Serialized Form

Constructor Summary
SmartKey()
          Default constructor.
 
Method Summary
abstract  int compareTo(java.lang.Object o)
          Compares a given object with this SmartKey.
 boolean equals(java.lang.Object o)
          Indicates whether some other Object is equivalent to this SmartKey.
 java.lang.String toString()
          Returns a String representation of the SmartKey.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmartKey

public SmartKey()
Default constructor.
Method Detail

compareTo

public abstract int compareTo(java.lang.Object o)
Compares a given object with this SmartKey.
Specified by:
compareTo in interface java.lang.Comparable

Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClastCastException - if the specified object's type prevents it from being compared with this SmartKey.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other Object is equivalent to this SmartKey.

Parameters:
o - the Object to be compared.
Returns:
true if the supplied Object is equivalent, false otherwise.
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns a String representation of the SmartKey.

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

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved