Class EISDescriptor

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class EISDescriptor
    extends ClassDescriptor

    An EISDescriptor defines the mapping from a JCA data structure to a Java object. There are two types of EIS descriptors:

    • Root - indicates to the EclipseLink runtime that the EIS descriptor's reference class is a parent class: no other class will reference it by way of a composite object mapping or composite collection mapping. For an EIS root descriptor, EIS interactions can be defined to invoke methods on an EIS
    • Composite - indicates to the EclipseLink runtime that the EIS descriptor's reference class may be referenced by a composite object mapping or composite collection mapping
    Since:
    OracleAS TopLink 10g (10.0.3)
    Author:
    James
    See Also:
    EISInteraction, EISMapping, Serialized Form
    • Field Detail

      • dataFormat

        protected java.lang.String dataFormat
        Define the type of data the descriptor maps to.
      • MAPPED

        public static final java.lang.String MAPPED
        Define the valid data formats that the descriptor can map to.
        See Also:
        Constant Field Values
      • namespaceResolver

        protected NamespaceResolver namespaceResolver
        Allow namespaces to be specified for XML type descriptors.
    • Constructor Detail

      • EISDescriptor

        public EISDescriptor()
        Default constructor.
    • Method Detail

      • setDataTypeName

        public void setDataTypeName​(java.lang.String dataTypeName)
                             throws DescriptorException
        PUBLIC: Specify the data type name for the class of objects the descriptor maps. This may be the XML schema complex type name, or the JCA record name for the type being mapped.
        Throws:
        DescriptorException
      • getNamespaceResolver

        public NamespaceResolver getNamespaceResolver()
        PUBLIC: Return the XML namespace resolver. XML type EIS descriptor can use a namespace resolver to support XML schema namespaces.
      • getInheritancePolicy

        public InheritancePolicy getInheritancePolicy()
        PUBLIC: The inheritance policy is used to define how a descriptor takes part in inheritance. All inheritance properties for both child and parent classes is configured in inheritance policy. Caution must be used in using this method as it lazy initializes an inheritance policy. Calling this on a descriptor that does not use inheritance will cause problems, #hasInheritance() must always first be called.
        Overrides:
        getInheritancePolicy in class ClassDescriptor
      • setNamespaceResolver

        public void setNamespaceResolver​(NamespaceResolver namespaceResolver)
        PUBLIC: Set the XML namespace resolver. XML type EIS descriptor can use a namespace resolver to support XML schema namespaces.
      • isXMLFormat

        public boolean isXMLFormat()
      • isMappedFormat

        public boolean isMappedFormat()
      • isIndexedFormat

        public boolean isIndexedFormat()
      • getDataFormat

        public java.lang.String getDataFormat()
        PUBLIC: Return the data format that the descriptor maps to.
      • getDataTypeName

        public java.lang.String getDataTypeName()
                                         throws DescriptorException
        PUBLIC: Specify the data type name for the class of objects the descriptor maps. This may be the XML schema complex type name, or the JCA record name for the type being mapped.
        Throws:
        DescriptorException
      • setDataFormat

        public void setDataFormat​(java.lang.String dataFormat)
        PUBLIC: Configure the data format that the descriptor maps to.
      • useMappedRecordFormat

        public void useMappedRecordFormat()
        PUBLIC: Configure the data format to use mapped records.
      • useIndexedRecordFormat

        public void useIndexedRecordFormat()
        PUBLIC: Configure the data format to use indexed records.
      • useXMLRecordFormat

        public void useXMLRecordFormat()
        PUBLIC: Configure the data format to use xml records.
      • buildDirectValuesFromFieldValue

        public java.util.Vector buildDirectValuesFromFieldValue​(java.lang.Object fieldValue)
        INTERNAL: Extract the direct values from the specified field value. Return them in a vector. The field value could be a vector or could be a text value if only a single value.
        Overrides:
        buildDirectValuesFromFieldValue in class ClassDescriptor
      • buildFieldValueFromDirectValues

        public java.lang.Object buildFieldValueFromDirectValues​(java.util.Vector directValues,
                                                                java.lang.String elementDataTypeName,
                                                                AbstractSession session)
        INTERNAL: Build the appropriate field value for the specified set of direct values. The database better be expecting a Vector.
        Overrides:
        buildFieldValueFromDirectValues in class ClassDescriptor
      • buildField

        public DatabaseField buildField​(DatabaseField field)
        INTERNAL: If the field is an XMLField then set the namespace resolver from the descriptor. This allows the resolver to only be set in the descriptor.
        Overrides:
        buildField in class ClassDescriptor
      • addDirectMapping

        public DatabaseMapping addDirectMapping​(java.lang.String attributeName,
                                                java.lang.String fieldName)
        PUBLIC: Add a direct mapping to the receiver. The new mapping specifies that an instance variable of the class of objects which the receiver describes maps in the default manner for its type to the indicated database field.
        Overrides:
        addDirectMapping in class ClassDescriptor
        Parameters:
        attributeName - instanceVariableName is the name of an instance variable of the class which the receiver describes.
        fieldName - fieldName is the name of the xml element or attribute which corresponds with the designated instance variable.
        Returns:
        The newly created DatabaseMapping is returned.
      • addDirectMapping

        public DatabaseMapping addDirectMapping​(java.lang.String attributeName,
                                                java.lang.String getMethodName,
                                                java.lang.String setMethodName,
                                                java.lang.String fieldName)
        PUBLIC: Add a direct to node mapping to the receiver. The new mapping specifies that a variable accessed by the get and set methods of the class of objects which the receiver describes maps in the default manner for its type to the indicated database field.
        Overrides:
        addDirectMapping in class ClassDescriptor
      • setSequenceNumberFieldName

        public void setSequenceNumberFieldName​(java.lang.String fieldName)
        PUBLIC: Set the sequence number field name. This is the field in the descriptors table that needs its value to be generated. This is normally the primary key field of the descriptor. For EIS XML Descriptors use the setSequenceNumberFieldName(DatabaseField) API and supply an org.eclipse.persistence.oxm.XMLField parameter instead of using this method
        Overrides:
        setSequenceNumberFieldName in class ClassDescriptor
      • requiresInitialization

        public boolean requiresInitialization​(AbstractSession session)
        INTERNAL: XML descriptors are initialized normally, since they do not need to be cloned by ESI aggregate mappings.
        Overrides:
        requiresInitialization in class ClassDescriptor
      • isReturnTypeRequiredForReturningPolicy

        public boolean isReturnTypeRequiredForReturningPolicy()
        INTERNAL: Indicates if a return type is required for the field set on the returning policy. For EIS descriptors, this should always return false.
        Overrides:
        isReturnTypeRequiredForReturningPolicy in class ClassDescriptor
      • isEISDescriptor

        public boolean isEISDescriptor()
        PUBLIC: Return if the descriptor maps to an EIS or NoSQL datasource.
        Overrides:
        isEISDescriptor in class ClassDescriptor