eu.etaxonomy.cdm.api.service
Class AnnotatableServiceBase<T extends AnnotatableEntity,DAO extends IAnnotatableDao<T>>
java.lang.Object
eu.etaxonomy.cdm.api.service.ServiceBase<T,DAO>
eu.etaxonomy.cdm.api.service.VersionableServiceBase<T,DAO>
eu.etaxonomy.cdm.api.service.AnnotatableServiceBase<T,DAO>
- All Implemented Interfaces:
- IAnnotatableService<T>, IService<T>, IVersionableService<T>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
- AnnotationService, EventBaseServiceImpl, IdentifiableServiceBase, TaxonNodeServiceImpl, WorkingSetService
public abstract class AnnotatableServiceBase<T extends AnnotatableEntity,DAO extends IAnnotatableDao<T>>
- extends VersionableServiceBase<T,DAO>
- implements IAnnotatableService<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 class eu.etaxonomy.cdm.api.service.ServiceBase |
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, setApplicationContext, setDao, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 |
AnnotatableServiceBase
public AnnotatableServiceBase()
getAnnotations
@Transactional(readOnly=true)
public Pager<Annotation> getAnnotations(T annotatedObj,
MarkerType status,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
- Description copied from interface:
IAnnotatableService
- Return a Pager containing Annotation entities belonging to the object supplied, optionally
filtered by MarkerType
- Specified by:
getAnnotations in interface IAnnotatableService<T extends AnnotatableEntity>
- Parameters:
annotatedObj - The object that "owns" the annotations returnedstatus - 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 nullpropertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
- Returns:
- a Pager of Annotation entities
getMarkers
@Transactional(readOnly=true)
public Pager<Marker> getMarkers(T annotatableEntity,
Boolean technical,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
- Description copied from interface:
IAnnotatableService
- Returns a Pager containing Marker entities belonging to the object supplied, optionally filtered by
whether they are technical or non-technical markers
- Specified by:
getMarkers in interface IAnnotatableService<T extends AnnotatableEntity>
- Parameters:
annotatableEntity - the entity which is markedtechnical - 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 nullpropertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
- Returns:
- a List of Marker instances
groupMarkers
@Transactional(readOnly=true)
public List<Object[]> groupMarkers(Class<? extends T> clazz,
Boolean technical,
Integer pageSize,
Integer pageNumber,
List<String> propertyPaths)
- Description copied from interface:
IAnnotatableService
- 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.
- Specified by:
groupMarkers in interface IAnnotatableService<T extends AnnotatableEntity>
- Parameters:
clazz - optionally restrict the markers to those belonging to this classtechnical - 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
@Transactional(readOnly=true)
public int countMarkers(Class<? extends T> clazz,
Boolean technical)
- Description copied from interface:
IAnnotatableService
- returns a count of all markers belonging to that clazz, optionally filtered to include only technical or only non-technical markers.
- Specified by:
countMarkers in interface IAnnotatableService<T extends AnnotatableEntity>
- Parameters:
clazz - optionally restrict the markers to those belonging to this classtechnical - 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.