Package ubic.gemma.persistence.service
Class AbstractCriteriaFilteringVoEnabledDao<O extends Identifiable,VO extends IdentifiableValueObject<O>>
java.lang.Object
ubic.gemma.persistence.service.AbstractDao<O>
ubic.gemma.persistence.service.AbstractVoEnabledDao<O,VO>
ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao<O,VO>
ubic.gemma.persistence.service.AbstractCriteriaFilteringVoEnabledDao<O,VO>
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,BaseDao<O>
,BaseVoEnabledDao<O,
,VO> FilteringDao<O>
,FilteringVoEnabledDao<O,
VO>
- Direct Known Subclasses:
ExpressionAnalysisResultSetDaoImpl
,QuantitationTypeDaoImpl
public abstract class AbstractCriteriaFilteringVoEnabledDao<O extends Identifiable,VO extends IdentifiableValueObject<O>>
extends AbstractFilteringVoEnabledDao<O,VO>
Partial implementation of
FilteringVoEnabledDao
based on the Hibernate Criteria
API.- Author:
- poirigui
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer, AbstractFilteringVoEnabledDao.FilterablePropertyMeta
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
REPORT_SLOW_QUERY_AFTER_MS
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
log
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractCriteriaFilteringVoEnabledDao
(Class<? extends O> elementClass, SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
long
Count VOs matching the given filters.getFilterablePropertyMeta
(String propertyName) protected Criteria
getFilteringCriteria
(Filters filters) Obtain aCriteria
for loading VOs.Load entities matching the given filters.Load a slice of entities matching the given filters.Load IDs of entities matching the given filters.loadValueObjects
(Filters filters, Sort sort) Load VOs with minimal ordering and filtering.loadValueObjects
(Filters filters, Sort sort, int offset, int limit) Load VOs with ordering, filtering and offset/limit.Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
configureFilterableProperties, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyMeta, getFilterablePropertyType, getSort
Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObject, doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds, postProcessValueObjects
Methods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, create, find, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, remove, save, save, streamAll, streamAll, streamQuery, update, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, create, find, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, remove, save, save, streamAll, streamAll, update, update
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Constructor Details
-
AbstractCriteriaFilteringVoEnabledDao
protected AbstractCriteriaFilteringVoEnabledDao(Class<? extends O> elementClass, SessionFactory sessionFactory)
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classAbstractFilteringVoEnabledDao<O extends Identifiable,
VO extends IdentifiableValueObject<O>>
-
getFilteringCriteria
Obtain aCriteria
for loading VOs.- See Also:
-
loadIds
Description copied from interface:FilteringDao
Load IDs of entities matching the given filters. -
load
Description copied from interface:FilteringDao
Load entities matching the given filters. -
load
Description copied from interface:FilteringDao
Load a slice of entities matching the given filters. -
loadValueObjects
public Slice<VO> loadValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit) Description copied from interface:FilteringVoEnabledDao
Load VOs with ordering, filtering and offset/limit.Consider using
FilteringDao.getFilter(String, Filter.Operator, String)
andFilteringDao.getSort(String, Sort.Direction, Sort.NullMode)
to produce the filters and sort safely from user input.- Parameters:
filters
- filters applied on the search. The properties mentioned in theFilter
must exist and be visible to Hibernate. You can use nested properties such as "curationDetails.lastUpdated".sort
- an object property and direction to order by. This property must exist and be visible to Hibernate. You can use nested properties such as "curationDetails.lastUpdated".offset
- an offset from which entities are retrieved when sorted according to the sort argument, or 0 to ignorelimit
- a limit on the number of returned results, or -1 to ignore- Returns:
- a slice of the relevant data
- See Also:
-
loadValueObjects
Description copied from interface:FilteringVoEnabledDao
Load VOs with minimal ordering and filtering.Use this as an alternative to
FilteringVoEnabledDao.loadValueObjects(Filters, Sort, int, int)
if you do not intend to provide pagination capabilities.- See Also:
-
count
Description copied from interface:FilteringDao
Count VOs matching the given filters. -
getFilterablePropertyMeta
protected AbstractFilteringVoEnabledDao.FilterablePropertyMeta getFilterablePropertyMeta(String propertyName) throws IllegalArgumentException Description copied from class:AbstractFilteringVoEnabledDao
Obtain various meta-information used to infer what to use in aFilter
orSort
.This is used by
AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, String)
andFilteringDao.getSort(String, Sort.Direction, Sort.NullMode)
.- Overrides:
getFilterablePropertyMeta
in classAbstractFilteringVoEnabledDao<O extends Identifiable,
VO extends IdentifiableValueObject<O>> - Throws:
IllegalArgumentException
- if no such propertyName exists inAbstractFilteringVoEnabledDao
- See Also:
-