@Repository public class DescriptionElementDaoImpl extends AnnotatableDaoImpl<DescriptionElementBase> implements IDescriptionElementDao
defaultBeanInitializer, flushAfterNo, LEFTOUTER_OPS, type
INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
DescriptionElementDaoImpl() |
Modifier and Type | Method and Description |
---|---|
long |
count(java.lang.Class<? extends DescriptionElementBase> clazz,
java.lang.String queryString)
Returns a count of T instances where entities match a given queryString (as interpreted by the Lucene QueryParser)
|
int |
count(java.lang.String queryString) |
int |
countMedia(DescriptionElementBase descriptionElement)
Returns a count of Media that are associated with a given description element
|
java.util.List<Media> |
getMedia(DescriptionElementBase descriptionElement,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of Media that are associated with a given description element
|
void |
optimizeIndex()
Calls optimize on the relevant index (useful periodically to increase response times on the free-text search)
|
void |
purgeIndex()
Removes all entities of type T from the index
|
void |
rebuildIndex()
Index all T entities currently in the database (useful in concert with purgeIndex() to (re-)create
indexes or in the case of corrupt indexes / mismatch between
the database and the free-text indices)
|
java.util.List<DescriptionElementBase> |
search(java.lang.Class<? extends DescriptionElementBase> clazz,
java.lang.String queryString,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a List of T instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
|
java.lang.String |
suggestQuery(java.lang.String string)
Suggest a query that will return hits based upon an existing lucene query string (that is presumably misspelt and returns no hits)
Used to implement "did you mean?"-type functionality using the lucene spellchecker.
|
countAnnotations, countMarkers, countMarkers, getAnnotations, getMarkers, groupMarkers
addCriteria, addOrder, checkNotInPriorView, count, count, count, countAuditEvents, countAuditEvents, countByParam, exists, findByParam, findByParamWithRestrictions, findByUuid, getAuditEventFromContext, getAuditEvents, getAuditEvents, getNextAuditEvent, getPreviousAuditEvent, list, list, list, list, load, load, load
addExample, addGroups, clear, count, countByParamWithRestrictions, countGroups, createCriteria, delete, entityType, findById, findByParam, findByUuid, findByUuidWithoutFlush, getAuditReader, getCriteria, getSession, getType, group, list, list, list, list, list, list, load, loadList, lock, makeAuditQuery, merge, merge, refresh, refresh, replace, save, saveAll, saveCdmObj, saveOrUpdate, saveOrUpdateAll, setDefaultBeanInitializer, setPagingParameter, setPagingParameter, update
addCriteria, addFieldPredicate, addLimitAndStart, addLimitAndStart, addLimitAndStart, addOrder, addOrder, addOrder, addPageSizeAndNumber, addPageSizeAndNumber, addPageSizeAndNumber, addPageSizeAndNumber, flush, getSessionFactory, orderByClause, setSessionFactory, splitCollection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countAnnotations, countMarkers, countMarkers, getAnnotations, getMarkers, groupMarkers
countAuditEvents, countAuditEvents, getAuditEvents, getAuditEvents, getNextAuditEvent, getPreviousAuditEvent
clear, count, count, count, count, countByParam, countByParamWithRestrictions, delete, exists, findById, findByParam, findByParam, findByParamWithRestrictions, findByUuid, findByUuidWithoutFlush, flush, getSession, getType, group, list, list, list, list, list, list, list, list, list, load, load, load, loadList, lock, merge, merge, refresh, refresh, replace, save, saveAll, saveOrUpdate, saveOrUpdateAll, update
public int countMedia(DescriptionElementBase descriptionElement)
IDescriptionElementDao
countMedia
in interface IDescriptionElementDao
descriptionElement
- the description element associated with these mediapublic long count(java.lang.Class<? extends DescriptionElementBase> clazz, java.lang.String queryString)
ISearchableDao
count
in interface ISearchableDao<DescriptionElementBase>
clazz
- filter the results by class (or pass null to count all entities of type T)public java.util.List<Media> getMedia(DescriptionElementBase descriptionElement, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionElementDao
getMedia
in interface IDescriptionElementDao
descriptionElement
- the description element associated with these mediapageSize
- The maximum number of media returned (can be null for all related media)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public java.util.List<DescriptionElementBase> search(java.lang.Class<? extends DescriptionElementBase> clazz, java.lang.String queryString, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ISearchableDao
search
in interface ISearchableDao<DescriptionElementBase>
clazz
- filter the results by class (or pass null to return all entities of type T)pageSize
- The maximum number of entities returned (can be null for all matching entities)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths
- properties to be initializedpublic void purgeIndex()
ISearchableDao
purgeIndex
in interface ISearchableDao<DescriptionElementBase>
public void rebuildIndex()
ISearchableDao
rebuildIndex
in interface ISearchableDao<DescriptionElementBase>
public void optimizeIndex()
ISearchableDao
optimizeIndex
in interface ISearchableDao<DescriptionElementBase>
public int count(java.lang.String queryString)
public java.lang.String suggestQuery(java.lang.String string)
ISearchableDao
suggestQuery
in interface ISearchableDao<DescriptionElementBase>
string
- Query string to checkCopyright © 2007-2020 EDIT. All Rights Reserved.