|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.om.ObjectKey | +--org.apache.turbine.om.SimpleKey | +--org.apache.turbine.om.NumberKey
This class can be used as an ObjectKey to uniquely identify an object within an application where the id consists of a single entity such a GUID or the value of a db row's primary key.
Fields inherited from class org.apache.turbine.om.ObjectKey |
key |
Constructor Summary | |
NumberKey()
Creates a NumberKey whose internal representation will be set later, through a set method |
|
NumberKey(java.math.BigDecimal key)
Creates a NumberKey equivalent to key . |
|
NumberKey(int key)
Creates a NumberKey equivalent to key . |
|
NumberKey(long key)
Creates a NumberKey equivalent to key . |
|
NumberKey(NumberKey key)
Creates a NumberKey equivalent to key . |
|
NumberKey(java.lang.String key)
Creates a NumberKey equivalent to key . |
Method Summary | |
boolean |
equals(java.lang.Object keyObj)
keyObj is equal to this NumberKey if keyObj is a NumberKey or String that contains the same information this key contains. |
java.math.BigDecimal |
getBigDecimal()
Access the underlying BigDecimal object. |
void |
setValue(java.math.BigDecimal key)
Sets the underlying object |
void |
setValue(NumberKey key)
Sets the internal representation to the same object used by key. |
void |
setValue(java.lang.String key)
Sets the internal representation using a String representation of a number |
java.lang.String |
toString()
Invokes the toString() method on the object. |
Methods inherited from class org.apache.turbine.om.ObjectKey |
appendTo, compareTo, getValue, hashCode |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public NumberKey()
public NumberKey(java.lang.String key)
key
.public NumberKey(java.math.BigDecimal key)
key
.public NumberKey(NumberKey key)
key
.public NumberKey(long key)
key
.public NumberKey(int key)
key
.
Convenience only. Not very efficient at all.Method Detail |
public void setValue(java.lang.String key) throws java.lang.NumberFormatException
setValue
in class ObjectKey
org.apache.turbine.om.ObjectKey
s
- a String
valueTurbineException
- if an error occurspublic void setValue(java.math.BigDecimal key)
public void setValue(NumberKey key)
public java.math.BigDecimal getBigDecimal()
BigDecimal
valuepublic boolean equals(java.lang.Object keyObj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |