org.bsf.listOfValues.lovValue
Class DefaultLovValue
java.lang.Object
org.bsf.listOfValues.lovValue.DefaultLovValue
- All Implemented Interfaces:
- LovValue, java.io.Serializable
- public class DefaultLovValue
- extends java.lang.Object
- implements LovValue
A default implementation of the LovValue interface. It represents a row of
a list of values.
- See Also:
LovValue
,
Serialized Form
Method Summary |
void |
addField(java.lang.String p_fieldName,
java.lang.Object p_fieldValue)
It will replace any previous value with the same field name. |
boolean |
equals(java.lang.Object p_lovValue)
|
java.lang.Object |
getFieldValue(java.lang.String p_fieldName)
This method enable the access to the values stored in this LovValue for
the given field name. |
java.lang.Long |
getOid()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FIELD_SEPARATOR
public static final java.lang.String FIELD_SEPARATOR
- See Also:
- Constant Field Values
_oid
protected java.lang.Long _oid
_fields
protected java.util.HashMap _fields
DefaultLovValue
public DefaultLovValue(java.lang.Long p_oid)
toString
public java.lang.String toString()
- Returns:
- a String representation of this LovValue, displaying the
LovValue OID then each field.
ex:
12, SHORT_NAME=FR, LONG_NAME=FRANCE, REGION=EUROPE, HEMISPHERE=NORTH HEMISPHERE
13, SHORT_NAME=UK, LONG_NAME=UNITED KINGDOM, REGION=EUROPE, HEMISPHERE=NORTH HEMISPHERE
getFieldValue
public java.lang.Object getFieldValue(java.lang.String p_fieldName)
- Description copied from interface:
LovValue
- This method enable the access to the values stored in this LovValue for
the given field name.
- Specified by:
getFieldValue
in interface LovValue
- Parameters:
p_fieldName
- The name of the field for which the value is desired.
- Returns:
- the value associated with the given field name or null if no
match is found.
getOid
public java.lang.Long getOid()
- Specified by:
getOid
in interface LovValue
- Returns:
- The oid of this particular LovValue.
addField
public void addField(java.lang.String p_fieldName,
java.lang.Object p_fieldValue)
- It will replace any previous value with the same field name.
- Parameters:
p_fieldName
- The field name identifying the given value.p_fieldValue
- The value to be stored for the given field name.
equals
public boolean equals(java.lang.Object p_lovValue)
- Parameters:
p_lovValue
- The other LovValue to test against. The check is done
on the Class of the other LovValue (needs to be a DefaultLovValue to be
considered equal), the OID and on the fields (map comparison).
- Returns:
- true if two LovValyue are equals, false otherwise.