.. java:import:: java.util HashMap .. java:import:: java.util LinkedList .. java:import:: java.util List .. java:import:: org.apache.commons.jcs.access.behavior ICacheAccess .. java:import:: org.caosdb.server.caching Cache .. java:import:: org.caosdb.server.database CacheableBackendTransaction .. java:import:: org.caosdb.server.database.backend.interfaces RetrieveVersionHistoryImpl .. java:import:: org.caosdb.server.database.exceptions TransactionException .. java:import:: org.caosdb.server.database.proto VersionHistoryItem .. java:import:: org.caosdb.server.entity EntityID .. java:import:: org.caosdb.server.entity EntityInterface .. java:import:: org.caosdb.server.entity Version VersionTransaction ================== .. java:package:: org.caosdb.server.database.backend.transaction :noindex: .. java:type:: public abstract class VersionTransaction extends CacheableBackendTransaction> 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 \ :java:ref:`RetrieveVersionInfo`\ ) or the complete history as a tree (see \ :java:ref:`RetrieveVersionHistory`\ ) :author: Timm Fitschen (t.fitschen@indiscale.com) Constructors ------------ VersionTransaction ^^^^^^^^^^^^^^^^^^ .. java:constructor:: public VersionTransaction(EntityInterface e) :outertype: VersionTransaction Methods ------- executeNoCache ^^^^^^^^^^^^^^ .. java:method:: @Override public HashMap executeNoCache() throws TransactionException :outertype: VersionTransaction getEntity ^^^^^^^^^ .. java:method:: public EntityInterface getEntity() :outertype: VersionTransaction getHistoryItems ^^^^^^^^^^^^^^^ .. java:method:: public HashMap getHistoryItems() :outertype: VersionTransaction getKey ^^^^^^ .. java:method:: @Override protected EntityID getKey() :outertype: VersionTransaction getPredecessors ^^^^^^^^^^^^^^^ .. java:method:: protected List getPredecessors(String versionId, boolean transitive) :outertype: VersionTransaction Return a list of direct predecessors. The predecessors are constructed by \ :java:ref:`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). :param versionId: :param transitive: :return: A list of predecessors. getSuccessors ^^^^^^^^^^^^^ .. java:method:: protected List getSuccessors(String versionId, boolean transitive) :outertype: VersionTransaction Return a list of direct successors. The successors are constructed by \ :java:ref:`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). :param versionId: :param transitive: :return: A list of successors. getVersion ^^^^^^^^^^ .. java:method:: protected abstract Version getVersion(String versionId) :outertype: VersionTransaction To be implemented by the base class. The idea is, that the base class decides which information is being included into the Version instance. :param versionId: - the id of the version process ^^^^^^^ .. java:method:: @Override protected void process(HashMap historyItems) throws TransactionException :outertype: VersionTransaction After this method call, the version map is available to the object. removeCached ^^^^^^^^^^^^ .. java:method:: public static void removeCached(EntityID entityId) :outertype: VersionTransaction Invalidate a cache item. This should be called upon update of entities. :param entityId: