org.bsf.listOfValues.lovValue
Interface LovValue

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
DefaultLovValue

public interface LovValue
extends java.io.Serializable

Any Object that implements this interface can be handled as a LovValue. A LovValue contains Objects associated to field names (ie. properties).

Note that we call ListOfValues a List of LovValue (where those LovValue can be any Object implementing this interface).

A LovValue with three fields (Long, String, String) like (OID, SHORT_NAME, LONG_NAME) would look like: (0,"None","Not defined") or (1,"FR","France") or (2,"UK","United Kingdom") whereas a ListOfValues for the COUNTRIES (in our example) would be the List of all those LovValue: {(0,"None","Not defined"),(1,"FR","France"),(2,"UK","United Kingdom")}

See Also:
LovBean, LovServiceBean

Method Summary
 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()
          Deprecated.  
 java.lang.Object getPK()
           
 

Method Detail

getOid

public java.lang.Long getOid()
Deprecated.  

This method is deprecated since the 2.1 release. The PK of a LovValue is to be defined like any other field (but in first position, cf. LovBean) and can be of any type. Should still work with LovValues whose first field are a Long to ease the transition to the new way of handling the LovValue. Still, if defined in database, the LOV will have to be modified to include the definition of the first field.

Returns:
the OID of the LovValue. For a given ListOfValue (a List of LovValues) a test on the OID should be enough to consider the LovValue as equal).

getPK

public java.lang.Object getPK()
Returns:
the pk of the LovValue. For a given ListOfValue (a List of LovValues) a test on the pk should be enough to consider the LovValue as equal). The first defined field is considered to be the PK.

getFieldValue

public 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.

Parameters:
p_fieldName - The field whose value is disired.
Returns:
The Object for the given field name in the LovValue, null if no matching field is found. The matching should be case insensitive.