eu.etaxonomy.cdm.api.service
Interface IVersionableService<T extends VersionableEntity>

All Superinterfaces:
IService<T>
All Known Subinterfaces:
IAgentService, IAnnotatableService<T>, IAnnotationService, IClassificationService, ICollectionService, IDescriptionService, IEventBaseService, IFeatureNodeService, IFeatureTreeService, IIdentifiableEntityService<T>, IMarkerService, IMediaService, INameService, IOccurrenceService, IPolytomousKeyNodeService, IPolytomousKeyService, IReferenceService, ITaxonNodeService, ITaxonService, ITermService, IVocabularyService, IWorkingSetService
All Known Implementing Classes:
AgentServiceImpl, AnnotatableServiceBase, AnnotationService, ClassificationServiceImpl, CollectionServiceImpl, DescriptionServiceImpl, EventBaseServiceImpl, FeatureNodeServiceImpl, FeatureTreeServiceImpl, IdentifiableServiceBase, MarkerServiceImpl, MediaServiceImpl, NameServiceImpl, OccurrenceServiceImpl, PolytomousKeyNodeServiceImpl, PolytomousKeyServiceImpl, ReferenceServiceImpl, TaxonNodeServiceImpl, TaxonServiceImpl, TermServiceImpl, VersionableServiceBase, VocabularyServiceImpl, WorkingSetService

public interface IVersionableService<T extends VersionableEntity>
extends IService<T>


Method Summary
 AuditEventRecord<T> getNextAuditEvent(T t)
          A convenience method which returns a record of the next (relative to the audit event in context) audit event to affect the entity t.
 AuditEventRecord<T> getPreviousAuditEvent(T t)
          A convenience method which returns a record of the previous (relative to the audit event in context) audit event to affect the entity t.
 Pager<AuditEventRecord<T>> pageAuditEvents(Class<? extends T> clazz, AuditEvent from, AuditEvent to, List<org.hibernate.envers.query.criteria.AuditCriterion> criteria, Integer pageSize, Integer pageValue, AuditEventSort sort, List<String> propertyPaths)
          Returns a list of all audit events occurring to objects of type T, optionally restricted to objects of type clazz between the AuditEvents from and to, inclusive, optionally filtered by other criteria
 Pager<AuditEventRecord<T>> pageAuditEvents(T t, Integer pageSize, Integer pageNumber, AuditEventSort sort, List<String> propertyPaths)
          Returns a paged list of audit events (in order) which affected the state of an entity t.
 
Methods inherited from interface eu.etaxonomy.cdm.api.service.IService
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, update
 

Method Detail

pageAuditEvents

Pager<AuditEventRecord<T>> pageAuditEvents(T t,
                                           Integer pageSize,
                                           Integer pageNumber,
                                           AuditEventSort sort,
                                           List<String> propertyPaths)
Returns a paged list of audit events (in order) which affected the state of an entity t. The events returned either start at the AuditEvent in context and go forward in time (AuditEventSort.FORWARDS) or backwards in time (AuditEventSort.BACKWARDS). If the AuditEventContext is set to null, or to AuditEvent.CURRENT_VIEW, then all relevant AuditEvents are returned.

Parameters:
t -
pageSize -
pageNumber -
sort -
propertyPaths - paths initialized on the returned objects - only applied to the objects returned from the first grouping
Returns:
a Pager containing audit event instances, plus metadata

getNextAuditEvent

AuditEventRecord<T> getNextAuditEvent(T t)
A convenience method which returns a record of the next (relative to the audit event in context) audit event to affect the entity t.

Parameters:
t - The versionable entity affected by these audit events
Returns:
a record of the next audit event to affect t, or null if the current event is the last to affect t

getPreviousAuditEvent

AuditEventRecord<T> getPreviousAuditEvent(T t)
A convenience method which returns a record of the previous (relative to the audit event in context) audit event to affect the entity t.

Parameters:
t - The versionable entity affected by these audit events
Returns:
a record of the previous audit event to affect t, or null if the current event is the first to affect t

pageAuditEvents

Pager<AuditEventRecord<T>> pageAuditEvents(Class<? extends T> clazz,
                                           AuditEvent from,
                                           AuditEvent to,
                                           List<org.hibernate.envers.query.criteria.AuditCriterion> criteria,
                                           Integer pageSize,
                                           Integer pageValue,
                                           AuditEventSort sort,
                                           List<String> propertyPaths)
Returns a list of all audit events occurring to objects of type T, optionally restricted to objects of type clazz between the AuditEvents from and to, inclusive, optionally filtered by other criteria

Parameters:
clazz - Restrict the results returned to objects of this class
from - The audit event to start from (inclusive, or pass null to start from the beginning of the recordset)
to - The audit event to continue until (exclusive, or pass null to return audit events up to the time of the query)
criteria - Extra criteria to filter by
pageSize - The maximum number of objects returned (can be null for all matching objects)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based, can be null, equivalent of starting at the beginning of the recordset)
sort - Sort the events either forwards or backwards in time
propertyPaths - properties to be initialized
Returns:


Copyright © 2007-2013 EDIT. All Rights Reserved.