Class DefaultChangeSet

    • Field Detail

      • LOG

        protected static org.apache.log4j.Logger LOG
    • Constructor Detail

      • DefaultChangeSet

        public DefaultChangeSet()
    • Method Detail

      • getEntityRecords

        public java.util.Collection<EntityRecord> getEntityRecords()
        Description copied from interface: ChangeSet
        Gets immutable collections with entity records.
        Specified by:
        getEntityRecords in interface ChangeSet
        Returns:
        collection of records
      • getRelationChanges

        public java.util.Map<java.lang.String,​RelationChanges> getRelationChanges()
        Description copied from interface: ChangeSet
        Gets immutable map with all relation changesets.
        Specified by:
        getRelationChanges in interface ChangeSet
        Returns:
        map of relation changes where key is the relation name and value RelationChanges object
      • putRelationChanges

        public void putRelationChanges​(java.lang.String relationName,
                                       RelationChanges changeSet)
        Description copied from interface: MutableChangeSet
        Adds new relation changes for the given relation type.
        Specified by:
        putRelationChanges in interface MutableChangeSet
        Parameters:
        relationName - Name of relation
        changeSet - Relation changes
      • sortAll

        public void sortAll()
        Description copied from interface: MutableChangeSet
        Sorts collection of entity records and relation records by PK.
        Specified by:
        sortAll in interface MutableChangeSet
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setJaloWayRecommended

        public void setJaloWayRecommended​(boolean jaloWayRecommended)
        Description copied from interface: MutableChangeSet
        Sets the jaloWayRecommended flag. Only in some rare, exceptional cases this flag should be set to true. If it's set, it means - switching to jalo Way (instead of the direct persistence) is strongly recommended
        Specified by:
        setJaloWayRecommended in interface MutableChangeSet
        Parameters:
        jaloWayRecommended - jaloWayRecommended flag
      • isJaloWayRecommended

        public boolean isJaloWayRecommended()
        Description copied from interface: ChangeSet
        Provides info, if jalo way is recommended (instead of direct persistence)
        Specified by:
        isJaloWayRecommended in interface ChangeSet
        Returns:
        true, if jalo way is recommended, false by default (direct persistence)
      • withAdded

        public ChangeSet withAdded​(ChangeSet otherChangeSet)
        Description copied from interface: ChangeSet
        Creates a new ChangeSet that contains the sum of EntityRecords and RelationChanges from this ChangeSet and otherChangeSet
        Specified by:
        withAdded in interface ChangeSet
        Returns:
        new ChangeSet containing changes from this ChangeSet and otherChangeSet
      • allowEmptyUpdate

        public boolean allowEmptyUpdate()
        Description copied from interface: ChangeSet
        Allows empty updates (by default) or not.
        Specified by:
        allowEmptyUpdate in interface ChangeSet
        Returns:
        true, if empty updates are allowed (by default), false otherwise