@PermitAll public class ModelInstanceUtilsServiceBean extends Object implements ModelInstanceUtilsService
ModelInstanceUtilsService
Constructor and Description |
---|
ModelInstanceUtilsServiceBean() |
Modifier and Type | Method and Description |
---|---|
AllocatedModelInstanceResources |
allocateDetachmentAndValueIds(long modelInstanceId,
long allocatedSize)
Allocates new range of value ids and detachment id.
|
AllocatedModelInstanceResources |
allocateValueIds(long modelInstanceId,
long allocatedSize)
Allocates new range of value ids.
|
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
ModelInstanceUtilsService
attachAndMergeLevel
in interface ModelInstanceUtilsService
OptimisticLockException
public void saveModelInstance(ModelInstance modelInstance) throws ModelInstanceNotFoundException
ModelInstanceUtilsService
saveModelInstance
in interface ModelInstanceUtilsService
ModelInstanceNotFoundException
public void resetUnchangedRecordVersions(ModelInstance modelInstance)
ModelInstanceUtilsService
resetUnchangedRecordVersions
in interface ModelInstanceUtilsService
public void reloadChangedRecordVersions(ModelInstance modelInstance)
ModelInstanceUtilsService
reloadChangedRecordVersions
in interface ModelInstanceUtilsService
public boolean isDirty(ModelInstance modelInstance)
ModelInstanceUtilsService
isDirty
in interface ModelInstanceUtilsService
public boolean isDirty(ModelInstance modelInstance, Collection<String> ignoreLevels)
ModelInstanceUtilsService
isDirty
in interface ModelInstanceUtilsService
ignoreLevels
- a collection of levels that should be ignoredpublic Set<RecordValue> getOptimisticLockConflicts(ModelInstance modelInstance, Collection<String> levels, boolean resetVersionForUnchanged)
ModelInstanceUtilsService
getOptimisticLockConflicts
in interface ModelInstanceUtilsService
public void attach(ModelInstance modelInstance)
ModelInstanceUtilsService
ModelInstanceUtilsService.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 ModelInstanceUtilsService
public AllocatedModelInstanceResources allocateValueIds(long modelInstanceId, long allocatedSize)
ModelInstanceUtilsService
allocateValueIds
in interface ModelInstanceUtilsService
public AllocatedModelInstanceResources allocateDetachmentAndValueIds(long modelInstanceId, long allocatedSize)
ModelInstanceUtilsService
allocateDetachmentAndValueIds
in interface ModelInstanceUtilsService
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.