Class InstanceClassConverter

  • All Implemented Interfaces:
    java.io.Serializable, org.eclipse.persistence.core.mappings.converters.CoreConverter<org.eclipse.persistence.mappings.DatabaseMapping,​org.eclipse.persistence.sessions.Session>, org.eclipse.persistence.mappings.converters.Converter

    public class InstanceClassConverter
    extends java.lang.Object
    implements org.eclipse.persistence.mappings.converters.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object convertDataValueToObjectValue​(java.lang.Object dataValue, org.eclipse.persistence.sessions.Session session)
      Convert the value from XML as required during unmarshal
      java.lang.Object convertObjectValueToDataValue​(java.lang.Object objectValue, org.eclipse.persistence.sessions.Session session)
      Convert the value as required during marshal.
      java.lang.Class getCustomClass()  
      void initialize​(org.eclipse.persistence.mappings.DatabaseMapping mapping, org.eclipse.persistence.sessions.Session session)  
      boolean isMutable()  
      void setCustomClass​(java.lang.Class customClass)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InstanceClassConverter

        public InstanceClassConverter()
    • Method Detail

      • convertObjectValueToDataValue

        public java.lang.Object convertObjectValueToDataValue​(java.lang.Object objectValue,
                                                              org.eclipse.persistence.sessions.Session session)
        Convert the value as required during marshal.
        Specified by:
        convertObjectValueToDataValue in interface org.eclipse.persistence.mappings.converters.Converter
        Specified by:
        convertObjectValueToDataValue in interface org.eclipse.persistence.core.mappings.converters.CoreConverter<org.eclipse.persistence.mappings.DatabaseMapping,​org.eclipse.persistence.sessions.Session>
        Parameters:
        objectValue -
        session -
        Returns:
        String value of the given object value, value returned from objectValue.toString
      • convertDataValueToObjectValue

        public java.lang.Object convertDataValueToObjectValue​(java.lang.Object dataValue,
                                                              org.eclipse.persistence.sessions.Session session)
        Convert the value from XML as required during unmarshal
        Specified by:
        convertDataValueToObjectValue in interface org.eclipse.persistence.mappings.converters.Converter
        Specified by:
        convertDataValueToObjectValue in interface org.eclipse.persistence.core.mappings.converters.CoreConverter<org.eclipse.persistence.mappings.DatabaseMapping,​org.eclipse.persistence.sessions.Session>
        Parameters:
        dataValue -
        session -
        Returns:
        Convert the value from XML by invoking the constructor that takes a spring parameter
      • isMutable

        public boolean isMutable()
        Specified by:
        isMutable in interface org.eclipse.persistence.mappings.converters.Converter
      • initialize

        public void initialize​(org.eclipse.persistence.mappings.DatabaseMapping mapping,
                               org.eclipse.persistence.sessions.Session session)
        Specified by:
        initialize in interface org.eclipse.persistence.mappings.converters.Converter
        Specified by:
        initialize in interface org.eclipse.persistence.core.mappings.converters.CoreConverter<org.eclipse.persistence.mappings.DatabaseMapping,​org.eclipse.persistence.sessions.Session>
      • setCustomClass

        public void setCustomClass​(java.lang.Class customClass)
      • getCustomClass

        public java.lang.Class getCustomClass()