|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This class represents a single field of data that is stored within the data object. It will provide basic manipulations such as it's original value, and attribute holdings.
| Method Summary | |
BigDecimal |
asBigDecimal()
Retrieve the wrapped object as a BigDecimal object or zero if we're unable
to convert it. |
Boolean |
asBoolean()
Retrieve the boolean object value. |
Date |
asDate()
Retrieve the wrapped object as a Date object or possibly null if we
can't convert it or the object is null. |
Double |
asDouble()
Retrieve the wrapped object as a Double object or zero if we
can't convert i |
Integer |
asInteger()
Retrieves the wrapped object as an Integer or zero if it's an invalid format. |
InputStream |
asStream()
Allows for retrieval of BLOB database types. |
String |
asString()
Retrieves the wrapped object as a String |
void |
cacheIsChangedComparison()
call after add() or update(). |
void |
checkValue()
Make sure the value of the field is valid. |
Map |
getAllAttributes()
Returns a Read Only Map of all attributes in name-value pairs. |
Object |
getAttribute(String attributeName)
Retrieves any user defined attributes for this field. |
DataFieldMetaData |
getFieldMetaData()
Returns a handle to the Field MetaData object. |
Object |
getOriginalValue()
Deprecated. 8/04 v.5.5 do not expose this cache Retrieve the last original value if the data has changed. Will return null if isChanged() is false |
DataObject |
getOwner()
Returns a handle to the DataObject that is the container for this Data Field |
Object |
getValue()
Retrieves the wrapped object for the Data Field |
boolean |
isChanged()
Used for change logging. |
boolean |
isNull()
Returns true if the object is null. |
boolean |
isValueSet()
Used for change logging. |
void |
resetChanged()
Resets the changed flag and sets the original value field to null |
void |
setAttribute(String attributeName,
Object value)
Sets an attribute for this particular instance of the Data field |
void |
setFieldMetaData(DataFieldMetaData newMetadata)
Sets the metadata object for this field. |
void |
setOwner(DataObject newOwner)
Sets the owner of a given DataObject |
void |
setValue(Object newValue)
Sets the wrapped object for the data field |
| Method Detail |
public Object getValue()
public String asString()
public Boolean asBoolean()
public Integer asInteger()
Integer or zero if it's an invalid format.
public Date asDate()
Date object or possibly null if we
can't convert it or the object is null.
Date Object if we're able to convert it.public BigDecimal asBigDecimal()
BigDecimal object or zero if we're unable
to convert it.
BigDecimal Object if we're able to convert it.public Double asDouble()
Double object or zero if we
can't convert i
Double Object if we're able to convert it.public Object getOriginalValue()
public InputStream asStream()
public boolean isChanged()
public boolean isValueSet()
public void checkValue()
throws DataException
DataException - if the field value is not validpublic void resetChanged()
public void setValue(Object newValue)
newValue - a new Object to set the value topublic boolean isNull()
public void setAttribute(String attributeName,
Object value)
attributeName - the name of the attribute to setvalue - the value to set it topublic Object getAttribute(String attributeName)
attributeName - the name of the attribute to retrieve
public Map getAllAttributes()
Map of all attributes in name-value pairs. If there are no
attributes then getAllAttributes will return a null map.
public DataObject getOwner()
public void setOwner(DataObject newOwner)
newOwner - The new parent object.public DataFieldMetaData getFieldMetaData()
public void setFieldMetaData(DataFieldMetaData newMetadata)
newMetadata - the new Field Meta data object... for example DBFieldpublic void cacheIsChangedComparison()
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||