© 2005 BEA Systems, Inc.

com.beasys.commerce.foundation
Class SmartKey

java.lang.Object
  extended bycom.beasys.commerce.foundation.SmartKey
All Implemented Interfaces:
Comparable, Serializable
Direct Known Subclasses:
com.beasys.commerce.axiom.contact.ContactPk, OrderPk, PaymentTransactionPk, ShippingMethodPk

public abstract class SmartKey
extends Object
implements Comparable, 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(Object o)
          Compares a given object with this SmartKey.
 boolean equals(Object o)
          Indicates whether some other Object is equivalent to this SmartKey.
 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(Object o)
Compares a given object with this SmartKey.

Specified by:
compareTo in interface 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(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.

toString

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

Returns:
A String representation of the SmartKey.

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved