@Service(value="cuba_EntitySnapshotService") public class EntitySnapshotServiceBean extends java.lang.Object implements EntitySnapshotService
NAME| Constructor and Description |
|---|
EntitySnapshotServiceBean() |
| Modifier and Type | Method and Description |
|---|---|
EntitySnapshot |
createSnapshot(Entity entity,
View view)
Create snapshot for entity and save it to database
|
EntitySnapshot |
createSnapshot(Entity entity,
View view,
java.util.Date snapshotDate)
Create snapshot for Entity with specific date and store it to database
|
EntitySnapshot |
createSnapshot(Entity entity,
View view,
java.util.Date snapshotDate,
User author)
Create snapshot for Entity with specific date and author and store it to database
|
Entity |
extractEntity(EntitySnapshot snapshot)
Get entity from snapshot
|
EntityDiff |
getDifference(EntitySnapshot first,
EntitySnapshot second)
Get Diff for snapshots
|
java.util.List<EntitySnapshot> |
getSnapshots(MetaClass metaClass,
java.lang.Object id)
Get snapshots for entity by id
|
void |
migrateSnapshots(MetaClass metaClass,
java.lang.Object id,
java.util.Map<java.lang.Class,java.lang.Class> classMapping)
Translate snapshots for archival classes
|
public java.util.List<EntitySnapshot> getSnapshots(MetaClass metaClass, java.lang.Object id)
EntitySnapshotServicegetSnapshots in interface EntitySnapshotServicemetaClass - Entity meta classid - Entity idpublic EntitySnapshot createSnapshot(Entity entity, View view)
EntitySnapshotServicecreateSnapshot in interface EntitySnapshotServiceentity - Entityview - Viewpublic EntitySnapshot createSnapshot(Entity entity, View view, java.util.Date snapshotDate)
EntitySnapshotServicecreateSnapshot in interface EntitySnapshotServiceentity - Entityview - ViewsnapshotDate - Datepublic EntitySnapshot createSnapshot(Entity entity, View view, java.util.Date snapshotDate, User author)
EntitySnapshotServicecreateSnapshot in interface EntitySnapshotServiceentity - Entityview - ViewsnapshotDate - Dateauthor - Authorpublic Entity extractEntity(EntitySnapshot snapshot)
EntitySnapshotServiceextractEntity in interface EntitySnapshotServicesnapshot - Snapshotpublic EntityDiff getDifference(@Nullable EntitySnapshot first, EntitySnapshot second)
EntitySnapshotServicegetDifference in interface EntitySnapshotServicefirst - First snapshotsecond - Second snapshotpublic void migrateSnapshots(MetaClass metaClass, java.lang.Object id, java.util.Map<java.lang.Class,java.lang.Class> classMapping)
EntitySnapshotServicemigrateSnapshots in interface EntitySnapshotServicemetaClass - Metaclassid - Entity IdclassMapping - Map of [OldClass -> NewClass] for migration