Package ubic.gemma.persistence.service
Class AbstractFilteringVoEnabledService<O extends Identifiable,VO extends IdentifiableValueObject<O>>
java.lang.Object
ubic.gemma.persistence.service.AbstractService<O>
ubic.gemma.persistence.service.AbstractFilteringVoEnabledService<O,VO>
- All Implemented Interfaces:
BaseImmutableService<O>
,BaseReadOnlyService<O>
,BaseService<O>
,BaseVoEnabledService<O,
,VO> FilteringService<O>
,FilteringVoEnabledService<O,
VO>
- Direct Known Subclasses:
ArrayDesignServiceImpl
,BioAssayServiceImpl
,CharacteristicServiceImpl
,CompositeSequenceServiceImpl
,DatabaseEntryServiceImpl
,ExpressionAnalysisResultSetServiceImpl
,ExpressionExperimentServiceImpl
,FactorValueServiceImpl
,GeneServiceImpl
,QuantitationTypeServiceImpl
,TaxonServiceImpl
public abstract class AbstractFilteringVoEnabledService<O extends Identifiable,VO extends IdentifiableValueObject<O>>
extends AbstractService<O>
implements FilteringVoEnabledService<O,VO>, BaseService<O>
Base implementation for
FilteringVoEnabledService
.-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionlong
<T> Filter
getFilter
(String property, Class<T> propertyType, Filter.Operator operator, Collection<T> values) <T> Filter
getFilter
(String property, Class<T> propertyType, Filter.Operator operator, T value) getFilter
(String property, Filter.Operator operator, String value) getFilter
(String property, Filter.Operator operator, String value, SubqueryMode subqueryMode) getFilter
(String property, Filter.Operator operator, Collection<String> values) getFilter
(String property, Filter.Operator operator, Collection<String> values, SubqueryMode subqueryMode) getFilterablePropertyAllowedValues
(String property) Collection
<org.springframework.security.access.ConfigAttribute> getFilterablePropertyConfigAttributes
(String property) Obtain the Spring Security config attributes for a given property.getFilterablePropertyDescription
(String property) boolean
getFilterablePropertyIsUsingSubquery
(String property) List
<org.springframework.context.MessageSourceResolvable> Obtain a list of resolvableMessageSourceResolvable
s to be used for user display purposes.Class
<?> getFilterablePropertyType
(String property) getSort
(String property, Sort.Direction direction, Sort.NullMode nullMode) Loads value objects representing all the entities of specific type.loadValueObject
(O entity) loadValueObjectById
(Long entityId) loadValueObjects
(Collection<O> entities) Loads value objects for all given entities.loadValueObjects
(Filters filters, Sort sort) loadValueObjects
(Filters filters, Sort sort, int offset, int limit) loadValueObjectsByIds
(Collection<Long> entityIds) Load value objects by a given collection of IDs.Methods inherited from class ubic.gemma.persistence.service.AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, remove, remove, remove, save, save, streamAll, streamAll, 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.BaseImmutableService
create, create, findOrCreate, remove, remove, remove
Methods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, find, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAll
Methods inherited from interface ubic.gemma.persistence.service.BaseService
save, save, update, update
-
Constructor Details
-
AbstractFilteringVoEnabledService
-
-
Method Details
-
getIdentifierPropertyName
- Specified by:
getIdentifierPropertyName
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
loadIds
@Transactional(readOnly=true) public List<Long> loadIds(@Nullable Filters filters, @Nullable Sort sort) - Specified by:
loadIds
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
load
- Specified by:
load
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
load
@Transactional(readOnly=true) public Slice<O> load(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit) - Specified by:
load
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
loadValueObject
- Specified by:
loadValueObject
in interfaceBaseVoEnabledService<O extends Identifiable,
VO extends IdentifiableValueObject<O>> - See Also:
-
loadValueObjectById
- Specified by:
loadValueObjectById
in interfaceBaseVoEnabledService<O extends Identifiable,
VO extends IdentifiableValueObject<O>> - See Also:
-
loadValueObjects
Description copied from interface:BaseVoEnabledService
Loads value objects for all given entities.- Specified by:
loadValueObjects
in interfaceBaseVoEnabledService<O extends Identifiable,
VO extends IdentifiableValueObject<O>> - Parameters:
entities
- the entities to be converted to value objects- Returns:
- a collection of value objects representing he given entities.
-
loadValueObjectsByIds
Description copied from interface:BaseVoEnabledService
Load value objects by a given collection of IDs.- Specified by:
loadValueObjectsByIds
in interfaceBaseVoEnabledService<O extends Identifiable,
VO extends IdentifiableValueObject<O>>
-
loadAllValueObjects
Description copied from interface:BaseVoEnabledService
Loads value objects representing all the entities of specific type.- Specified by:
loadAllValueObjects
in interfaceBaseVoEnabledService<O extends Identifiable,
VO extends IdentifiableValueObject<O>> - Returns:
- a collection of value objects
-
loadValueObjects
@Transactional(readOnly=true) public Slice<VO> loadValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit) - Specified by:
loadValueObjects
in interfaceFilteringVoEnabledService<O extends Identifiable,
VO extends IdentifiableValueObject<O>> - See Also:
-
loadValueObjects
@Transactional(readOnly=true) public List<VO> loadValueObjects(@Nullable Filters filters, @Nullable Sort sort) - Specified by:
loadValueObjects
in interfaceFilteringVoEnabledService<O extends Identifiable,
VO extends IdentifiableValueObject<O>> - See Also:
-
count
- Specified by:
count
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getFilterableProperties
- Specified by:
getFilterableProperties
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getFilterablePropertyType
- Specified by:
getFilterablePropertyType
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getFilterablePropertyDescription
- Specified by:
getFilterablePropertyDescription
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getFilterablePropertyAllowedValues
- Specified by:
getFilterablePropertyAllowedValues
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getFilterablePropertyResolvableAllowedValuesLabels
@Nullable public List<org.springframework.context.MessageSourceResolvable> getFilterablePropertyResolvableAllowedValuesLabels(String p) Description copied from interface:FilteringService
Obtain a list of resolvableMessageSourceResolvable
s to be used for user display purposes.Nullity and the number of elements is guaranteed to match
FilteringService.getFilterablePropertyAllowedValues(String)
(String)}, so the two methods can be used jointly.- Specified by:
getFilterablePropertyResolvableAllowedValuesLabels
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getFilterablePropertyIsUsingSubquery
- Specified by:
getFilterablePropertyIsUsingSubquery
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getFilterablePropertyConfigAttributes
@Nullable public Collection<org.springframework.security.access.ConfigAttribute> getFilterablePropertyConfigAttributes(String property) Description copied from interface:FilteringService
Obtain the Spring Security config attributes for a given property.- Specified by:
getFilterablePropertyConfigAttributes
in interfaceFilteringService<O extends Identifiable>
- Returns:
- the config attributes, or null if no security check should be performed
-
getFilter
public Filter getFilter(String property, Filter.Operator operator, String value) throws IllegalArgumentException - Specified by:
getFilter
in interfaceFilteringService<O extends Identifiable>
- Throws:
IllegalArgumentException
- See Also:
-
getFilter
public Filter getFilter(String property, Filter.Operator operator, String value, SubqueryMode subqueryMode) throws IllegalArgumentException - Specified by:
getFilter
in interfaceFilteringService<O extends Identifiable>
- Throws:
IllegalArgumentException
-
getFilter
public Filter getFilter(String property, Filter.Operator operator, Collection<String> values) throws IllegalArgumentException - Specified by:
getFilter
in interfaceFilteringService<O extends Identifiable>
- Throws:
IllegalArgumentException
- See Also:
-
getFilter
public Filter getFilter(String property, Filter.Operator operator, Collection<String> values, SubqueryMode subqueryMode) throws IllegalArgumentException - Specified by:
getFilter
in interfaceFilteringService<O extends Identifiable>
- Throws:
IllegalArgumentException
-
getFilter
public <T> Filter getFilter(String property, Class<T> propertyType, Filter.Operator operator, T value) - Specified by:
getFilter
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getFilter
public <T> Filter getFilter(String property, Class<T> propertyType, Filter.Operator operator, Collection<T> values) - Specified by:
getFilter
in interfaceFilteringService<O extends Identifiable>
- See Also:
-
getSort
public Sort getSort(String property, @Nullable Sort.Direction direction, Sort.NullMode nullMode) throws IllegalArgumentException - Specified by:
getSort
in interfaceFilteringService<O extends Identifiable>
- Throws:
IllegalArgumentException
- See Also:
-