public class UserPropertyDefn extends HashStructureAdapter
Given an offline database object, say 'dbOb', the following code will return the user property values.
DynamicPropertySet userPropValues = (DynamicPropertySet)dbOb.getProperty(UserPropertyDefn.DATA_KEY);The properties are name/value pairs.
Example:
DynamicPropertySet userPropValues = (DynamicPropertySet)dbOb.getProperty(UserPropertyDefn.DATA_KEY); Map dbObjProps = userPropValues.getProperties(); for(String propName : dbObjectProps.keySet()) { String propValue = (String)dbObjectProps.get(propName); }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA_KEY |
_hash
Modifier and Type | Method and Description |
---|---|
void |
addToList(ListStructure list) |
java.lang.String |
getDefaultValue()
User Property Default Value.
|
java.lang.String |
getDefaultValue(OfflineDBObjectProvider pro,
DBObject dbObj) |
java.lang.String |
getDescription()
User Property Description.
|
java.lang.String |
getDisplayName()
User Property Display Name.
|
java.lang.String[] |
getListOfValueMeanings()
User Property List Of Value meanings.
|
java.lang.String[] |
getListOfValues()
User Property List Of Values.
|
java.lang.String |
getName()
User Property Name.
|
java.lang.String |
getObjectType()
User Property Object Type.
|
int |
getOrdinal()
User Property Ordinal Value.
|
static java.lang.Object |
getValue(OfflineDBObjectProvider prov,
DBObject dbObject,
java.lang.String udpName)
Return the User Defined Property Value.
|
boolean |
isListOfValuesButtonUI()
Deprecated.
|
boolean |
isListOfValuesMultiselect() |
boolean |
isMandatory()
User Property Mandatory.
|
boolean |
isMultilineText() |
void |
setDefaultValue(java.lang.String defaultValue) |
void |
setDescription(java.lang.String description) |
void |
setDisplayName(java.lang.String name) |
void |
setListOfValueMeanings(java.lang.String[] lovMeanings)
User Property Set List of Value meanings.
|
void |
setListOfValues(java.lang.String[] lovs)
User Property Set List of Values.
|
void |
setListOfValuesButtonUI(boolean useButtons)
Deprecated.
|
void |
setListOfValuesMultiselect(boolean multiselect) |
void |
setMandatory(boolean mandatory) |
void |
setMultilineText(boolean multiline) |
void |
setName(java.lang.String name) |
void |
setObjectType(java.lang.String type) |
void |
setOrdinal(int ordinal) |
static UserPropertyDefn |
useHash(HashStructure hash) |
addStructureChangeListener, containsKey, copyTo, copyToImpl, equals, equalsImpl, findOrCreate, forcedCopyTo, getHashStructure, removeStructureChangeListener, useObjectEquals
public static final java.lang.String DATA_KEY
public static UserPropertyDefn useHash(HashStructure hash)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getObjectType()
public void setObjectType(java.lang.String type)
public java.lang.String getDisplayName()
public void setDisplayName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public boolean isMandatory()
public void setMandatory(boolean mandatory)
public java.lang.String getDefaultValue()
public java.lang.String getDefaultValue(OfflineDBObjectProvider pro, DBObject dbObj)
public void setDefaultValue(java.lang.String defaultValue)
public java.lang.String[] getListOfValues()
public void setListOfValues(java.lang.String[] lovs)
lovs
- public java.lang.String[] getListOfValueMeanings()
public void setListOfValueMeanings(java.lang.String[] lovMeanings)
lovMeanings
- public void addToList(ListStructure list)
public static java.lang.Object getValue(OfflineDBObjectProvider prov, DBObject dbObject, java.lang.String udpName)
Get a user defined property value for a DBObject, given the provider, the object and the property name.
If the DBObject has a user defined property, return the value.
Otherwise,
get the user property Libraries from the provider,
search the libraries for a definiton of the property,
return the default value.
public int getOrdinal()
Used to indicate the display order of the user properties. Returns -1 to indicate that there is no display order. That is, the library was created before display order was implemented.
public void setOrdinal(int ordinal)
public boolean isMultilineText()
public void setMultilineText(boolean multiline)
public boolean isListOfValuesMultiselect()
public void setListOfValuesMultiselect(boolean multiselect)
@Deprecated public boolean isListOfValuesButtonUI()
@Deprecated public void setListOfValuesButtonUI(boolean useButtons)