|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.dbobj.ValidValue
A valid value is a enumerated collection very similar to a pure Struts label and value bean. It typically represent an item of data that is displayed in a drop-down list box or a menu selection. A valid value has a real value as known as a key and description.
To support internationalisation (i18n) the look at the subclassISOValidValue.
This class also contains two very useful static inner classes
ValueComparator and
DescriptionComparator, which are useful for supporting
Java collection objects that contain ValidValue types.
ISOValidValue,
Serialized Form| Nested Class Summary | |
static class |
ValidValue.DescriptionComparator
A simple comparator for comparing the description
attribute of ValidValue records. |
static class |
ValidValue.ValueComparator
A simple comparator for comparing the value
attribute of ValidValue records. |
| Field Summary | |
protected String |
description
|
protected String |
value
|
| Constructor Summary | |
ValidValue()
Default constructor for creating a valid value. |
|
ValidValue(String newValue,
String newDescrip)
Original constructor for creating a valid value. |
|
| Method Summary | |
protected Object |
clone()
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
String |
getDescription()
Gets the description of the valid value |
String |
getKey()
Gets the real value of the valid value as a cache key |
String |
getValue()
Gets the real value of the valid value |
int |
hashCode()
Hashcode since we store by key |
void |
setDescription(String newDescription)
Sets the real description of the valid value |
void |
setValue(String newValue)
Sets the real value of the valid value |
String |
toString()
Human readable string for debugging |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected String value
protected String description
| Constructor Detail |
public ValidValue()
public ValidValue(String newValue,
String newDescrip)
newValue - the real value of the enumerationnewDescrip - the description of the enumeration| Method Detail |
public String getValue()
setValue(java.lang.String)public void setValue(String newValue)
newValue - the new value stringgetValue()public String getKey()
getKey in interface CacheablegetValue()public int hashCode()
public String getDescription()
public void setDescription(String newDescription)
newDescription - the new description stringgetDescription()public String toString()
protected Object clone()
throws CloneNotSupportedException
CloneNotSupportedException - if the object's class does not
support the Cloneable interface. Subclasses that
override the clone method can also throw this
exception to indicate that an instance cannot be cloned.public boolean equals(Object obj)
obj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||