Interface TransformationMapping<ABSTRACT_SESSION extends CoreAbstractSession,​ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor,​CONTAINER_POLICY extends CoreContainerPolicy,​DESCRIPTOR extends CoreDescriptor,​FIELD extends CoreField,​TRANSFORMATION_RECORD extends TransformationRecord,​XML_RECORD extends XMLRecord>

    • Method Detail

      • addFieldTransformation

        void addFieldTransformation​(String fieldName,
                                    String methodName)
        Add the name of field and the name of the method that returns the value to be placed in said field when the object is written to the database. The method may take zero arguments, or it may take a single argument of type org.eclipse.persistence.sessions.Session.
      • addFieldTransformerClassName

        void addFieldTransformerClassName​(String fieldName,
                                          String className)
        INTERNAL: Add the name of a field and the name of a class which implements the FieldTransformer interface. When the object is written, the transform method will be called on the FieldTransformer to acquire the value to put in the field.
      • getFieldToTransformers

        List<Object[]> getFieldToTransformers()
        INTERNAL:
        Returns:
        a vector which stores fields and their respective transformers.
      • readFromRowIntoObject

        Object readFromRowIntoObject​(XML_RECORD row,
                                     Object object,
                                     ABSTRACT_SESSION executionSession,
                                     boolean isTargetProtected)
        INTERNAL: Extract value from the row and set the attribute to the value in the object.
        Since:
        EclipseLink 2.6.0
      • setAttributeTransformation

        void setAttributeTransformation​(String methodName)
        To set the attribute method name. The method is invoked internally by TopLink to retrieve the value to store in the domain object. The method receives Record as its parameter and optionally Session, and should extract the value from the record to set into the object, but should not set the value on the object, only return it.
      • setAttributeTransformerClassName

        void setAttributeTransformerClassName​(String className)
        INTERNAL: Set the Attribute Transformer Class Name
        Parameters:
        className -
      • setIsOptional

        void setIsOptional​(boolean isOptional)
        Used to specify whether the value of this mapping may be null. This is used when generating DDL.
      • writeFromAttributeIntoRow

        void writeFromAttributeIntoRow​(UnmarshalRecord unmarshalRecord,
                                       Field field,
                                       Object value,
                                       boolean isElement)
        INTERNAL: Put value into a record keyed on field.
        Since:
        EclipseLink 2.6.0