@Service public class CharacteristicServiceImpl extends AbstractVoEnabledService<Characteristic,CharacteristicValueObject> implements CharacteristicService
CharacteristicService
log
Constructor and Description |
---|
CharacteristicServiceImpl(CharacteristicDao characteristicDao) |
Modifier and Type | Method and Description |
---|---|
List<Characteristic> |
browse(int start,
int limit)
Browse through the characteristics, excluding GO annotations.
|
List<Characteristic> |
browse(int start,
int limit,
String sortField,
boolean descending)
Browse through the characteristics, excluding GO annotations.
|
Map<String,CharacteristicDao.CharacteristicByValueUriOrValueCount> |
countCharacteristicValueLikeByValueUriOrValue(String search) |
Map<String,CharacteristicDao.CharacteristicByValueUriOrValueCount> |
countCharacteristicValueUriInByValueUriOrValue(Collection<String> search) |
Collection<? extends Characteristic> |
findByCategory(String query) |
Collection<Characteristic> |
findByUri(Collection<String> uris)
given a collection of strings that represent URI's will find all the characteristics that are used in the system
with URI's matching anyone in the given collection
|
Collection<Characteristic> |
findByUri(String searchString)
Looks for an exact match of the give string to a valueUri in the characteristic database
|
Collection<Characteristic> |
findByValue(String search)
Returns a collection of characteristics that have a Value that match the given search string.
|
Map<Class<? extends Identifiable>,Map<String,Set<ExpressionExperiment>>> |
findExperimentsByUris(Collection<String> uris,
Taxon taxon,
int limit) |
ObjectFilter |
getObjectFilter(String property,
ObjectFilter.Operator operator,
Collection<String> values)
Similar to
FilteringService.getObjectFilter(String, ObjectFilter.Operator, String) , but with a collection of values. |
ObjectFilter |
getObjectFilter(String property,
ObjectFilter.Operator operator,
String value)
Obtain an
ObjectFilter for the entity this DAO is providing. |
Map<Characteristic,Long> |
getParentIds(Class<?> parentClass,
Collection<Characteristic> characteristics)
Optimized version that only retrieves the IDs of the owning object.
|
Map<Characteristic,Object> |
getParents(Collection<Characteristic> characteristics) |
Map<Characteristic,Object> |
getParents(Collection<Class<?>> classes,
Collection<Characteristic> characteristics) |
Sort |
getSort(String property,
Sort.Direction direction)
Obtain a
Sort object for a property of the O . |
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
countAll, create, create, find, findOrCreate, findOrFail, load, load, loadAll, loadOrFail, remove, remove, remove, removeAll, save, save, update, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, remove, remove, update
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
countAll, create, find, findOrCreate, findOrFail, load, load, loadAll, loadOrFail, remove, removeAll, save, save, update
@Autowired public CharacteristicServiceImpl(CharacteristicDao characteristicDao)
@Transactional(readOnly=true) public List<Characteristic> browse(int start, int limit)
CharacteristicService
browse
in interface CharacteristicService
start
- How far into the list to startlimit
- Maximum records to retrieve@Transactional(readOnly=true) public List<Characteristic> browse(int start, int limit, String sortField, boolean descending)
CharacteristicService
browse
in interface CharacteristicService
start
- How far into the list to startlimit
- Maximum records to retrievesortField
- sort fielddescending
- sor order@Transactional(readOnly=true) public Map<Class<? extends Identifiable>,Map<String,Set<ExpressionExperiment>>> findExperimentsByUris(Collection<String> uris, @Nullable Taxon taxon, int limit)
findExperimentsByUris
in interface CharacteristicService
CharacteristicDao.findExperimentsByUris(Collection, Taxon, int)
@Transactional(readOnly=true) public Collection<Characteristic> findByUri(Collection<String> uris)
CharacteristicService
findByUri
in interface CharacteristicService
uris
- uris@Transactional(readOnly=true) public Collection<Characteristic> findByUri(String searchString)
CharacteristicService
findByUri
in interface CharacteristicService
searchString
- search string@Transactional(readOnly=true) public Collection<Characteristic> findByValue(String search)
CharacteristicService
findByValue
in interface CharacteristicService
search
- search@Transactional(readOnly=true) public Map<String,CharacteristicDao.CharacteristicByValueUriOrValueCount> countCharacteristicValueLikeByValueUriOrValue(String search)
countCharacteristicValueLikeByValueUriOrValue
in interface CharacteristicService
@Transactional(readOnly=true) public Map<String,CharacteristicDao.CharacteristicByValueUriOrValueCount> countCharacteristicValueUriInByValueUriOrValue(Collection<String> search)
countCharacteristicValueUriInByValueUriOrValue
in interface CharacteristicService
@Transactional(readOnly=true) public Map<Characteristic,Object> getParents(Collection<Characteristic> characteristics)
getParents
in interface CharacteristicService
characteristics
- characteristics@Transactional(readOnly=true) public Map<Characteristic,Long> getParentIds(Class<?> parentClass, @Nullable Collection<Characteristic> characteristics)
CharacteristicService
getParentIds
in interface CharacteristicService
parentClass
- the type of object sought associated with the characteristic@Transactional(readOnly=true) public Map<Characteristic,Object> getParents(Collection<Class<?>> classes, @Nullable Collection<Characteristic> characteristics)
getParents
in interface CharacteristicService
classes
- classescharacteristics
- characteristics@Transactional(readOnly=true) public Collection<? extends Characteristic> findByCategory(String query)
findByCategory
in interface CharacteristicService
public ObjectFilter getObjectFilter(String property, ObjectFilter.Operator operator, String value) throws IllegalArgumentException
FilteringService
ObjectFilter
for the entity this DAO is providing.
It is the responsibility of the DAO to infer the ObjectFilter property type as well as the alias to use.
If the ObjectFilter refers to a related entity (i.e. a BioAssay
of an
ExpressionExperiment
), then the DAO should inject the corresponding
DAO and delegate it the work of creating the ObjectFilter.
In the frontend, that correspond to a FilterArg, but since the definition is not available here, we unpack its
attributes.getObjectFilter
in interface FilteringService<Characteristic>
property
- property name in the entity use as a left-hand side of the operatoroperator
- an operatorvalue
- the corresponding, unparsed value, to the right-hand side of the operatorIllegalArgumentException
- if the property does not exist in O
, or if the operator cannot be applied,
or if the value cannot apply to the property an operator see ObjectFilter.parseObjectFilter(String, String, Class, ObjectFilter.Operator, String)
for more detailspublic ObjectFilter getObjectFilter(String property, ObjectFilter.Operator operator, Collection<String> values) throws IllegalArgumentException
FilteringService
FilteringService.getObjectFilter(String, ObjectFilter.Operator, String)
, but with a collection of values.getObjectFilter
in interface FilteringService<Characteristic>
IllegalArgumentException
public Sort getSort(String property, @Nullable Sort.Direction direction) throws IllegalArgumentException
FilteringService
Sort
object for a property of the O
.getSort
in interface FilteringService<Characteristic>
property
- a property of O
to sort bydirection
- a sorting direction, or null if the default direction appliesSort
object that can be used, for example, on FilteringVoEnabledDao.loadValueObjectsPreFilter(Filters, Sort, int, int)
IllegalArgumentException
- if no such field exists in O
Copyright © 2005–2023 Pavlidis lab, Michael Smith Laboratories and Department of Psychiatry, University of British Columbia. All rights reserved.