Class DefaultChangeSet
java.lang.Object
de.hybris.platform.directpersistence.impl.DefaultChangeSet
- All Implemented Interfaces:
ChangeSet,MutableChangeSet
Default implementation of direct persistence change set.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(EntityRecord... entityRecords) Adds new entity records to change set.voidaddAllEntityRecords(Collection<? extends EntityRecord> entityRecords) Adds new entity records to change set.booleanAllows empty updates (by default) or not.voidfinish()Gets immutable collections with entity records.Gets immutable map with all relation changesets.getRelationChangesForRelation(String relationName) Gets relation changes for single relation type identified by name.voidGroup together information about order (position) where possible.booleanProvides info, if jalo way is recommended (instead of direct persistence)voidputRelationChanges(String relationName, RelationChanges changeSet) Adds new relation changes for the given relation type.voidsetJaloWayRecommended(boolean jaloWayRecommended) Sets the jaloWayRecommended flag.voidsortAll()Sorts collection of entity records and relation records by PK.voidSorts collection of entity records by PK.toString()Creates a new ChangeSet that contains the sum of EntityRecords and RelationChanges from this ChangeSet and otherChangeSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.hybris.platform.directpersistence.ChangeSet
getResultsToInvalidate
-
Field Details
-
LOG
protected static org.apache.log4j.Logger LOG
-
-
Constructor Details
-
DefaultChangeSet
public DefaultChangeSet()
-
-
Method Details
-
getEntityRecords
Description copied from interface:ChangeSetGets immutable collections with entity records.- Specified by:
getEntityRecordsin interfaceChangeSet- Returns:
- collection of records
-
add
Description copied from interface:MutableChangeSetAdds new entity records to change set.- Specified by:
addin interfaceMutableChangeSet
-
addAllEntityRecords
Description copied from interface:MutableChangeSetAdds new entity records to change set.- Specified by:
addAllEntityRecordsin interfaceMutableChangeSet
-
getRelationChanges
Description copied from interface:ChangeSetGets immutable map with all relation changesets.- Specified by:
getRelationChangesin interfaceChangeSet- Returns:
- map of relation changes where key is the relation name and value RelationChanges object
-
putRelationChanges
Description copied from interface:MutableChangeSetAdds new relation changes for the given relation type.- Specified by:
putRelationChangesin interfaceMutableChangeSet- Parameters:
relationName- Name of relationchangeSet- Relation changes
-
getRelationChangesForRelation
Description copied from interface:MutableChangeSetGets relation changes for single relation type identified by name.- Specified by:
getRelationChangesForRelationin interfaceMutableChangeSet- Parameters:
relationName- Name of relations
-
sortEntityRecords
public void sortEntityRecords()Description copied from interface:MutableChangeSetSorts collection of entity records by PK.- Specified by:
sortEntityRecordsin interfaceMutableChangeSet
-
groupOrderInformation
public void groupOrderInformation()Description copied from interface:MutableChangeSetGroup together information about order (position) where possible.- Specified by:
groupOrderInformationin interfaceMutableChangeSet
-
sortAll
public void sortAll()Description copied from interface:MutableChangeSetSorts collection of entity records and relation records by PK.- Specified by:
sortAllin interfaceMutableChangeSet
-
toString
-
setJaloWayRecommended
public void setJaloWayRecommended(boolean jaloWayRecommended) Description copied from interface:MutableChangeSetSets 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:
setJaloWayRecommendedin interfaceMutableChangeSet- Parameters:
jaloWayRecommended- jaloWayRecommended flag
-
finish
public void finish()- Specified by:
finishin interfaceMutableChangeSet
-
isJaloWayRecommended
public boolean isJaloWayRecommended()Description copied from interface:ChangeSetProvides info, if jalo way is recommended (instead of direct persistence)- Specified by:
isJaloWayRecommendedin interfaceChangeSet- Returns:
true, if jalo way is recommended,falseby default (direct persistence)
-
withAdded
Description copied from interface:ChangeSetCreates a new ChangeSet that contains the sum of EntityRecords and RelationChanges from this ChangeSet and otherChangeSet -
allowEmptyUpdate
public boolean allowEmptyUpdate()Description copied from interface:ChangeSetAllows empty updates (by default) or not.- Specified by:
allowEmptyUpdatein interfaceChangeSet- Returns:
true, if empty updates are allowed (by default),falseotherwise
-