com.arsdigita.versioning
Class HistoryCollection

java.lang.Object
  extended bycom.arsdigita.domain.DomainQuery
      extended bycom.arsdigita.versioning.TransactionCollection
          extended bycom.arsdigita.versioning.HistoryCollection
All Implemented Interfaces:
DataQuery

public class HistoryCollection
extends TransactionCollection

Encapsulates a query that returns all the tagged transactions for an object. This query can be used to render a history window for the object.

Version:
$Revision: #15 $ $Date: 2004/04/07 $
Author:
Stanislav Freidin

Field Summary
static String COMMENT
           
static String DUMMY_ID
           
static BigDecimal DUMMY_ID_VALUE
           
static String EMAIL
           
static String SHOW_CURRENT
           
static String TIMESTAMP
           
static String TRANS
           
static String TRANS_ID
           
 
Fields inherited from class com.arsdigita.domain.DomainQuery
m_dataQuery, versionId
 
Constructor Summary
protected HistoryCollection(DataQuery q)
          Encapsulates the given query.
 
Method Summary
 String getComment()
          Returns the transaction tag, which counts as the comment for the transaction.
static HistoryCollection getHistory(VersionedACSObject obj, boolean showCurrent)
          Retrieve version history for the given object; retrieves all tagged transactions in reverse chronological order
 DataQuery getQuery()
          Get the internal data query; useful for data tables
 Date getTimestamp()
          Returns the creation date of the current version.
 Transaction getTransaction()
          Returns the current transaction.
 BigDecimal getTransactionID()
          Returns the current transaction ID; useful for generating URLs
 String getUserEmail()
          Returns the current user's email.
 BigDecimal getVersion()
          Returns the current version number.
static boolean isDummyID(BigDecimal id)
          Deprecated. with no replacement
 boolean next()
          Moves to the next object in the collection.
 
Methods inherited from class com.arsdigita.domain.DomainQuery
addEqualsFilter, addFilter, addFilter, addInSubqueryFilter, addInSubqueryFilter, addNotEqualsFilter, addNotInSubqueryFilter, addOrder, addOrderWithNull, addPath, alias, clearFilter, clearOrder, close, first, get, getFilterFactory, getParameter, getPosition, getPropertyValues, getType, hasProperty, isAfterLast, isBeforeFirst, isEmpty, isFirst, isLast, last, previous, removeFilter, reset, rewind, setFilter, setOrder, setParameter, setRange, setRange, setReturnsLowerBound, setReturnsUpperBound, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANS_ID

public static final String TRANS_ID
See Also:
Constant Field Values

TRANS

public static final String TRANS
See Also:
Constant Field Values

TIMESTAMP

public static final String TIMESTAMP
See Also:
Constant Field Values

EMAIL

public static final String EMAIL
See Also:
Constant Field Values

COMMENT

public static final String COMMENT
See Also:
Constant Field Values

SHOW_CURRENT

public static final String SHOW_CURRENT
See Also:
Constant Field Values

DUMMY_ID

public static final String DUMMY_ID
See Also:
Constant Field Values

DUMMY_ID_VALUE

public static final BigDecimal DUMMY_ID_VALUE
Constructor Detail

HistoryCollection

protected HistoryCollection(DataQuery q)
Encapsulates the given query.

Method Detail

getHistory

public static HistoryCollection getHistory(VersionedACSObject obj,
                                           boolean showCurrent)
Retrieve version history for the given object; retrieves all tagged transactions in reverse chronological order

Parameters:
obj - the object
showCurrent - true if the draft version of the object should be appended at the end of the history, false otherwise

next

public boolean next()
Description copied from class: DomainQuery
Moves to the next object in the collection.

Specified by:
next in interface DataQuery
Overrides:
next in class DomainQuery
Returns:
true if the new current object is valid; false if there are no more objects
See Also:
DataQuery.next()

getTransaction

public Transaction getTransaction()
Returns the current transaction.

Overrides:
getTransaction in class TransactionCollection

getTransactionID

public BigDecimal getTransactionID()
Returns the current transaction ID; useful for generating URLs


getUserEmail

public String getUserEmail()
Returns the current user's email.


getVersion

public BigDecimal getVersion()
Returns the current version number.


getTimestamp

public Date getTimestamp()
Returns the creation date of the current version.


getComment

public String getComment()
Returns the transaction tag, which counts as the comment for the transaction.


getQuery

public DataQuery getQuery()
Get the internal data query; useful for data tables


isDummyID

public static boolean isDummyID(BigDecimal id)
Deprecated. with no replacement



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC