|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jlf.dataMap.DataAttribute
This class is used as the base of all attributes in the data mapping framework
DataAttributeDescriptor
,
Serialized FormField Summary | |
protected boolean |
hasChanged
Keeps track of whether the attribute has changed since it was originally read in from the database. |
protected java.lang.String |
name
Name of the attribute. |
protected java.lang.Object |
originalValue
Original value of the attribute. |
protected java.lang.Object |
value
Normal value of the attribute. |
Constructor Summary | |
DataAttribute()
Default constructor. |
|
DataAttribute(java.lang.String name)
Normal attribute constructor. |
Method Summary | |
protected void |
basicSetValue(java.lang.Object newValue)
Sets the value variable. |
double |
getDoubleValue()
Returns the double value of the attribute if the attribute has one. |
long |
getLongValue()
Returns the long value of the attribute if the attribute has one. |
java.lang.String |
getName()
Returns the name of the attribute. |
java.lang.Object |
getOriginalValue()
Returns the original value of the attribute. |
java.lang.String |
getStringValue()
Returns the current value of the attribute as a string. |
java.lang.Object |
getValue()
Returns the current value of the attribute. |
boolean |
hasChanged()
Checks to see if the value of the attribute has changed since it was originally read in from a data source. |
DataAttribute |
resetAndSetValue(java.lang.Object newValue)
Resets/sets the attribute on an initial read from a data source. |
void |
resetHasChanged()
Sets the original value to the value, resets the has changed variable. |
void |
setName(java.lang.String name)
Sets the name of the attribute. |
void |
setValue(java.lang.Object newValue)
Sets the value of the attribute, retaining an originalValue. |
java.lang.String |
toString()
Dispatch this method back to getValue()'s object if not null, otherwise return empty string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String name
protected java.lang.Object value
protected java.lang.Object originalValue
protected boolean hasChanged
Constructor Detail |
public DataAttribute()
public DataAttribute(java.lang.String name)
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.Object getValue()
public java.lang.Object getOriginalValue()
protected void basicSetValue(java.lang.Object newValue)
public void setValue(java.lang.Object newValue)
public DataAttribute resetAndSetValue(java.lang.Object newValue)
public void resetHasChanged()
public boolean hasChanged()
public java.lang.String getStringValue()
public long getLongValue()
DataMapError
- if the attribute
cannot be safely converted to a long or
if the attribute is null.public double getDoubleValue()
DataMapError
- if the attribute
cannot be safely converted to a double or
if the attribute is null.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |