|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.dataobjects.jdbc.JoinedDataField
Data Field that is aware of local/forein key relations. If you set the local key, it will set the foreign key as well. This i
| Constructor Summary | |
protected |
JoinedDataField()
Protected constructor. |
| 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 when add() or update() has occurred, and currentValue of data fields should be considered 'original value' for purposes of determining 'isChanged' |
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. |
static JoinedDataField |
getInstance(JoinedDataObject owner,
DataObject localObj,
String localField,
DataObject remoteObj,
String foreignField)
Construct a new JoinedDataField object |
Object |
getOriginalValue()
Deprecated. 8/04 v.5.5 do not expose this cache |
DataObject |
getOwner()
Returns a handle to the DataObject that is the container for this Data Field |
Object |
getValue()
Retrieve the value of the object. |
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected JoinedDataField()
| Method Detail |
public static JoinedDataField getInstance(JoinedDataObject owner,
DataObject localObj,
String localField,
DataObject remoteObj,
String foreignField)
owner - the creating data objectlocalObj - the 'Left' DataObjectlocalField - the 'Left' join fieldremoteObj - the 'Right' DataObjectforeignField - the 'Right' join field.
public Object getValue()
getValue in interface DataFieldpublic String asString()
DataField
asString in interface DataFieldpublic Boolean asBoolean()
DataField
asBoolean in interface DataFieldpublic Integer asInteger()
DataFieldInteger or zero if it's an invalid format.
asInteger in interface DataFieldpublic Date asDate()
DataFieldDate object or possibly null if we
can't convert it or the object is null.
asDate in interface DataFieldDate Object if we're able to convert it.public BigDecimal asBigDecimal()
DataFieldBigDecimal object or zero if we're unable
to convert it.
asBigDecimal in interface DataFieldBigDecimal Object if we're able to convert it.public Double asDouble()
DataFieldDouble object or zero if we
can't convert i
asDouble in interface DataFieldDouble Object if we're able to convert it.public Object getOriginalValue()
getOriginalValue in interface DataFieldpublic InputStream asStream()
DataField
asStream in interface DataFieldpublic boolean isChanged()
DataField
isChanged in interface DataFieldpublic boolean isValueSet()
DataField
isValueSet in interface DataField
public void checkValue()
throws DataException
DataField
checkValue in interface DataFieldDataException - if the field value is not validpublic void resetChanged()
DataField
resetChanged in interface DataFieldpublic void setValue(Object newValue)
DataField
setValue in interface DataFieldnewValue - a new Object to set the value topublic boolean isNull()
DataField
isNull in interface DataField
public void setAttribute(String attributeName,
Object value)
DataField
setAttribute in interface DataFieldattributeName - the name of the attribute to setvalue - the value to set it topublic Object getAttribute(String attributeName)
DataField
getAttribute in interface DataFieldattributeName - the name of the attribute to retrieve
public Map getAllAttributes()
DataFieldMap of all attributes in name-value pairs. If there are no
attributes then getAllAttributes will return a null map.
getAllAttributes in interface DataFieldpublic DataObject getOwner()
DataField
getOwner in interface DataFieldpublic void setOwner(DataObject newOwner)
DataField
setOwner in interface DataFieldnewOwner - The new parent object.public DataFieldMetaData getFieldMetaData()
DataField
getFieldMetaData in interface DataFieldpublic void setFieldMetaData(DataFieldMetaData newMetadata)
DataField
setFieldMetaData in interface DataFieldnewMetadata - the new Field Meta data object... for example DBFieldpublic void cacheIsChangedComparison()
cacheIsChangedComparison in interface DataField
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||