public interface ModelInstanceUtilsService
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.
|
void attachAndMergeLevel(ModelInstance modelInstance, String level) throws LspsException
modelInstance
- level
- LspsException
void attach(ModelInstance modelInstance) throws LspsException
attachAndMergeLevel(ModelInstance, String)
must be used.
state of specified evaluation level is merged to lower level.
Merge is executed in the existing transaction.modelInstance
- LspsException
void saveModelInstance(ModelInstance modelInstance) throws ModelInstanceNotFoundException
modelInstance
- ModelInstanceNotFoundException
void resetUnchangedRecordVersions(ModelInstance modelInstance)
modelInstance
- void reloadChangedRecordVersions(ModelInstance modelInstance)
modelInstance
- boolean isDirty(ModelInstance modelInstance)
modelInstance
- boolean isDirty(ModelInstance modelInstance, Collection<String> ignoreLevels)
modelInstance
- ignoreLevels
- a collection of levels that should be ignoredSet<RecordValue> getOptimisticLockConflicts(ModelInstance modelInstance, Collection<String> levels, boolean resetVersionForUnchanged)
modelInstance
- levels
- resetVersionForUnchanged
- AllocatedModelInstanceResources allocateValueIds(long modelInstanceId, long allocatedSize)
modelInstanceId
- allocatedSize
- AllocatedModelInstanceResources allocateDetachmentAndValueIds(long modelInstanceId, long allocatedSize)
modelInstanceId
- allocatedSize
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.