Class MultitenantPrimaryKeyMapping

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

    public class MultitenantPrimaryKeyMapping
    extends AbstractColumnMapping
    Purpose: Maps a multitenant property to the corresponding database field type. The list of field types that are supported by EclipseLink's direct to field mapping is dependent on the relational database being used.
    Since:
    EclipseLink 2.4
    Author:
    Guy Pelletier
    See Also:
    Serialized Form
    • Constructor Detail

      • MultitenantPrimaryKeyMapping

        public MultitenantPrimaryKeyMapping()
        Constructor
    • Method Detail

      • buildBackupClone

        public void buildBackupClone​(java.lang.Object clone,
                                     java.lang.Object backup,
                                     UnitOfWorkImpl unitOfWork)
        INTERNAL: Clone the attribute from the clone and assign it to the backup. This is an override from DatabaseMapping and must be implemented.
        Specified by:
        buildBackupClone in class DatabaseMapping
      • buildClone

        public void buildClone​(java.lang.Object original,
                               CacheKey cacheKey,
                               java.lang.Object clone,
                               java.lang.Integer refreshCascade,
                               AbstractSession cloningSession)
        INTERNAL: Clone the attribute from the original and assign it to the clone. This is an override from DatabaseMapping and must be implemented.
        Specified by:
        buildClone in class DatabaseMapping
      • compareForChange

        public ChangeRecord compareForChange​(java.lang.Object clone,
                                             java.lang.Object backUp,
                                             ObjectChangeSet owner,
                                             AbstractSession session)
        INTERNAL: Compare the clone and backup clone values and return a change record if the value changed. This is an override from DatabaseMapping and must be implemented.
        Specified by:
        compareForChange in class DatabaseMapping
        Returns:
        prototype.changeset.ChangeRecord
      • compareObjects

        public boolean compareObjects​(java.lang.Object firstObject,
                                      java.lang.Object secondObject,
                                      AbstractSession session)
        INTERNAL: Compare the attributes belonging to this mapping for the objects. This is an override from DatabaseMapping and must be implemented.
        Specified by:
        compareObjects in class DatabaseMapping
      • isCloningRequired

        public boolean isCloningRequired()
        INTERNAL: Return if this mapping requires its attribute value to be cloned.
        Overrides:
        isCloningRequired in class DatabaseMapping
      • isWriteOnly

        public boolean isWriteOnly()
        INTERNAL This mapping must be write only as their is no attribute to read into.
        Overrides:
        isWriteOnly in class DatabaseMapping
      • mergeChangesIntoObject

        public void mergeChangesIntoObject​(java.lang.Object target,
                                           ChangeRecord changeRecord,
                                           java.lang.Object source,
                                           MergeManager mergeManager,
                                           AbstractSession targetSession)
        INTERNAL: Merge changes from the source to the target object. This is an override from DatabaseMapping and must be implemented.
        Specified by:
        mergeChangesIntoObject in class DatabaseMapping
      • mergeIntoObject

        public void mergeIntoObject​(java.lang.Object target,
                                    boolean isTargetUninitialized,
                                    java.lang.Object source,
                                    MergeManager mergeManager,
                                    AbstractSession targetSession)
        INTERNAL: Merge changes from the source to the target object. This merge is only called when a changeSet for the target does not exist or the target is uninitialized This is an override from DatabaseMapping and must be implemented.
        Specified by:
        mergeIntoObject in class DatabaseMapping
      • setContextProperty

        public void setContextProperty​(java.lang.String contextProperty)
        INTERNAL: The context property that is used to write this mapping must be set. It is set as the attribute name (which gets set on the accessor)