Class CharacteristicServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<Characteristic>
ubic.gemma.persistence.service.AbstractFilteringVoEnabledService<Characteristic,CharacteristicValueObject>
ubic.gemma.persistence.service.common.description.CharacteristicServiceImpl
- All Implemented Interfaces:
BaseImmutableService<Characteristic>
,BaseReadOnlyService<Characteristic>
,BaseService<Characteristic>
,BaseVoEnabledService<Characteristic,
,CharacteristicValueObject> CharacteristicService
,FilteringService<Characteristic>
,FilteringVoEnabledService<Characteristic,
CharacteristicValueObject>
@Service
public class CharacteristicServiceImpl
extends AbstractFilteringVoEnabledService<Characteristic,CharacteristicValueObject>
implements CharacteristicService
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
Constructor Summary
ConstructorsConstructorDescriptionCharacteristicServiceImpl
(CharacteristicDao characteristicDao, StatementDao statementDao) -
Method Summary
Modifier and TypeMethodDescriptionbrowse
(int start, int limit) Browse through the characteristics, excluding GO annotations.Browse through the characteristics, excluding GO annotations.countByValueUri
(Collection<String> uris, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents) findBestByUri
(String uri) Find the best possible characteristic for a given URI.Collection
<? extends Characteristic> findByAnyUri
(String uri) Find a characteristic or statement by any URI it contains including its category, value, predicates and objects.Collection
<? extends Characteristic> findByAnyValue
(String value) Find a characteristic by any value it contains including its category, value, predicates and objects.Collection
<? extends Characteristic> findByAnyValueStartingWith
(String value) Find a characteristic by any value it contains including its category, value, predicates and objects that starts with the given query.findByCategoryStartingWith
(String query, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) findByCategoryUri
(String query, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) findByObject
(String value) findByObjectUri
(String uri) findByParentClasses
(Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, String category, int maxResults) Find characteristics that have a particular parent class or lack thereof.findByPredicate
(String value) findByPredicateUri
(String uri) findByUri
(String uri, String category, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Looks for an exact match of the give string to a valueUri in the characteristic databasefindByValueLike
(String search, String category, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Returns a collection of characteristics that have a value matching the given SQLLIKE
pattern.findByValueStartingWith
(String search, String category, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Returns a collection of characteristics that have a value starting with the given string.findByValueUriOrValueStartingWith
(String search, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents) Find characteristics that have a value (prefix) or value URI (exact match) matching the given string.Map
<Class<? extends Identifiable>, Map<String, Set<ExpressionExperiment>>> findExperimentsByUris
(Collection<String> uris, Taxon taxon, int limit, boolean loadEEs, boolean rankByLevel) getParents
(Collection<Characteristic> characteristics, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, boolean thawParents) Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledService
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getIdentifierPropertyName, getSort, load, load, loadAllValueObjects, loadIds, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjects, loadValueObjects, loadValueObjectsByIds
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, findOrCreate, 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
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
Methods inherited from interface ubic.gemma.persistence.service.common.description.CharacteristicService
create, remove, remove
Methods inherited from interface ubic.gemma.persistence.service.FilteringService
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getIdentifierPropertyName, getSort, load, load, loadIds
Methods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledService
loadValueObjects, loadValueObjects
-
Constructor Details
-
CharacteristicServiceImpl
@Autowired public CharacteristicServiceImpl(CharacteristicDao characteristicDao, StatementDao statementDao)
-
-
Method Details
-
browse
Description copied from interface:CharacteristicService
Browse through the characteristics, excluding GO annotations.- Specified by:
browse
in interfaceCharacteristicService
- Parameters:
start
- How far into the list to startlimit
- Maximum records to retrieve- Returns:
- characteristics
-
browse
@Transactional(readOnly=true) public List<Characteristic> browse(int start, int limit, String sortField, boolean descending) Description copied from interface:CharacteristicService
Browse through the characteristics, excluding GO annotations.- Specified by:
browse
in interfaceCharacteristicService
- Parameters:
start
- How far into the list to startlimit
- Maximum records to retrievesortField
- sort fielddescending
- sor order- Returns:
- characteristics
-
findExperimentsByUris
@Transactional(readOnly=true) public Map<Class<? extends Identifiable>,Map<String, findExperimentsByUrisSet<ExpressionExperiment>>> (Collection<String> uris, @Nullable Taxon taxon, int limit, boolean loadEEs, boolean rankByLevel) - Specified by:
findExperimentsByUris
in interfaceCharacteristicService
- See Also:
-
findByParentClasses
@Transactional(readOnly=true) public Collection<Characteristic> findByParentClasses(@Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, @Nullable String category, int maxResults) Description copied from interface:CharacteristicService
Find characteristics that have a particular parent class or lack thereof.- Specified by:
findByParentClasses
in interfaceCharacteristicService
-
findByUri
@Transactional(readOnly=true) public Collection<Characteristic> findByUri(String uri, @Nullable String category, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Description copied from interface:CharacteristicService
Looks for an exact match of the give string to a valueUri in the characteristic database- Specified by:
findByUri
in interfaceCharacteristicService
-
findBestByUri
Description copied from interface:CharacteristicService
Find the best possible characteristic for a given URI.- Specified by:
findBestByUri
in interfaceCharacteristicService
-
findByValueStartingWith
@Transactional(readOnly=true) public Collection<Characteristic> findByValueStartingWith(String search, @Nullable String category, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Description copied from interface:CharacteristicService
Returns a collection of characteristics that have a value starting with the given string.The value is usually a human-readable form of the termURI. SQL
LIKE
patterns are escaped. UseCharacteristicService.findByValueLike(String, String, Collection, boolean, int)
to do wildcard searches instead.- Specified by:
findByValueStartingWith
in interfaceCharacteristicService
-
findByValueLike
@Transactional(readOnly=true) public Collection<Characteristic> findByValueLike(String search, @Nullable String category, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Description copied from interface:CharacteristicService
Returns a collection of characteristics that have a value matching the given SQLLIKE
pattern.- Specified by:
findByValueLike
in interfaceCharacteristicService
-
findByValueUriOrValueStartingWith
@Transactional(readOnly=true) public Map<String,Characteristic> findByValueUriOrValueStartingWith(String search, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents) Description copied from interface:CharacteristicService
Find characteristics that have a value (prefix) or value URI (exact match) matching the given string.- Specified by:
findByValueUriOrValueStartingWith
in interfaceCharacteristicService
- Parameters:
parentClasses
- if not null, restrict to characteristics that have parents of the given classes.includeNoParents
- if true, include characteristics that have no parents.- See Also:
-
countByValueUri
@Transactional(readOnly=true) public Map<String,Long> countByValueUri(Collection<String> uris, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents) - Specified by:
countByValueUri
in interfaceCharacteristicService
-
getParents
@Transactional(readOnly=true) public Map<Characteristic,Identifiable> getParents(Collection<Characteristic> characteristics, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, boolean thawParents) - Specified by:
getParents
in interfaceCharacteristicService
- Parameters:
thawParents
- if true, the parents will be initialized if they are proxies- See Also:
-
findByCategoryStartingWith
@Transactional(readOnly=true) public Collection<Characteristic> findByCategoryStartingWith(String query, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) - Specified by:
findByCategoryStartingWith
in interfaceCharacteristicService
-
findByCategoryUri
@Transactional(readOnly=true) public Collection<Characteristic> findByCategoryUri(String query, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) - Specified by:
findByCategoryUri
in interfaceCharacteristicService
-
findByAnyValue
@Transactional(readOnly=true) public Collection<? extends Characteristic> findByAnyValue(String value) Description copied from interface:CharacteristicService
Find a characteristic by any value it contains including its category, value, predicates and objects.- Specified by:
findByAnyValue
in interfaceCharacteristicService
-
findByAnyValueStartingWith
@Transactional(readOnly=true) public Collection<? extends Characteristic> findByAnyValueStartingWith(String value) Description copied from interface:CharacteristicService
Find a characteristic by any value it contains including its category, value, predicates and objects that starts with the given query.- Specified by:
findByAnyValueStartingWith
in interfaceCharacteristicService
-
findByAnyUri
Description copied from interface:CharacteristicService
Find a characteristic or statement by any URI it contains including its category, value, predicates and objects.- Specified by:
findByAnyUri
in interfaceCharacteristicService
-
findByPredicate
- Specified by:
findByPredicate
in interfaceCharacteristicService
-
findByPredicateUri
- Specified by:
findByPredicateUri
in interfaceCharacteristicService
-
findByObject
- Specified by:
findByObject
in interfaceCharacteristicService
-
findByObjectUri
- Specified by:
findByObjectUri
in interfaceCharacteristicService
-