Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.mappings
Class ObjectTypeMapping

`java.lang.Object
oracle.toplink.mappings.DatabaseMapping
oracle.toplink.mappings.foundation.AbstractDirectMapping
oracle.toplink.mappings.DirectToFieldMapping
oracle.toplink.mappings.ObjectTypeMapping`

All Implemented Interfaces:
  java.lang.Cloneable, oracle.toplink.mappings.RelationalMapping, java.io.Serializable

Deprecated. since OracleAS TopLink 10g (10.1.3). This class is replaced by `ObjectTypeConverter`

public class ObjectTypeMapping
extends DirectToFieldMapping

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.

Since:
  Toplink for Java 1.0
See Also:
  `ObjectTypeConverter`, Serialized Form

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.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.
`ObjectTypeConverter` | `getObjectTypeConverter()` Deprecated. PUBLIC: Return the converter cast to ObjectTypeConverter.
`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` | `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.

Methods inherited from class oracle.toplink.mappings.DirectToFieldMapping
`setFieldName`

Methods inherited from class oracle.toplink.mappings.foundation.AbstractDirectMapping
`getAttributeClassification, getAttributeClassificationName, getConverter, getFieldClassification, getFieldName, getNullValue, isMutable, setAttributeClassification, setConverter, setField, setFieldClassification, setFieldType, setIsMutable, setNullValue`

Methods inherited from class oracle.toplink.mappings.DatabaseMapping
`getAttributeAccessor, getAttributeName, getGetMethodName, getReferenceClassDescriptor, getSetMethodName, isUsingMethodAccess, readOnly, readWrite, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ObjectTypeMapping

    public ObjectTypeMapping()

  Deprecated.
  PUBLIC: Default constructor.

Method Detail

### getObjectTypeConverter

    public ObjectTypeConverter getObjectTypeConverter()

  Deprecated.
  PUBLIC: Return the converter cast to ObjectTypeConverter.

### addConversionValue

    public 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. The database value will be substituted for the object value when read, and the object value will be substituted for database value when written. Note that each field/attribute value must have one and only one attribute/field value to maintain a two-way mapping.

### addToAttributeOnlyConversionValue

    public 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. This can be used if multiple database values are desired to be mapped to the same object value. Note that when written only the default value will be used for the attribute, not this value.

### getDefaultAttributeValue

    public 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. Any value retreived from the database that is not mapped will be substitued for the default value.

### mapBooleans

    public void mapBooleans()

  Deprecated.
  PUBLIC: This is a very specific protocol which maps fieldValues "T" and "F" to true and false respectively.

### mapGenders

    public void mapGenders()

  Deprecated.
  PUBLIC: This is a very specific protocol which maps fieldValues "F" and "M" to "Female" and "Male" respectively.

### mapResponses

    public void mapResponses()

  Deprecated.
  PUBLIC: This is a very specific protocol which maps fieldValues "Y" and "N" to "Yes" and "No" respectively.

### setDefaultAttributeValue

    public 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. Any value retreived from the database that is not mapped will be substitued for the default value.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD