@Repository public class CharacteristicDaoImpl extends AbstractVoEnabledDao<Characteristic,CharacteristicValueObject> implements CharacteristicDao
CharacteristicCharacteristicDao.CharacteristicUsageFrequencyREPORT_SLOW_QUERY_AFTER_MSDEFAULT_BATCH_SIZE, elementClass, logOBJECT_ALIAS| Constructor and Description |
|---|
CharacteristicDaoImpl(SessionFactory sessionFactory) |
| 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 orderField,
boolean descending)
Browse through the characteristics, excluding GO annotations, with sorting.
|
Map<String,Long> |
countCharacteristicsByValueUriGroupedByNormalizedValue(Collection<String> uris)
Count characteristics matching the provided value URIs.
|
protected CharacteristicValueObject |
doLoadValueObject(Characteristic entity)
Load a value object for a given entity.
|
Collection<? extends Characteristic> |
findByCategory(String query) |
Collection<Characteristic> |
findByUri(Collection<Class<?>> classes,
Collection<String> characteristicUris) |
Collection<Characteristic> |
findByUri(Collection<String> uris) |
Collection<Characteristic> |
findByUri(String searchString) |
Collection<Characteristic> |
findByValue(String search)
Finds all Characteristics whose value match the given search term
|
Map<String,Characteristic> |
findCharacteristicsByValueUriOrValueLikeGroupedByNormalizedValue(String value)
Find characteristics by value matching the provided LIKE pattern.
|
Map<Class<? extends Identifiable>,Map<String,Set<ExpressionExperiment>>> |
findExperimentsByUris(Collection<String> uris,
Taxon taxon,
int limit)
This search looks at direct annotations, factor values and biomaterials in that order.
|
Map<Characteristic,Long> |
getParentIds(Class<?> parentClass,
Collection<Characteristic> characteristics)
Optimized version that only retrieves the IDs of the owning objects.
|
Map<Characteristic,Object> |
getParents(Class<?> parentClass,
Collection<Characteristic> characteristics) |
String |
normalizeByValue(Characteristic characteristic)
Normalize a characteristic by value.
|
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdscountAll, create, create, createInBatch, find, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, flush, getElementClass, getSessionFactory, load, load, loadAll, remove, remove, remove, removeAllInBatch, removeInBatch, save, save, saveInBatch, update, update, updateInBatchclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdscountAll, create, create, createInBatch, find, findOrCreate, getElementClass, load, load, loadAll, remove, remove, remove, removeAllInBatch, removeInBatch, save, save, saveInBatch, update, update, updateInBatch@Autowired public CharacteristicDaoImpl(SessionFactory sessionFactory)
public List<Characteristic> browse(int start, int limit)
CharacteristicDaobrowse in interface BrowsingDao<Characteristic>browse in interface CharacteristicDaostart - How far into the list to startlimit - Maximum records to retrieve (might be subject to security filtering)public List<Characteristic> browse(int start, int limit, String orderField, boolean descending)
CharacteristicDaobrowse in interface BrowsingDao<Characteristic>browse in interface CharacteristicDaostart - query offsetlimit - maximum amount of entriesorderField - order fielddescending - order directionpublic Collection<? extends Characteristic> findByCategory(String query)
findByCategory in interface CharacteristicDaopublic Collection<Characteristic> findByUri(Collection<Class<?>> classes, @Nullable Collection<String> characteristicUris)
findByUri in interface CharacteristicDaoclasses - constraint of who the 'owner' of the Characteristic has to be.characteristicUris - urispublic Map<Class<? extends Identifiable>,Map<String,Set<ExpressionExperiment>>> findExperimentsByUris(Collection<String> uris, @Nullable Taxon taxon, int limit)
CharacteristicDaoResulting EEs are filtered by ACLs.
findExperimentsByUris in interface CharacteristicDaouris - collection of URIs used for matching characteristics (via Characteristic.getValueUri())taxon - taxon to restrict EEs to, or null to ignorelimit - approximate limit to how many results to return (just used to avoid extra queries; the limit
may be exceeded). Set to 0 for no limit.ExpressionExperiment, FactorValue,
BioMaterial) to the matching URI to IDs of experiments which have
an associated characteristic using the given uriString. The class lets us track where the annotation was.public Collection<Characteristic> findByUri(Collection<String> uris)
findByUri in interface CharacteristicDaopublic Collection<Characteristic> findByUri(String searchString)
findByUri in interface CharacteristicDaopublic Map<String,Long> countCharacteristicsByValueUriGroupedByNormalizedValue(Collection<String> uris)
CharacteristicDao
The mapping key is the normalized value of the characteristics as per CharacteristicDao.normalizeByValue(Characteristic).
countCharacteristicsByValueUriGroupedByNormalizedValue in interface CharacteristicDaopublic Map<String,Characteristic> findCharacteristicsByValueUriOrValueLikeGroupedByNormalizedValue(String value)
CharacteristicDao
The mapping key is the normalized value of the characteristics as per CharacteristicDao.normalizeByValue(Characteristic).
findCharacteristicsByValueUriOrValueLikeGroupedByNormalizedValue in interface CharacteristicDaopublic String normalizeByValue(Characteristic characteristic)
CharacteristicDaoThis is obtained by taking the value URI or value if the former is null and converting it to lowercase.
normalizeByValue in interface CharacteristicDaopublic Collection<Characteristic> findByValue(String search)
CharacteristicDaofindByValue in interface CharacteristicDaosearch - searchpublic Map<Characteristic,Object> getParents(Class<?> parentClass, @Nullable Collection<Characteristic> characteristics)
getParents in interface CharacteristicDaoparentClass - parent classcharacteristics - characteristicspublic Map<Characteristic,Long> getParentIds(Class<?> parentClass, @Nullable Collection<Characteristic> characteristics)
CharacteristicDaogetParentIds in interface CharacteristicDaoprotected CharacteristicValueObject doLoadValueObject(Characteristic entity)
AbstractVoEnabledDao
This should be fast and efficient, and avoid any database query or post-processing. If you need to perform
additional queries, consider overriding AbstractVoEnabledDao.loadValueObject(Identifiable) or AbstractVoEnabledDao.loadValueObjects(Collection).
doLoadValueObject in class AbstractVoEnabledDao<Characteristic,CharacteristicValueObject>Copyright © 2005–2023 Pavlidis lab, Michael Smith Laboratories and Department of Psychiatry, University of British Columbia. All rights reserved.