Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)


Class InstanceClassConverter

  extended by org.eclipse.persistence.sdo.helper.InstanceClassConverter

All Implemented Interfaces:, Converter

public class InstanceClassConverter
extends java.lang.Object
implements Converter

Purpose: A converter used in conjunction with sdoJava:instanceClass The customClass on the converter must be set and that class must have a Constructor that takes a String argument and a toString method. Used when the javaClass open content property is set.

See Also:
Serialized Form

Field Summary
private  java.lang.Class customClass


Constructor Summary


Method Summary
 java.lang.Object convertDataValueToObjectValue(java.lang.Object dataValue, Session session)
          Convert the value from XML as required during unmarshal
 java.lang.Object convertObjectValueToDataValue(java.lang.Object objectValue, Session session)
          Convert the value as required during marshal.
 java.lang.Class getCustomClass()
 void initialize(DatabaseMapping mapping, Session session)
          PUBLIC: Allow for any initialization.
 boolean isMutable()
          PUBLIC: If the converter converts the value to a mutable value, i.e.
 void setCustomClass(java.lang.Class customClass)


Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait


Field Detail


private java.lang.Class customClass

Constructor Detail


public InstanceClassConverter()

Method Detail


public java.lang.Object convertObjectValueToDataValue(java.lang.Object objectValue,
                                                      Session session)
Convert the value as required during marshal.
Specified by:
convertObjectValueToDataValue in interface Converter
objectValue -
session -
String value of the given object value, value returned from objectValue.toString


public java.lang.Object convertDataValueToObjectValue(java.lang.Object dataValue,
                                                      Session session)
Convert the value from XML as required during unmarshal
Specified by:
convertDataValueToObjectValue in interface Converter
dataValue -
session -
Convert the value from XML by invoking the constructor that takes a spring parameter


public boolean isMutable()
Description copied from interface: Converter
PUBLIC: If the converter converts the value to a mutable value, i.e. a value that can have its' parts changed without being replaced, then it must return true. If the value is not mutable, cannot be changed without replacing the whole value then false must be returned. This is used within the UnitOfWork to determine how to clone.
Specified by:
isMutable in interface Converter


public void initialize(DatabaseMapping mapping,
                       Session session)
Description copied from interface: Converter
PUBLIC: Allow for any initialization.
Specified by:
initialize in interface Converter


public void setCustomClass(java.lang.Class customClass)


public java.lang.Class getCustomClass()

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.