public interface IIdentifiableEntityService<T extends IdentifiableEntity> extends IAnnotatableService<T>
Modifier and Type | Method and Description |
---|---|
long |
countByTitle(java.lang.Class<? extends T> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criteria)
Return an Integer of how many objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
long |
countByTitle(IIdentifiableEntityServiceConfigurator<T> configurator)
Return an Integer of how many objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
long |
countByTitleWithRestrictions(java.lang.Class<? extends T> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<Restriction<?>> restrictions)
Return an Integer of how many objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
int |
deduplicate(java.lang.Class<? extends T> clazz,
IMatchStrategyEqual matchStrategy,
IMergeStrategy mergeStrategy)
This method tries to deduplicate all objects of a certain class by first trying to find matchabel objects and
merging them in a second step.
|
T |
find(LSID lsid)
Finds an object with a given LSID.
|
<S extends T> |
findByIdentifier(java.lang.Class<S> clazz,
java.lang.String identifier,
DefinedTerm identifierType,
MatchMode matchmode,
boolean includeCdmEntity,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a Pager for
DTOs that hold the identifier including type, title and uuid
and the according CDM Object information (uuid, title and the object itself (optional)). |
<S extends T> |
findByMarker(java.lang.Class<S> clazz,
MarkerType markerType,
java.lang.Boolean markerValue,
boolean includeEntity,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a Pager for
DTOs that hold the marker including type, title and uuid
and the according CDM object information (uuid, title and the object itself (optional)). |
<S extends T> |
findByTitle(java.lang.Class<S> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criteria,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a Pager of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
<S extends T> |
findByTitle(IIdentifiableEntityServiceConfigurator<S> configurator)
Return a Pager of objects matching the given query string, optionally filtered by class,
optionally with a particular MatchMode
|
<S extends T> |
findByTitleWithRestrictions(java.lang.Class<S> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<Restriction<?>> restrictions,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a Pager of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
Pager<java.lang.String> |
findTitleCache(java.lang.Class<? extends T> clazz,
java.lang.String queryString,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
MatchMode matchMode)
Return a Pager of objects with distinct titleCache strings filtered by the given query string, optionally filtered by class, optionally with a particular MatchMode
|
java.util.List<UuidAndTitleCache<T>> |
findUuidAndTitleCacheByMarker(java.lang.Integer limit,
java.lang.String pattern,
MarkerType markerType) |
Pager<Rights> |
getRights(T t,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Return a Pager of rights belonging to this object
|
ISourceable |
getSourcedObjectByIdInSource(java.lang.Class clazz,
java.lang.String idInSource,
java.lang.String idNamespace)
Returns an Sourceable object according the
|
Pager<IdentifiableSource> |
getSources(T t,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Return a Pager of sources belonging to this object
|
java.lang.String |
getTitleCache(java.util.UUID uuid,
boolean refresh)
Returns the titleCache for a given object defined by uuid.
|
<S extends T> |
getUuidAndTitleCache(java.lang.Class<S> clazz,
java.lang.Integer limit,
java.lang.String pattern)
Like
getUuidAndTitleCache(Integer, String) but searching only on a subclass
of the type handled by the DAO. |
java.util.List<UuidAndTitleCache<T>> |
getUuidAndTitleCache(java.lang.Integer limit,
java.lang.String pattern)
Return a list of all uuids mapped to titleCache in the convenient
UuidAndTitleCache object. |
<S extends T> |
listByIdentifier(java.lang.Class<S> clazz,
java.lang.String identifier,
DefinedTerm identifierType,
MatchMode matchmode,
boolean includeEntity,
java.util.List<java.lang.String> propertyPaths,
java.lang.Integer limit) |
<S extends T> |
listByReferenceTitle(java.lang.Class<S> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criteria,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
<S extends T> |
listByReferenceTitleWithRestrictions(java.lang.Class<S> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<Restriction<?>> restrictions,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
<S extends T> |
listByTitle(java.lang.Class<S> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criteria,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
<S extends T> |
listByTitleWithRestrictions(java.lang.Class<S> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<Restriction<?>> restrictions,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
T |
replace(T x,
T y)
Replaces all *ToMany and *ToOne references to an object (x) with another object of the same type (y)
Ignores ManyToAny and OneToAny relationships as these are typically involved with bidirectional
parent-child relations
|
Pager<T> |
search(java.lang.Class<? extends T> 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 Paged List of IdentifiableEntity instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
|
UpdateResult |
updateCaches()
(Re-)generate the caches (e.g.
|
UpdateResult |
updateCaches(java.lang.Class<? extends T> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<T> cacheStrategy,
IProgressMonitor monitor)
(Re-)generate the caches for all objects of this concrete IdentifiableEntity class
|
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, pageAuditEvents, pageAuditEvents
clear, count, delete, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, update
UpdateResult updateCaches()
UpdateResult updateCaches(java.lang.Class<? extends T> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<T> cacheStrategy, IProgressMonitor monitor)
clazz
- class of objects to be updatedstepSize
- number of objects loaded per step. If null
use default.cacheStrategy
- cache strategy used for cache generation. If null
use default.monitor
- progress monitor. If null
use default.T find(LSID lsid)
lsid
- T replace(T x, T y)
x
- y
- Pager<IdentifiableSource> getSources(T t, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
t
- The identifiable entitypageSize
- The maximum number of sources returned (can be null for all sources)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
Pager<Rights> getRights(T t, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
t
- The identifiable entitypageSize
- The maximum number of rights returned (can be null for all rights)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
java.lang.String getTitleCache(java.util.UUID uuid, boolean refresh)
uuid
- the uuid of the requested object.refresh
- if false the value as stored in the DB is returned,
otherwise it is recomputed by loading the object and calling the formatter.<S extends T> Pager<S> findByTitle(java.lang.Class<S> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criteria, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)criteria
- additional criteria to filter bypageSize
- The maximum number of objects returned (can be null for all objects)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCache<S extends T> Pager<S> findByTitleWithRestrictions(java.lang.Class<S> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<Restriction<?>> restrictions, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)restrictions
- a List
of additional Restriction
s to filter bypageSize
- The maximum number of objects returned (can be null for all objects)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCache<S extends T> Pager<S> findByTitle(IIdentifiableEntityServiceConfigurator<S> configurator)
long countByTitle(java.lang.Class<? extends T> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criteria)
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)criteria
- additional criteria to filter bylong countByTitleWithRestrictions(java.lang.Class<? extends T> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<Restriction<?>> restrictions)
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)restrictions
- a List
of additional Restriction
s to filter bylong countByTitle(IIdentifiableEntityServiceConfigurator<T> configurator)
configurator
- an IIdentifiableEntityServiceConfigurator
object<S extends T> java.util.List<S> listByTitle(java.lang.Class<S> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criteria, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)criteria
- additional criteria to filter bypageSize
- The maximum number of objects returned (can be null for all objects)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCache<S extends T> java.util.List<S> listByTitleWithRestrictions(java.lang.Class<S> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<Restriction<?>> restrictions, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)restrictions
- a List
of additional Restriction
s to filter bypageSize
- The maximum number of objects returned (can be null for all objects)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCache<S extends T> java.util.List<S> listByReferenceTitle(java.lang.Class<S> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criteria, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)criteria
- additional criteria to filter bypageSize
- The maximum number of objects returned (can be null for all objects)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCache<S extends T> java.util.List<S> listByReferenceTitleWithRestrictions(java.lang.Class<S> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<Restriction<?>> restrictions, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)restrictions
- a List
of additional Restriction
s to filter bypageSize
- The maximum number of objects returned (can be null for all objects)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachePager<T> search(java.lang.Class<? extends T> 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)
clazz
- filter the results by class (or pass null to return all IdentifiableEntity instances)queryString
- pageSize
- The maximum number of identifiable entities returned (can be null for all matching identifiable 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 initializedint deduplicate(java.lang.Class<? extends T> clazz, IMatchStrategyEqual matchStrategy, IMergeStrategy mergeStrategy)
IMatchable
and IMergable
otherwise no deduplication is performed.
clazz
- matchStrategy
- mergeStrategy
- Pager<java.lang.String> findTitleCache(java.lang.Class<? extends T> clazz, java.lang.String queryString, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, MatchMode matchMode)
clazz
- queryString
- pageSize
- pageNumber
- orderHints
- matchMode
- ISourceable getSourcedObjectByIdInSource(java.lang.Class clazz, java.lang.String idInSource, java.lang.String idNamespace)
clazz
- idInSource
- idNamespace
- <S extends T> Pager<IdentifiedEntityDTO<S>> findByIdentifier(java.lang.Class<S> clazz, java.lang.String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeCdmEntity, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
DTOs
that hold the identifier including type, title and uuid
and the according CDM Object information (uuid, title and the object itself (optional)).clazz
- the identifiable entity subclass, may be nullidentifier
- the identifier as String
identifierType
- the identifier type, maybe nullmatchmode
- includeCdmEntity
- if true the CDM entity is also returned (this may slow down performance for large datasets)pageSize
- pageNumber
- propertyPaths
- identifiable entities
which have the according
identifier attached<S extends T> Pager<MarkedEntityDTO<S>> findByMarker(java.lang.Class<S> clazz, MarkerType markerType, java.lang.Boolean markerValue, boolean includeEntity, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
DTOs
that hold the marker including type, title and uuid
and the according CDM object information (uuid, title and the object itself (optional)).clazz
- markerType
- markerValue
- includeEntity
- pageSize
- pageNumber
- propertyPaths
- identifiable entities
which have the according
marker with the given flag value attached<S extends T> java.util.List<IdentifiedEntityDTO<S>> listByIdentifier(java.lang.Class<S> clazz, java.lang.String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, java.util.List<java.lang.String> propertyPaths, java.lang.Integer limit)
S
- clazz
- identifier
- identifierType
- matchmode
- includeEntity
- propertyPaths
- <S extends T> java.util.List<UuidAndTitleCache<S>> getUuidAndTitleCache(java.lang.Class<S> clazz, java.lang.Integer limit, java.lang.String pattern)
getUuidAndTitleCache(Integer, String)
but searching only on a subclass
of the type handled by the DAO.clazz
- the (sub)classlimit
- max number of resultspattern
- search patterngetUuidAndTitleCache(Integer, String)
java.util.List<UuidAndTitleCache<T>> getUuidAndTitleCache(java.lang.Integer limit, java.lang.String pattern)
UuidAndTitleCache
object.
Retrieving this list is considered to be significantly faster than initializing the fully fledged business
objects. To be used in cases where you want to present large amount of data and provide details after
a selection has been made.UuidAndTitleCache
instancesgetUuidAndTitleCache(Class, Integer, String)
java.util.List<UuidAndTitleCache<T>> findUuidAndTitleCacheByMarker(java.lang.Integer limit, java.lang.String pattern, MarkerType markerType)
limit
- pattern
- markerType
- Copyright © 2007-2020 EDIT. All Rights Reserved.