@Repository public abstract class CdmEntityDaoBase<T extends CdmBase> extends DaoBase implements ICdmEntityDao<T>
Modifier and Type | Field and Description |
---|---|
protected IBeanInitializer |
defaultBeanInitializer |
protected int |
flushAfterNo |
protected static java.util.EnumSet<Restriction.Operator> |
LEFTOUTER_OPS |
protected java.lang.Class<T> |
type |
INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
CdmEntityDaoBase(java.lang.Class<T> type) |
Modifier and Type | Method and Description |
---|---|
protected void |
addExample(org.hibernate.Criteria criteria,
T example,
java.util.Set<java.lang.String> includeProperties) |
protected void |
addGroups(org.hibernate.Criteria criteria,
java.util.List<Grouping> groups) |
void |
clear() |
long |
count() |
long |
count(java.lang.Class<? extends T> clazz)
Returns the number of objects of type
|
long |
count(java.lang.Class<? extends T> type,
java.util.List<Restriction<?>> restrictions)
Counts the Cdm entities matching the restrictions defined by
the
parameters propertyName , value and matchMode . |
long |
count(T example,
java.util.Set<java.lang.String> includeProperties)
Method that counts the number of objects matching the example provided.
|
long |
countByParam(java.lang.Class<? extends T> clazz,
java.lang.String param,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criterion) |
long |
countByParamWithRestrictions(java.lang.Class<? extends T> clazz,
java.lang.String param,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<Restriction<?>> restrictions) |
protected void |
countGroups(org.hibernate.criterion.DetachedCriteria criteria,
java.util.List<Grouping> groups) |
protected org.hibernate.Criteria |
createCriteria(java.lang.Class<? extends T> type,
java.util.List<Restriction<?>> restrictions,
boolean doCount)
Creates a criteria query for the CDM
type either for counting or listing matching entities. |
java.util.UUID |
delete(T persistentObject) |
protected java.lang.Class<? extends T> |
entityType(java.lang.Class<? extends T> clazz) |
java.lang.Boolean |
exists(java.util.UUID uuid) |
T |
findById(int id) |
<S extends T> |
findByParam(java.lang.Class<S> clazz,
java.util.Set<java.lang.String> params,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criterion,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
<S extends T> |
findByParam(java.lang.Class<S> clazz,
java.lang.String param,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criterion,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
NOTE: We can't reuse
{@link #list(Class, String, Object, MatchMode, Integer, Integer, List, List)
here due to different default behavior of the
matchmode
parameter. |
<S extends T> |
findByParamWithRestrictions(java.lang.Class<S> clazz,
java.lang.String param,
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) |
T |
findByUuid(java.util.UUID uuid) |
protected T |
findByUuid(java.util.UUID uuid,
boolean includeUnpublished) |
T |
findByUuidWithoutFlush(java.util.UUID uuid)
Method to find CDM Entity by Uuid, by making sure that the underlying
hibernate session is not flushed (Session.FLUSH_MODE set to MANUAL temporarily)
when performing the read query.
|
protected org.hibernate.envers.AuditReader |
getAuditReader() |
protected org.hibernate.Criteria |
getCriteria(java.lang.Class<? extends CdmBase> clazz)
Returns a Criteria for the given
class or, if
null , for the base class of this DAO. |
org.hibernate.Session |
getSession() |
java.lang.Class<T> |
getType()
Convenience method which makes it easy to discover what type of object this DAO returns at runtime
|
java.util.List<java.lang.Object[]> |
group(java.lang.Class<? extends T> clazz,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<Grouping> groups,
java.util.List<java.lang.String> propertyPaths)
Returns a sublist of objects matching the grouping projections supplied using the groups parameter
It would be nice to have an equivalent countGroups method, but for the moment hibernate doesn't
seem to support this (HHH-3238 - impossible to get the rowcount for a criteria that has projections)
|
<S extends T> |
list(java.lang.Class<S> clazz,
java.util.Collection<java.util.UUID> uuids,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
<S extends T> |
list(java.lang.Class<S> type,
java.lang.Integer limit,
java.lang.Integer start)
Returns a sublist of CdmBase instances of type
|
<S extends T> |
list(java.lang.Class<S> type,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints) |
<S extends T> |
list(java.lang.Class<S> clazz,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a sublist of CdmBase instances stored in the database.
|
<S extends T> |
list(java.lang.Class<S> type,
java.util.List<Restriction<?>> restrictions,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a list of Cdm entities stored in the database filtered by the restrictions defined by
the
parameters propertyName , value and matchMode
A maximum
of 'limit' objects are returned, starting at object with index 'start'. |
java.util.List<T> |
list(java.util.Collection<java.util.UUID> uuids,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
java.util.List<T> |
list(java.lang.Integer limit,
java.lang.Integer start)
Returns a sublist of CdmBase instances stored in the database.
|
java.util.List<T> |
list(java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints)
Returns a sublist of CdmBase instances stored in the database.
|
java.util.List<T> |
list(java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a sublist of CdmBase instances stored in the database.
|
<S extends T> |
list(S example,
java.util.Set<java.lang.String> includeProperties,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Method that lists the objects matching the example provided.
|
T |
load(int id,
java.util.List<java.lang.String> propertyPaths)
Finds the cdm entity specified by the id parameter and
recursively initializes all bean properties given in the
propertyPaths parameter. |
T |
load(java.util.UUID uuid)
Finds the cdm entity specified by the
uuid parameter and
initializes all its *ToOne relations. |
protected T |
load(java.util.UUID uuid,
boolean includeUnpublished,
java.util.List<java.lang.String> propertyPaths) |
T |
load(java.util.UUID uuid,
java.util.List<java.lang.String> propertyPaths)
Finds the cdm entity specified by the
uuid parameter and
recursively initializes all bean properties given in the
propertyPaths parameter. |
java.util.List<T> |
loadList(java.util.Collection<java.lang.Integer> ids,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
void |
lock(T t,
org.hibernate.LockOptions lockOptions)
Obtains the specified LockMode on the supplied object
|
protected org.hibernate.envers.query.AuditQuery |
makeAuditQuery(java.lang.Class<? extends CdmBase> clazz,
AuditEvent auditEvent) |
T |
merge(T transientObject) |
MergeResult<T> |
merge(T transientObject,
boolean returnTransientEntity)
This method allows for the possibility of returning the input transient
entity instead of the merged persistent entity
WARNING : This method should never be used when the objective of the merge
is to attach to an existing session which is the standard use case.
|
java.util.UUID |
refresh(T persistentObject) |
void |
refresh(T t,
org.hibernate.LockOptions lockOptions,
java.util.List<java.lang.String> propertyPaths)
Refreshes the state of the supplied object using the given LockMode (e.g.
|
T |
replace(T x,
T y)
Globally replace all references to instance t1 with t2 (including
NOTE: This replaces all non-bidirectional relationships where type T is on the
"owning" side of the relationship (since the "owned" objects are, in theory,
sub-components of the entity and this kind of global replace doesn't really make sense
Consequently it is a good idea to either map such owned relationships with cascading
semantics (i.e.
|
T |
save(T newInstance) |
java.util.Map<java.util.UUID,T> |
saveAll(java.util.Collection<T> cdmObjCollection) |
java.util.UUID |
saveCdmObj(CdmBase cdmObj) |
java.util.UUID |
saveOrUpdate(T transientObject) |
java.util.Map<java.util.UUID,T> |
saveOrUpdateAll(java.util.Collection<T> cdmObjCollection) |
void |
setDefaultBeanInitializer(IBeanInitializer defaultBeanInitializer) |
protected void |
setPagingParameter(org.hibernate.envers.query.AuditQuery query,
java.lang.Integer pageSize,
java.lang.Integer pageIndex) |
protected void |
setPagingParameter(org.hibernate.Query query,
java.lang.Integer pageSize,
java.lang.Integer pageIndex) |
java.util.UUID |
update(T transientObject) |
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
flush
protected int flushAfterNo
@Autowired protected IBeanInitializer defaultBeanInitializer
protected static final java.util.EnumSet<Restriction.Operator> LEFTOUTER_OPS
public CdmEntityDaoBase(java.lang.Class<T> type)
public void setDefaultBeanInitializer(IBeanInitializer defaultBeanInitializer)
public void lock(T t, org.hibernate.LockOptions lockOptions)
ICdmEntityDao
lock
in interface ICdmEntityDao<T extends CdmBase>
public void refresh(T t, org.hibernate.LockOptions lockOptions, java.util.List<java.lang.String> propertyPaths)
ICdmEntityDao
propertyPaths
parameter are recursively initialized.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
refresh
in interface ICdmEntityDao<T extends CdmBase>
public java.util.UUID saveCdmObj(CdmBase cdmObj) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
public java.util.Map<java.util.UUID,T> saveAll(java.util.Collection<T> cdmObjCollection)
saveAll
in interface ICdmEntityDao<T extends CdmBase>
public java.util.Map<java.util.UUID,T> saveOrUpdateAll(java.util.Collection<T> cdmObjCollection)
saveOrUpdateAll
in interface ICdmEntityDao<T extends CdmBase>
public T replace(T x, T y)
ICdmEntityDao
replace
in interface ICdmEntityDao<T extends CdmBase>
x
- the object to replace, must not be nully
- the object that will replace. If y is null, then x will be removed from all collections
and all properties that refer to x will be replaced with nullpublic org.hibernate.Session getSession() throws org.springframework.dao.DataAccessException
getSession
in interface ICdmEntityDao<T extends CdmBase>
getSession
in class DaoBase
org.springframework.dao.DataAccessException
public void clear() throws org.springframework.dao.DataAccessException
clear
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public MergeResult<T> merge(T transientObject, boolean returnTransientEntity) throws org.springframework.dao.DataAccessException
ICdmEntityDao
merge
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public T merge(T transientObject) throws org.springframework.dao.DataAccessException
merge
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public java.util.UUID saveOrUpdate(T transientObject) throws org.springframework.dao.DataAccessException
saveOrUpdate
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public T save(T newInstance) throws org.springframework.dao.DataAccessException
save
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public java.util.UUID update(T transientObject) throws org.springframework.dao.DataAccessException
update
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public java.util.UUID refresh(T persistentObject) throws org.springframework.dao.DataAccessException
refresh
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public java.util.UUID delete(T persistentObject) throws org.springframework.dao.DataAccessException
delete
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public T findById(int id) throws org.springframework.dao.DataAccessException
findById
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public T findByUuid(java.util.UUID uuid) throws org.springframework.dao.DataAccessException
findByUuid
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
protected T findByUuid(java.util.UUID uuid, boolean includeUnpublished) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
public T findByUuidWithoutFlush(java.util.UUID uuid) throws org.springframework.dao.DataAccessException
ICdmEntityDao
findByUuidWithoutFlush
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public java.util.List<T> loadList(java.util.Collection<java.lang.Integer> ids, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws org.springframework.dao.DataAccessException
loadList
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public java.util.List<T> list(java.util.Collection<java.util.UUID> uuids, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws org.springframework.dao.DataAccessException
list
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public <S extends T> java.util.List<S> list(java.lang.Class<S> clazz, java.util.Collection<java.util.UUID> uuids, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws org.springframework.dao.DataAccessException
list
in interface ICdmEntityDao<T extends CdmBase>
org.springframework.dao.DataAccessException
public <S extends T> java.util.List<S> list(java.lang.Class<S> type, java.util.List<Restriction<?>> restrictions, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
parameters
propertyName
, value and matchMode
A maximum
of 'limit' objects are returned, starting at object with index 'start'.
The bean properties specified by the parameter propertyPaths
and recursively initialized for each of the entities in the resultset
For detailed description and examples regarding
propertyPaths
please refer to:
IBeanInitializer.initialize(Object, List)
list
in interface ICdmEntityDao<T extends CdmBase>
type
- Restrict the query to objects of a certain class, or null for
all objects of type T or subclassesrestrictions
- This defines a filter for multiple properties represented by the map keys. Sine the keys are of the type
Restriction
for each property a single MatchMode is defined. Multiple alternative values
can be supplied per property, that is the values per property are combined with OR. The per property
restrictions are combined with AND.
NOTE: For non string type properties you must use
MatchMode.EXACT
. If set null
MatchMode.EXACT
will be used
as default.limit
- the maximum number of entities returned (can be null to return
all entities)start
- The list of criterion objects representing the restriction to be applied.orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepublic long count(java.lang.Class<? extends T> type, java.util.List<Restriction<?>> restrictions)
parameters
propertyName
, value and matchMode
.count
in interface ICdmEntityDao<T extends CdmBase>
type
- Restrict the query to objects of a certain class, or null for
all objects of type T or subclassesrestrictions
- This defines a filter for multiple properties represented by the map keys. Sine the keys are of the type
Restriction
for each property a single MatchMode is defined. Multiple alternative values
can be supplied per property, that is the values per property are combined with OR. The per property
restrictions are combined with AND.
NOTE: For non string type properties you must use
MatchMode.EXACT
. If set null
MatchMode.EXACT
will be used
as default.public T load(java.util.UUID uuid)
ICdmEntityDao
uuid
parameter and
initializes all its *ToOne relations.load
in interface ICdmEntityDao<T extends CdmBase>
public T load(int id, java.util.List<java.lang.String> propertyPaths)
ICdmEntityDao
propertyPaths
parameter.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
load
in interface ICdmEntityDao<T extends CdmBase>
propertyPaths
- properties to be initializedpublic T load(java.util.UUID uuid, java.util.List<java.lang.String> propertyPaths)
ICdmEntityDao
uuid
parameter and
recursively initializes all bean properties given in the
propertyPaths
parameter.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
load
in interface ICdmEntityDao<T extends CdmBase>
propertyPaths
- properties to be initializedprotected T load(java.util.UUID uuid, boolean includeUnpublished, java.util.List<java.lang.String> propertyPaths)
public java.lang.Boolean exists(java.util.UUID uuid)
exists
in interface ICdmEntityDao<T extends CdmBase>
public long count()
count
in interface ICdmEntityDao<T extends CdmBase>
public long count(java.lang.Class<? extends T> clazz)
ICdmEntityDao
count
in interface ICdmEntityDao<T extends CdmBase>
public java.util.List<T> list(java.lang.Integer limit, java.lang.Integer start)
ICdmEntityDao
list
in interface ICdmEntityDao<T extends CdmBase>
limit
- the maximum number of entities returned (can be null to return all entities)public java.util.List<java.lang.Object[]> group(java.lang.Class<? extends T> clazz, java.lang.Integer limit, java.lang.Integer start, java.util.List<Grouping> groups, java.util.List<java.lang.String> propertyPaths)
ICdmEntityDao
group
in interface ICdmEntityDao<T extends CdmBase>
clazz
- Restrict the query to objects of a certain class, or null for all objects of type T or subclasseslimit
- the maximum number of entities returned (can be null to return
all entities)start
- The (0-based) offset from the start of the recordsetgroups
- The grouping objects representing a projection, plus an optional ordering on that projected propertypropertyPaths
- paths initialized on the returned objects - only applied to the objects returned from the first groupingprotected void countGroups(org.hibernate.criterion.DetachedCriteria criteria, java.util.List<Grouping> groups)
protected void addGroups(org.hibernate.Criteria criteria, java.util.List<Grouping> groups)
public java.util.List<T> list(java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints)
ICdmEntityDao
list
in interface ICdmEntityDao<T extends CdmBase>
limit
- the maximum number of entities returned (can be null to return
all entities)orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepublic java.util.List<T> list(java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ICdmEntityDao
propertyPaths
and recursively initialized for each of the entities in the resultset
For detailed description and examples regarding
propertyPaths
please refer to:
IBeanInitializer.initialize(Object, List)
list
in interface ICdmEntityDao<T extends CdmBase>
limit
- the maximum number of entities returned (can be null to return
all entities)orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepublic <S extends T> java.util.List<S> list(java.lang.Class<S> clazz, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ICdmEntityDao
list
in interface ICdmEntityDao<T extends CdmBase>
limit
- the maximum number of entities returned (can be null to return
all entities)orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepublic <S extends T> java.util.List<S> list(java.lang.Class<S> type, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints)
public <S extends T> java.util.List<S> list(java.lang.Class<S> type, java.lang.Integer limit, java.lang.Integer start)
ICdmEntityDao
list
in interface ICdmEntityDao<T extends CdmBase>
limit
- the maximum number of entities returned (can be null to return all entities)public java.lang.Class<T> getType()
ICdmEntityDao
getType
in interface ICdmEntityDao<T extends CdmBase>
protected void setPagingParameter(org.hibernate.Query query, java.lang.Integer pageSize, java.lang.Integer pageIndex)
protected void setPagingParameter(org.hibernate.envers.query.AuditQuery query, java.lang.Integer pageSize, java.lang.Integer pageIndex)
public long count(T example, java.util.Set<java.lang.String> includeProperties)
ICdmEntityDao
count
in interface ICdmEntityDao<T extends CdmBase>
protected void addExample(org.hibernate.Criteria criteria, T example, java.util.Set<java.lang.String> includeProperties)
public <S extends T> java.util.List<S> findByParam(java.lang.Class<S> clazz, java.lang.String param, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criterion, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
matchmode
parameter.findByParam
in interface ICdmEntityDao<T extends CdmBase>
clazz
- param
- queryString
- matchmode
- criterion
- pageSize
- pageNumber
- orderHints
- propertyPaths
- public <S extends T> java.util.List<S> findByParam(java.lang.Class<S> clazz, java.util.Set<java.lang.String> params, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criterion, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
findByParam
in interface ICdmEntityDao<T extends CdmBase>
public long countByParam(java.lang.Class<? extends T> clazz, java.lang.String param, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criterion)
countByParam
in interface ICdmEntityDao<T extends CdmBase>
clazz
- param
- queryString
- matchmode
- criterion
- protected org.hibernate.Criteria createCriteria(java.lang.Class<? extends T> type, java.util.List<Restriction<?>> restrictions, boolean doCount)
type
either for counting or listing matching entities.
The set of matching entities can be restricted by passing a list of Restriction
objects.
Restrictions can logically combined:
Arrays.asList( new RestrictionThe first Restriction in the example above by default has the("titleCache", MatchMode.ANYWHERE, "foo"), new Restriction ("institute.name", Operator.OR, MatchMode.BEGINNING, "Bar") );
Operator.AND
which will be
ignored since this is the first restriction. The Operator
of further restrictions in the
list are used to combine with the previous restriction.type
- restrictions
- doCount
- public <S extends T> java.util.List<S> findByParamWithRestrictions(java.lang.Class<S> clazz, java.lang.String param, 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)
findByParamWithRestrictions
in interface ICdmEntityDao<T extends CdmBase>
public long countByParamWithRestrictions(java.lang.Class<? extends T> clazz, java.lang.String param, java.lang.String queryString, MatchMode matchmode, java.util.List<Restriction<?>> restrictions)
countByParamWithRestrictions
in interface ICdmEntityDao<T extends CdmBase>
public <S extends T> java.util.List<S> list(S example, java.util.Set<java.lang.String> includeProperties, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ICdmEntityDao
list
in interface ICdmEntityDao<T extends CdmBase>
limit
- the maximum number of entities returned (can be null to return
all entities)start
- The (0-based) offset from the start of the recordsetorderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username orpropertyPaths
- paths initialized on the returned objects - only applied to the objects returned from the first groupingprotected org.hibernate.Criteria getCriteria(java.lang.Class<? extends CdmBase> clazz)
class
or, if
null
, for the base class
of this DAO.clazz
- protected org.hibernate.envers.query.AuditQuery makeAuditQuery(java.lang.Class<? extends CdmBase> clazz, AuditEvent auditEvent)
clazz
- auditEvent
- protected org.hibernate.envers.AuditReader getAuditReader()
Copyright © 2007-2020 EDIT. All Rights Reserved.