eu.etaxonomy.cdm.api.service
Interface IAnnotatableService<T extends AnnotatableEntity>

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

public interface IAnnotatableService<T extends AnnotatableEntity>
extends IVersionableService<T>


Method Summary
 int countMarkers(Class<? extends T> clazz, Boolean technical)
          returns a count of all markers belonging to that clazz, optionally filtered to include only technical or only non-technical markers.
 Pager<Annotation> getAnnotations(T annotatedObj, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          Return a Pager containing Annotation entities belonging to the object supplied, optionally filtered by MarkerType
 Pager<Marker> getMarkers(T annotatableEntity, Boolean technical, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          Returns a Pager containing Marker entities belonging to the object supplied, optionally filtered by whether they are technical or non-technical markers
 List<Object[]> groupMarkers(Class<? extends T> clazz, Boolean technical, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Returns a list of arrays representing counts of entities of type clazz, grouped by their markerTypes.
 
Methods inherited from interface eu.etaxonomy.cdm.api.service.IVersionableService
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
 
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

getAnnotations

Pager<Annotation> getAnnotations(T annotatedObj,
                                 MarkerType status,
                                 Integer pageSize,
                                 Integer pageNumber,
                                 List<OrderHint> orderHints,
                                 List<String> propertyPaths)
Return a Pager containing Annotation entities belonging to the object supplied, optionally filtered by MarkerType

Parameters:
annotatedObj - The object that "owns" the annotations returned
status - Only return annotations which are marked with a Marker of this type (can be null to return all annotations)
pageSize - The maximum number of terms returned (can be null for all annotations)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
orderHints - may be null
propertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
Returns:
a Pager of Annotation entities

getMarkers

Pager<Marker> getMarkers(T annotatableEntity,
                         Boolean technical,
                         Integer pageSize,
                         Integer pageNumber,
                         List<OrderHint> orderHints,
                         List<String> propertyPaths)
Returns a Pager containing Marker entities belonging to the object supplied, optionally filtered by whether they are technical or non-technical markers

Parameters:
annotatableEntity - the entity which is marked
technical - The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
pageSize - The maximum number of markers returned (can be null for all markers)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
orderHints - may be null
propertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
Returns:
a List of Marker instances

groupMarkers

List<Object[]> groupMarkers(Class<? extends T> clazz,
                            Boolean technical,
                            Integer pageSize,
                            Integer pageNumber,
                            List<String> propertyPaths)
Returns a list of arrays representing counts of entities of type clazz, grouped by their markerTypes. The arrays have two elements. The first element is the MarkerType, initialized using the propertyPaths parameter. The second element is the count of all markers of Objects of type clazz with that MarkerType. The boolean technical can be used to choose only technical or only non-technical marker types. The list is sorted by titleCache of the markerType, in ascending order.

Parameters:
clazz - optionally restrict the markers to those belonging to this class
technical - The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
pageSize - The maximum number of arrays returned (can be null for all arrays)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
propertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
Returns:

countMarkers

int countMarkers(Class<? extends T> clazz,
                 Boolean technical)
returns a count of all markers belonging to that clazz, optionally filtered to include only technical or only non-technical markers.

Parameters:
clazz - optionally restrict the markers to those belonging to this class
technical - The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
Returns:
a count of markers


Copyright © 2007-2013 EDIT. All Rights Reserved.