|
Oracle Application Server TopLink API Reference 10g Release 2 (10.1.2) B15903-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.toplink.mappings.DatabaseMapping
oracle.toplink.mappings.DirectToFieldMapping
oracle.toplink.mappings.ObjectTypeMapping
Purpose: Object type mappings are used to match a fixed number of database primitives to Java objects. They are used when the values on the databae and in the java differ. To create an object type mapping, simply specify the instance variable and field names involved, together with a conversion value.
Constructor Summary | |
ObjectTypeMapping() PUBLIC: Default constructor. |
Method Summary | |
void |
addConversionValue(java.lang.Object fieldValue, java.lang.Object attributeValue) PUBLIC: A type conversion value is a two-way mapping from the database to the object. |
void |
addToAttributeOnlyConversionValue(java.lang.Object fieldValue, java.lang.Object attributeValue) PUBLIC: An attribute only conversion value is a one-way mapping from the database to the object. |
java.lang.Object |
getDefaultAttributeValue() PUBLIC: The default value can be used if the database can possibly store additional values then those that have been mapped. |
java.util.Vector |
getFieldToAttributeValueAssociations() PUBLIC: Return a collection of the field to attribute value associations. |
java.util.Vector |
getFieldToAttributeValueAssociationsForXML() PUBLIC: Return a collection of the field to attribute value associations for XML. |
void |
mapBooleans() PUBLIC: This is a very specific protocol which maps fieldValues "T" and "F" to true and false respectively. |
void |
mapGenders() PUBLIC: This is a very specific protocol which maps fieldValues "F" and "M" to "Female" and "Male" respectively. |
void |
mapResponses() PUBLIC: This is a very specific protocol which maps fieldValues "Y" and "N" to "Yes" and "No" respectively. |
void |
setDefaultAttributeValue(java.lang.Object defaultAttributeValue) PUBLIC: The default value can be used if the database can possibly store additional values then those that have been mapped. |
void |
setFieldToAttributeValueAssociations(java.util.Vector fieldToAttributeValueAssociations) PUBLIC: Set a collection of the field to attribute value associations. |
Methods inherited from class oracle.toplink.mappings.DirectToFieldMapping |
getAttributeClassification, getFieldName, getNullValue, setAttributeClassification, setFieldName, setNullValue |
Methods inherited from class oracle.toplink.mappings.DatabaseMapping |
getAttributeName, getGetMethodName, getSetMethodName, readOnly, readWrite, setAttributeName, setGetMethodName, setIsReadOnly, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ObjectTypeMapping()
Method Detail |
public void addConversionValue(java.lang.Object fieldValue, java.lang.Object attributeValue)
public void addToAttributeOnlyConversionValue(java.lang.Object fieldValue, java.lang.Object attributeValue)
public java.lang.Object getDefaultAttributeValue()
public java.util.Vector getFieldToAttributeValueAssociations()
public java.util.Vector getFieldToAttributeValueAssociationsForXML()
public void mapBooleans()
public void mapGenders()
public void mapResponses()
public void setDefaultAttributeValue(java.lang.Object defaultAttributeValue)
public void setFieldToAttributeValueAssociations(java.util.Vector fieldToAttributeValueAssociations)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |