OrderPk Class
- public class OrderPk
extends SmartKey
implements Serializable
This is a PrimaryKey for managing the life cycle of the Order entity.
It is derived from SmartKey which requires that the classes be serializable and comparable.
-
Hierarchy
-
Object
SmartKey
OrderPk
-
All Implemented Interfaces
-
Comparable, Serializable
-
OrderPk()
- Default constructor.
|
-
OrderPk(
String identifier)
- Constructs a primary key with the specified identifier.
|
identifier
public String identifier
- Identifier. Represents the primary key.
OrderPk
public OrderPk()
- Default constructor.
OrderPk
public OrderPk(String identifier)
- Constructs a primary key with the specified identifier.
compareTo(Object) Method
public int compareTo(Object o)
Implements the compareTo method.
The following conditions hold true:
(a > b) ==> (b < a)
(a < b) ==> (b > a)
(a = b) ==> (b = a)
-
Overrides
-
SmartKey.compareTo(Object)
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.
getIdentifier() Method
public String getIdentifier()
Returns the identifier
Returns
- identifier
hashCode() Method
public int hashCode()
Overrides the hashCode() method
-
Overrides
-
Object.hashCode()
toString() Method
public String toString()
Returns the stringified version of the key class.
-
Overrides
-
SmartKey.toString()
Returns
- Stringified version of the primary key