|
|||||||||
| Home >> All >> com >> jcorporate >> expresso >> core >> dataobjects >> [ jdbc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.jcorporate.expresso.core.dataobjects.jdbc
Class JoinedDataField

java.lang.Objectcom.jcorporate.expresso.core.dataobjects.jdbc.JoinedDataField
- All Implemented Interfaces:
- com.jcorporate.expresso.core.dataobjects.DataField
- public class JoinedDataField
- extends java.lang.Object
- implements com.jcorporate.expresso.core.dataobjects.DataField
- extends java.lang.Object
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
| Field Summary | |
private java.lang.String |
foreignField
instance to the foreign field |
private com.jcorporate.expresso.core.dataobjects.DataObject |
foreignObj
Instance to the foreign data object |
private java.lang.String |
localField
Intance to the local field name |
private com.jcorporate.expresso.core.dataobjects.DataObject |
localObj
Instance to the local data object |
private static org.apache.log4j.Logger |
log
|
private JoinedDataObject |
myOwner
Instance to the owner data object |
| Constructor Summary | |
protected |
JoinedDataField()
Protected constructor. |
| Method Summary | |
java.math.BigDecimal |
asBigDecimal()
Retrieve the wrapped object as a BigDecimal object or zero if we're unable
to convert it. |
java.lang.Boolean |
asBoolean()
Retrieve the boolean object value. |
java.util.Date |
asDate()
Retrieve the wrapped object as a Date object or possibly null if we
can't convert it or the object is null. |
java.lang.Double |
asDouble()
Retrieve the wrapped object as a Double object or zero if we
can't convert i |
java.lang.Integer |
asInteger()
Retrieves the wrapped object as an Integer or zero if it's an invalid format. |
java.io.InputStream |
asStream()
Allows for retrieval of BLOB database types. |
java.lang.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. |
java.util.Map |
getAllAttributes()
Returns a Read Only Map of all attributes in name-value pairs. |
java.lang.Object |
getAttribute(java.lang.String attributeName)
Retrieves any user defined attributes for this field. |
com.jcorporate.expresso.core.dataobjects.DataFieldMetaData |
getFieldMetaData()
Returns a handle to the Field MetaData object. |
static JoinedDataField |
getInstance(JoinedDataObject owner,
com.jcorporate.expresso.core.dataobjects.DataObject localObj,
java.lang.String localField,
com.jcorporate.expresso.core.dataobjects.DataObject remoteObj,
java.lang.String foreignField)
Construct a new JoinedDataField object |
java.lang.Object |
getOriginalValue()
Deprecated. 8/04 v.5.5 do not expose this cache |
com.jcorporate.expresso.core.dataobjects.DataObject |
getOwner()
Returns a handle to the DataObject that is the container for this Data Field |
java.lang.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(java.lang.String attributeName,
java.lang.Object value)
Sets an attribute for this particular instance of the Data field |
void |
setFieldMetaData(com.jcorporate.expresso.core.dataobjects.DataFieldMetaData newMetadata)
Sets the metadata object for this field. |
void |
setOwner(com.jcorporate.expresso.core.dataobjects.DataObject newOwner)
Sets the owner of a given DataObject |
void |
setValue(java.lang.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 |
| Field Detail |
log
private static final org.apache.log4j.Logger log
myOwner
private JoinedDataObject myOwner
- Instance to the owner data object
localObj
private com.jcorporate.expresso.core.dataobjects.DataObject localObj
- Instance to the local data object
localField
private java.lang.String localField
- Intance to the local field name
foreignObj
private com.jcorporate.expresso.core.dataobjects.DataObject foreignObj
- Instance to the foreign data object
foreignField
private java.lang.String foreignField
- instance to the foreign field
| Constructor Detail |
JoinedDataField
protected JoinedDataField()
- Protected constructor. Do not use normally.
| Method Detail |
getInstance
public static JoinedDataField getInstance(JoinedDataObject owner, com.jcorporate.expresso.core.dataobjects.DataObject localObj, java.lang.String localField, com.jcorporate.expresso.core.dataobjects.DataObject remoteObj, java.lang.String foreignField)
- Construct a new JoinedDataField object
getValue
public java.lang.Object getValue()
- Retrieve the value of the object. It is the same with the local key AND
the foreign key.
- Specified by:
getValuein interfacecom.jcorporate.expresso.core.dataobjects.DataField
asString
public java.lang.String asString()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Retrieves the wrapped object as a String
- Specified by:
asStringin interfacecom.jcorporate.expresso.core.dataobjects.DataField
asBoolean
public java.lang.Boolean asBoolean()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Retrieve the boolean object value.
- Specified by:
asBooleanin interfacecom.jcorporate.expresso.core.dataobjects.DataField
asInteger
public java.lang.Integer asInteger()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Retrieves the wrapped object as an
Integeror zero if it's an invalid format.- Specified by:
asIntegerin interfacecom.jcorporate.expresso.core.dataobjects.DataField
asDate
public java.util.Date asDate()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Retrieve the wrapped object as a
Dateobject or possibly null if we can't convert it or the object is null.- Specified by:
asDatein interfacecom.jcorporate.expresso.core.dataobjects.DataField
asBigDecimal
public java.math.BigDecimal asBigDecimal()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Retrieve the wrapped object as a
BigDecimalobject or zero if we're unable to convert it.- Specified by:
asBigDecimalin interfacecom.jcorporate.expresso.core.dataobjects.DataField
asDouble
public java.lang.Double asDouble()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Retrieve the wrapped object as a
Doubleobject or zero if we can't convert i- Specified by:
asDoublein interfacecom.jcorporate.expresso.core.dataobjects.DataField
getOriginalValue
public java.lang.Object getOriginalValue()
- Deprecated. 8/04 v.5.5 do not expose this cache
- Specified by:
getOriginalValuein interfacecom.jcorporate.expresso.core.dataobjects.DataField
asStream
public java.io.InputStream asStream()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Allows for retrieval of BLOB database types.
- Specified by:
asStreamin interfacecom.jcorporate.expresso.core.dataobjects.DataField
isChanged
public boolean isChanged()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Used for change logging.
- Specified by:
isChangedin interfacecom.jcorporate.expresso.core.dataobjects.DataField
isValueSet
public boolean isValueSet()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Used for change logging.
- Specified by:
isValueSetin interfacecom.jcorporate.expresso.core.dataobjects.DataField
checkValue
public void checkValue()
throws com.jcorporate.expresso.core.dataobjects.DataException
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Make sure the value of the field is valid.
- Specified by:
checkValuein interfacecom.jcorporate.expresso.core.dataobjects.DataField
resetChanged
public void resetChanged()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Resets the changed flag and sets the original value field to null
- Specified by:
resetChangedin interfacecom.jcorporate.expresso.core.dataobjects.DataField
setValue
public void setValue(java.lang.Object newValue)
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Sets the wrapped object for the data field
- Specified by:
setValuein interfacecom.jcorporate.expresso.core.dataobjects.DataField
isNull
public boolean isNull()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Returns true if the object is null.
- Specified by:
isNullin interfacecom.jcorporate.expresso.core.dataobjects.DataField
setAttribute
public void setAttribute(java.lang.String attributeName, java.lang.Object value)
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Sets an attribute for this particular instance of the Data field
- Specified by:
setAttributein interfacecom.jcorporate.expresso.core.dataobjects.DataField
getAttribute
public java.lang.Object getAttribute(java.lang.String attributeName)
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Retrieves any user defined attributes for this field.
- Specified by:
getAttributein interfacecom.jcorporate.expresso.core.dataobjects.DataField
getAllAttributes
public java.util.Map getAllAttributes()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Returns a Read Only
Mapof all attributes in name-value pairs. If there are no attributes then getAllAttributes will return a null map.- Specified by:
getAllAttributesin interfacecom.jcorporate.expresso.core.dataobjects.DataField
getOwner
public com.jcorporate.expresso.core.dataobjects.DataObject getOwner()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Returns a handle to the DataObject that is the container for this
Data Field
- Specified by:
getOwnerin interfacecom.jcorporate.expresso.core.dataobjects.DataField
setOwner
public void setOwner(com.jcorporate.expresso.core.dataobjects.DataObject newOwner)
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Sets the owner of a given DataObject
- Specified by:
setOwnerin interfacecom.jcorporate.expresso.core.dataobjects.DataField
getFieldMetaData
public com.jcorporate.expresso.core.dataobjects.DataFieldMetaData getFieldMetaData()
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Returns a handle to the Field MetaData object.
- Specified by:
getFieldMetaDatain interfacecom.jcorporate.expresso.core.dataobjects.DataField
setFieldMetaData
public void setFieldMetaData(com.jcorporate.expresso.core.dataobjects.DataFieldMetaData newMetadata)
- Description copied from interface:
com.jcorporate.expresso.core.dataobjects.DataField - Sets the metadata object for this field.
- Specified by:
setFieldMetaDatain interfacecom.jcorporate.expresso.core.dataobjects.DataField
cacheIsChangedComparison
public void cacheIsChangedComparison()
- call when add() or update() has occurred, and currentValue of data fields should be considered 'original value' for purposes of determining 'isChanged'
- Specified by:
cacheIsChangedComparisonin interfacecom.jcorporate.expresso.core.dataobjects.DataField
|
|||||||||
| Home >> All >> com >> jcorporate >> expresso >> core >> dataobjects >> [ jdbc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.jcorporate.expresso.core.dataobjects.jdbc.JoinedDataField