Modifier and Type | Interface and Description |
---|---|
static interface |
GidAgent.GidAdaptationResult
Adaptation result object.
|
Modifier and Type | Field and Description |
---|---|
static SpecialistType<GidAgent> |
TYPE
The agent's technical type to be used to request the agent from a
SpecialistsBroker . |
Modifier and Type | Method and Description |
---|---|
GidAgent.GidAdaptationResult |
adaptGid(Schema schema,
List<Entity> elements,
boolean force)
Adapts the given elements GID's.
|
GidAgent.GidAdaptationResult |
adaptGid(Schema schema,
Map<Entity,UUID> elementsMapping,
boolean force)
Adapts the given elements GID's to the mapping defined one.
|
Entity |
findEntity(String gid)
Finds a
Entity by its globalId (gid). |
Session |
migrateSchema(Schema schema)
Migrates the given schema to support
fs_gid's if necessary. |
static final SpecialistType<GidAgent> TYPE
SpecialistsBroker
.@NotNull Session migrateSchema(@NotNull Schema schema) throws LockException, ElementDeletedException
fs_gid's
if necessary.or session
to request entities which should be passed to theadaptGid()
methods (adaptGid(Schema,List,boolean)
& adaptGid(Schema,Map,boolean)
)schema
- the schema to migrateLockException
ElementDeletedException
@NotNull GidAgent.GidAdaptationResult adaptGid(@NotNull Schema schema, @NotNull List<Entity> elements, boolean force) throws Throwable
migrateSchema(Schema)
before calling this method if given schema doesn't not support fs_gid's yetcommit
on the OR session to persist the changes made duringthe execution of this method and all changes made on the session before calling this method.session rollback
will be calledschema
- the entity bound schemaelements
- the elements to adaptforce
- adapt the entity gid no matter if it exists alreadyIllegalStateException
- if session is temporal or read onlyIllegalArgumentException
- if given schema isn't migrated
yet to support fs_gid's
Throwable
@NotNull GidAgent.GidAdaptationResult adaptGid(@NotNull Schema schema, @NotNull Map<Entity,UUID> elementsMapping, boolean force) throws Throwable
migrateSchema(Schema)
before calling this method if given schema doesn't not support fs_gid's yetcommit
on the OR session to persist the changes made duringthe execution of this method and all changes made on the session before calling this method.session rollback
will be calledschema
- the entity bound schemaelementsMapping
- the element to gid mapping. The Entity will be updated to the given UUID.force
- adapt the entity gid no matter if it exists alreadyIllegalStateException
- if session is temporal or read onlyIllegalArgumentException
- if given schema isn't migrated
yet to support fs_gid's
Throwable
@Nullable Entity findEntity(@NotNull String gid) throws IllegalArgumentException
Entity
by its globalId (gid).gid
- A string that specifies a UUID
IllegalArgumentException
- If name does not conform to the string representation as described in UUID.toString()
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210