VersionTransaction
- public abstract class VersionTransaction extends CacheableBackendTransaction<EntityID, HashMap<String, VersionHistoryItem>>
Abstract base class which retrieves and caches the full, but flat version history. The implementations then use the flat version history to construct either single version information items (see
RetrieveVersionInfo
) or the complete history as a tree (seeRetrieveVersionHistory
)- Author:
Timm Fitschen (t.fitschen@indiscale.com)
Constructors
VersionTransaction
- public VersionTransaction(EntityInterface e)
Methods
executeNoCache
- public HashMap<String, VersionHistoryItem> executeNoCache()
getEntity
- public EntityInterface getEntity()
getHistoryItems
- public HashMap<String, VersionHistoryItem> getHistoryItems()
getKey
getPredecessors
- protected List<Version> getPredecessors(String versionId, boolean transitive)
Return a list of direct predecessors. The predecessors are constructed by
getVersion(String)
.If transitive is true, this function is called recursively on the predecessors as well, resulting in a list of trees of predecessors, with the direct predecessors at the root(s).
- Parameters:
versionId –
transitive –
- Returns:
A list of predecessors.
getSuccessors
- protected List<Version> getSuccessors(String versionId, boolean transitive)
Return a list of direct successors. The successors are constructed by
getVersion(String)
.If transitive is true, this function is called recursively on the successors as well, resulting in a list of trees of successors, with the direct successors at the root(s).
- Parameters:
versionId –
transitive –
- Returns:
A list of successors.
getVersion
process
- protected void process(HashMap<String, VersionHistoryItem> historyItems)
After this method call, the version map is available to the object.