public class PersistentIdAllocator extends Object implements ModelInstanceResourceAllocator
ModelInstanceResourceAllocator
.
The information about allocated values is stored in database.
This allocator should be used for model instances from which detached copies are created.Modifier and Type | Field and Description |
---|---|
static long |
ALLOCATION_SIZE
Size of allocated value ids.
|
Constructor and Description |
---|
PersistentIdAllocator(ModelInstanceUtilsService modelInstanceUtilsService)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
AllocatedModelInstanceResources |
allocateDetachmentAndValueIds(ModelInstance modelInstance)
Allocates next id for detachment in the model instance.
|
AllocatedModelInstanceResources |
allocateValueIds(ModelInstance modelInstance)
Allocates new range of ids for values in the model instance.
|
long |
getAllocationSize()
Returns allocation size for value ids.
|
public static final long ALLOCATION_SIZE
public PersistentIdAllocator(ModelInstanceUtilsService modelInstanceUtilsService)
modelProviderService
- public long getAllocationSize()
ModelInstanceResourceAllocator
getAllocationSize
in interface ModelInstanceResourceAllocator
public AllocatedModelInstanceResources allocateValueIds(ModelInstance modelInstance)
ModelInstanceResourceAllocator
allocateValueIds
in interface ModelInstanceResourceAllocator
public AllocatedModelInstanceResources allocateDetachmentAndValueIds(ModelInstance modelInstance)
ModelInstanceResourceAllocator
allocateDetachmentAndValueIds
in interface ModelInstanceResourceAllocator
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.