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_MSFields inherited from class ubic.gemma.persistence.service.AbstractDao
log -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCriteriaFilteringVoEnabledDao(Class<? extends O> elementClass, SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidlongCount VOs matching the given filters.protected CriteriagetFilteringCriteria(Filters filters) Obtain aCriteriafor 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.resolveFilterablePropertyMeta(String propertyName) Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
configureFilterableProperties, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyMeta, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, resolveFilterablePropertyMetaMethods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObject, doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds, postProcessValueObjectsMethods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, create, find, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getEntityName, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, remove, save, save, streamAll, streamAll, streamQuery, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, create, find, findOrCreate, getElementClass, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, remove, save, save, streamAll, streamAll, update, updateMethods 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:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractFilteringVoEnabledDao<O extends Identifiable,VO extends IdentifiableValueObject<O>>
-
getFilteringCriteria
Obtain aCriteriafor loading VOs.- See Also:
-
loadIds
Description copied from interface:FilteringDaoLoad IDs of entities matching the given filters. -
load
Description copied from interface:FilteringDaoLoad entities matching the given filters. -
load
Description copied from interface:FilteringDaoLoad 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:FilteringVoEnabledDaoLoad 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 theFiltermust 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:FilteringVoEnabledDaoLoad 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:FilteringDaoCount VOs matching the given filters. -
resolveFilterablePropertyMeta
protected AbstractFilteringVoEnabledDao.FilterablePropertyMeta.FilterablePropertyMetaBuilder resolveFilterablePropertyMeta(String propertyName) throws IllegalArgumentException Description copied from class:AbstractFilteringVoEnabledDaoObtain various meta-information used to infer what to use in aFilterorSort.This is used by
AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, String)andFilteringDao.getSort(String, Sort.Direction, Sort.NullMode).- Overrides:
resolveFilterablePropertyMetain classAbstractFilteringVoEnabledDao<O extends Identifiable,VO extends IdentifiableValueObject<O>> - Throws:
IllegalArgumentException- if no such propertyName exists inAbstractFilteringVoEnabledDao- See Also:
-