eu.etaxonomy.cdm.persistence.dao.common
Interface IAnnotatableDao<T extends AnnotatableEntity>

All Superinterfaces:
ICdmEntityDao<T>, IVersionableDao<T>
All Known Subinterfaces:
IAgentDao, IAnnotationDao, IClassificationDao, ICollectionDao, IDefinedTermDao, IDescriptionDao, IDescriptionElementDao, IEventBaseDao, IFeatureTreeDao, IIdentifiableDao<T>, ILanguageStringBaseDao<T>, ILanguageStringDao, IMediaDao, IOccurrenceDao, IPolytomousKeyDao, IReferenceDao, IRepresentationDao, ITaxonDao, ITaxonNameDao, ITaxonNodeDao, ITermVocabularyDao, IWorkingSetDao
All Known Implementing Classes:
AgentDaoImpl, AnnotatableDaoImpl, AnnotationDaoImpl, ClassificationDaoHibernateImpl, CollectionDaoHibernateImpl, DefinedTermDaoImpl, DescriptionDaoImpl, DescriptionElementDaoImpl, EventBaseDaoImpl, FeatureTreeDaoImpl, IdentifiableDaoBase, LanguageStringBaseDaoImpl, LanguageStringDaoImpl, MediaDaoHibernateImpl, OccurrenceDaoHibernateImpl, PolytomousKeyDaoImpl, ReferenceDaoHibernateImpl, RepresentationDaoImpl, TaxonDaoHibernateImpl, TaxonNameDaoHibernateImpl, TaxonNodeDaoHibernateImpl, TermVocabularyDaoImpl, WorkingSetDao

public interface IAnnotatableDao<T extends AnnotatableEntity>
extends IVersionableDao<T>

Version:
1.0
Author:
n.hoffmann

Method Summary
 int countAnnotations(T annotatableEntity, MarkerType status)
          Returns a count of Annotations belonging to the supplied AnnotatableEntity
 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.
 int countMarkers(T annotatableEntity, Boolean technical)
          Returns a count of Markers belonging to the supplied AnnotatableEntity
 List<Annotation> getAnnotations(T annotatableEntity, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          Returns a List of Annotations belonging to the supplied AnnotatableEntity
 List<Marker> getMarkers(T annotatableEntity, Boolean technical, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
           
 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.persistence.dao.common.IVersionableDao
countAuditEvents, countAuditEvents, getAuditEvents, getAuditEvents, getNextAuditEvent, getPreviousAuditEvent
 
Methods inherited from interface eu.etaxonomy.cdm.persistence.dao.common.ICdmEntityDao
clear, count, count, count, delete, exists, findById, findByUuid, flush, getSession, getType, group, list, list, list, list, list, list, list, listByIds, load, load, load, lock, merge, refresh, refresh, replace, rows, save, saveAll, saveOrUpdate, saveOrUpdateAll, update
 

Method Detail

getAnnotations

List<Annotation> getAnnotations(T annotatableEntity,
                                MarkerType status,
                                Integer pageSize,
                                Integer pageNumber,
                                List<OrderHint> orderHints,
                                List<String> propertyPaths)
Returns a List of Annotations belonging to the supplied AnnotatableEntity

Parameters:
annotatableEntity - the entity which is annotated
status - The status of the annotations (null to return annotations regardless of status)
pageSize - The maximum number of annotations 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 List of Annotation instances

countAnnotations

int countAnnotations(T annotatableEntity,
                     MarkerType status)
Returns a count of Annotations belonging to the supplied AnnotatableEntity

Parameters:
annotatableEntity - the entity which is annotated
status - The status of the annotations (null to count all annotations regardless of status)
Returns:
a count of Annotation instances

countMarkers

int countMarkers(T annotatableEntity,
                 Boolean technical)
Returns a count of Markers belonging to the supplied AnnotatableEntity

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)
Returns:
a count of Marker instances

getMarkers

List<Marker> getMarkers(T annotatableEntity,
                        Boolean technical,
                        Integer pageSize,
                        Integer pageNumber,
                        List<OrderHint> orderHints,
                        List<String> propertyPaths)
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.