|
EclipseLink 1.0_1.0M2 API Reference - Incubation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.mappings.DatabaseMapping
org.eclipse.persistence.mappings.foundation.AbstractDirectMapping
org.eclipse.persistence.mappings.DirectToFieldMapping
org.eclipse.persistence.mappings.ObjectTypeMapping
ObjectTypeConverter
public class 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. Note this functionality has been somewhat replaced by ObjectTypeConverter which can be used to obtain the same functionality on DirectToField and DirectCollection mappings.
ObjectTypeConverter
,
Serialized FormField Summary |
---|
Fields inherited from class org.eclipse.persistence.mappings.foundation.AbstractDirectMapping |
---|
attributeClassification, attributeClassificationName, attributeObjectClassification, converter, converterClassName, field, isMutable, nullValue |
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
attributeAccessor, attributeName, descriptor, fields, isLazy, isOptional, isReadOnly, isRemotelyInitialized, NO_FIELDS, NO_WEIGHT, primaryKeyMapping, properties, weight, WEIGHT_1 |
Constructor Summary | |
---|---|
ObjectTypeMapping()
Deprecated. PUBLIC: Default constructor. |
Method Summary | |
---|---|
void |
addConversionValue(java.lang.Object fieldValue,
java.lang.Object attributeValue)
Deprecated. 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)
Deprecated. PUBLIC: An attribute only conversion value is a one-way mapping from the database to the object. |
java.util.Map |
getAttributeToFieldValues()
Deprecated. INTERNAL: Get the attribute to field mapping. |
java.lang.Object |
getAttributeValue(java.lang.Object fieldValue,
AbstractSession session)
Deprecated. INTERNAL: This overides the default behavoir to maintain compatibility with how object-type-mapping handles null values. |
java.lang.Object |
getDefaultAttributeValue()
Deprecated. 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()
Deprecated. INTERNAL: Return a collection of the field to attribute value associations. |
java.util.Map |
getFieldToAttributeValues()
Deprecated. INTERNAL: Get the field to attribute mapping. |
java.lang.Object |
getFieldValue(java.lang.Object attributeValue,
AbstractSession session)
Deprecated. INTERNAL: This overides the default behavoir to maintain compatibility with how object-type-mapping handles null values. |
ObjectTypeConverter |
getObjectTypeConverter()
Deprecated. PUBLIC: Return the converter cast to ObjectTypeConverter. |
boolean |
isObjectTypeMapping()
Deprecated. INTERNAL: |
void |
mapBooleans()
Deprecated. PUBLIC: This is a very specific protocol which maps fieldValues "T" and "F" to true and false respectively. |
void |
mapGenders()
Deprecated. PUBLIC: This is a very specific protocol which maps fieldValues "F" and "M" to "Female" and "Male" respectively. |
void |
mapResponses()
Deprecated. PUBLIC: This is a very specific protocol which maps fieldValues "Y" and "N" to "Yes" and "No" respectively. |
void |
setAttributeToFieldValues(java.util.Hashtable attributeToFieldValues)
Deprecated. INTERNAL: Set the attribute to field mapping. |
void |
setDefaultAttributeValue(java.lang.Object defaultAttributeValue)
Deprecated. 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)
Deprecated. INTERNAL: Set a collection of the field to attribute value associations. |
void |
setFieldToAttributeValues(java.util.Hashtable fieldToAttributeValues)
Deprecated. INTERNAL: Set the field to attribute mapping. |
Methods inherited from class org.eclipse.persistence.mappings.DirectToFieldMapping |
---|
isRelationalMapping, setFieldName, writeValueIntoRow |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectTypeMapping()
Method Detail |
---|
public ObjectTypeConverter getObjectTypeConverter()
public void addConversionValue(java.lang.Object fieldValue, java.lang.Object attributeValue)
public void addToAttributeOnlyConversionValue(java.lang.Object fieldValue, java.lang.Object attributeValue)
public java.util.Map getAttributeToFieldValues()
public java.lang.Object getDefaultAttributeValue()
public java.util.Vector getFieldToAttributeValueAssociations()
public java.util.Map getFieldToAttributeValues()
public boolean isObjectTypeMapping()
isObjectTypeMapping
in class DatabaseMapping
public void mapBooleans()
public void mapGenders()
public void mapResponses()
public void setAttributeToFieldValues(java.util.Hashtable attributeToFieldValues)
public void setDefaultAttributeValue(java.lang.Object defaultAttributeValue)
public void setFieldToAttributeValueAssociations(java.util.Vector fieldToAttributeValueAssociations)
public void setFieldToAttributeValues(java.util.Hashtable fieldToAttributeValues)
public java.lang.Object getFieldValue(java.lang.Object attributeValue, AbstractSession session)
getFieldValue
in class AbstractDirectMapping
public java.lang.Object getAttributeValue(java.lang.Object fieldValue, AbstractSession session)
getAttributeValue
in class AbstractDirectMapping
|
EclipseLink 1.0_1.0M2 API Reference - Incubation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |