@PermitAll public class ModelInstanceUtilsServiceBean extends Object implements ModelInstanceUtilsService
ModelInstanceUtilsService| Constructor and Description |
|---|
ModelInstanceUtilsServiceBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(ModelInstance modelInstance)
If a model instance is detached it is attached to the original.
|
void |
attachAndMergeLevel(ModelInstance modelInstance,
String level)
If a model instance is detached it is attached to the original and
state of specified evaluation level is merged to lower level.
|
Set<RecordValue> |
getOptimisticLockConflicts(ModelInstance modelInstance,
Collection<String> levels,
boolean resetVersionForUnchanged)
Returns records that will have optimistic lock conflicts when merged to base level.
|
boolean |
isDirty(ModelInstance modelInstance)
Returns true if there are changes in no-base evaluation level
that can affect existing data in the base level.
|
boolean |
isDirty(ModelInstance modelInstance,
Collection<String> ignoreLevels)
Returns true if there are changes in no-base evaluation level
that can affect existing data in the base level.
|
void |
reloadChangedRecordVersions(ModelInstance modelInstance)
Resets version of versioned higher level shared records.
|
void |
resetUnchangedRecordVersions(ModelInstance modelInstance)
Resets version of unchanged versioned higher level shared records.
|
void |
saveModelInstance(ModelInstance modelInstance)
Saves model instance to model instance entity.
|
public void attachAndMergeLevel(ModelInstance modelInstance, String level) throws OptimisticLockException
ModelInstanceUtilsServiceattachAndMergeLevel in interface ModelInstanceUtilsServiceOptimisticLockExceptionpublic void saveModelInstance(ModelInstance modelInstance) throws ModelInstanceNotFoundException
ModelInstanceUtilsServicesaveModelInstance in interface ModelInstanceUtilsServiceModelInstanceNotFoundExceptionpublic void resetUnchangedRecordVersions(ModelInstance modelInstance)
ModelInstanceUtilsServiceresetUnchangedRecordVersions in interface ModelInstanceUtilsServicepublic void reloadChangedRecordVersions(ModelInstance modelInstance)
ModelInstanceUtilsServicereloadChangedRecordVersions in interface ModelInstanceUtilsServicepublic boolean isDirty(ModelInstance modelInstance)
ModelInstanceUtilsServiceisDirty in interface ModelInstanceUtilsServicepublic boolean isDirty(ModelInstance modelInstance, Collection<String> ignoreLevels)
ModelInstanceUtilsServiceisDirty in interface ModelInstanceUtilsServiceignoreLevels - a collection of levels that should be ignoredpublic Set<RecordValue> getOptimisticLockConflicts(ModelInstance modelInstance, Collection<String> levels, boolean resetVersionForUnchanged)
ModelInstanceUtilsServicegetOptimisticLockConflicts in interface ModelInstanceUtilsServicepublic void attach(ModelInstance modelInstance)
ModelInstanceUtilsServiceModelInstanceUtilsService.attachAndMergeLevel(ModelInstance, String) must be used.
state of specified evaluation level is merged to lower level.
Merge is executed in the existing transaction.attach in interface ModelInstanceUtilsServiceCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.