Save This Page
Home » hibernate-core-src-20081106 » org.hibernate.envers » [javadoc | source]
org.hibernate.envers
public interface: AuditReader [javadoc | source]

All Known Implementing Classes:
    AuditReaderImpl, VersionsReader, AuditReaderImplementor

Method from org.hibernate.envers.AuditReader Summary:
createQuery,   find,   findRevision,   getRevisionDate,   getRevisionNumberForDate,   getRevisions
Method from org.hibernate.envers.AuditReader Detail:
 public AuditQueryCreator createQuery()
 public T find(Class cls,
    Object primaryKey,
    Number revision) throws IllegalArgumentException, NotAuditedException, IllegalStateException
    Find an entity by primary key at the given revision.
 public T findRevision(Class revisionEntityClass,
    Number revision) throws IllegalArgumentException, RevisionDoesNotExistException, IllegalStateException
    A helper method; should be used only if a custom revision entity is used. See also RevisionEntity .
 public Date getRevisionDate(Number revision) throws IllegalArgumentException, RevisionDoesNotExistException, IllegalStateException
    Get the date, at which a revision was created.
 public Number getRevisionNumberForDate(Date date) throws IllegalArgumentException, RevisionDoesNotExistException, IllegalStateException
    Gets the revision number, that corresponds to the given date. More precisely, returns the number of the highest revision, which was created on or before the given date. So: getRevisionDate(getRevisionNumberForDate(date)) <= date and getRevisionDate(getRevisionNumberForDate(date)+1) > date.
 public List getRevisions(Class cls,
    Object primaryKey) throws IllegalArgumentException, NotAuditedException, IllegalStateException
    Get a list of revision numbers, at which an entity was modified.