|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.toplink.mappings.converters.ObjectTypeConverter
public class ObjectTypeConverter
Purpose: Object type converter is used to match a fixed number of database data values to Java object value. It can be used when the values on the database and in the Java differ. To create an object type converter, simply specify the set of conversion value pairs. A default value and one-way conversion are also supported for legacy data situations.
Constructor Summary | |
---|---|
ObjectTypeConverter()
Default constructor. |
|
ObjectTypeConverter(DatabaseMapping mapping)
Default constructor. |
Method Summary | |
---|---|
void |
addConversionValue(java.lang.Object fieldValue,
java.lang.Object attributeValue)
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)
An attribute only conversion value is a one-way mapping from the database to the object. |
java.lang.Object |
getDefaultAttributeValue()
The default value can be used if the database can possibly store additional values then those that have been mapped. |
java.lang.String |
getFieldClassificationName()
|
void |
mapBooleans()
This is a very specific protocol which maps fieldValues "T" and "F" to true and false respectively. |
void |
mapGenders()
This is a very specific protocol which maps fieldValues "F" and "M" to "Female" and "Male" respectively. |
void |
mapResponses()
This is a very specific protocol which maps fieldValues "Y" and "N" to "Yes" and "No" respectively. |
void |
setDefaultAttributeValue(java.lang.Object defaultAttributeValue)
The default value can be used if the database can possibly store additional values then those that have been mapped. |
void |
setFieldClassificationName(java.lang.String fieldClassificationName)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectTypeConverter()
public ObjectTypeConverter(DatabaseMapping mapping)
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.lang.String getFieldClassificationName()
public void mapBooleans()
public void mapGenders()
public void mapResponses()
public void setDefaultAttributeValue(java.lang.Object defaultAttributeValue)
public void setFieldClassificationName(java.lang.String fieldClassificationName)
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |