public class QueryExecutor
extends java.lang.Object
QuerySpecification
.Constructor and Description |
---|
QueryExecutor(ExecutionContext context)
Creates new instance.
|
QueryExecutor(ExecutionContext context,
InterpreterStackTrace stackTrace)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
java.util.Collection<?> parameters,
java.lang.Object entity)
Returns true if the given query result list contains the given entity.
|
Decimal |
count(ClosureHolder closureWithQuery,
java.lang.String recordIterator,
Expression additionalWhereExp)
Dynamically creates query and executes it.
|
Decimal |
count(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec,
java.util.Collection<?> parameters)
Executes the count query.
|
protected Decimal |
count(java.util.List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions)
Dynamically creates query and executes it.
|
Decimal |
count(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
java.util.Collection<?> parameters)
Executes the given query and returns a list of results.
|
Decimal |
count(com.whitestein.lsps.model.sharedrecord.SharedRecordType type,
java.lang.String recordIterator,
Expression whereExp)
Dynamically creates query and executes it.
|
Decimal |
countAll(RecordType recordType)
Runs a count query for records of a given type.
|
java.util.List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> |
getAll(RecordType recordType)
Returns all the entities for the given type.
|
QueryResult<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> |
getAll(RecordType recordType,
OrderingAndPagingCriteria pagingCriteria)
Returns all the entities for the given type.
|
protected java.util.List<java.lang.Object> |
getAuditResultList(java.util.List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions,
java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
java.lang.Integer index,
java.lang.Integer count,
java.lang.Long revision,
java.util.List<AuditCriteria> auditCriteria)
Dynamically creates query and executes it.
|
java.util.List<java.lang.Object> |
getAuditResultList(com.whitestein.lsps.model.sharedrecord.SharedRecordType type,
java.lang.String recordIterator,
Expression whereExp,
java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
java.lang.Integer index,
java.lang.Integer count,
java.lang.Long revision,
java.util.List<AuditCriteria> auditCriteria)
Dynamically creates query and executes it.
|
protected java.util.List<java.lang.Object> |
getAuditResultListInternal(java.util.List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions,
java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
java.lang.Integer index,
java.lang.Integer count,
java.lang.Long revision,
java.util.List<AuditCriteria> auditCriteria) |
java.util.List<java.lang.Object> |
getAuditRevisions(java.lang.Object id,
com.whitestein.lsps.model.sharedrecord.SharedRecordType sharedRecordType,
java.util.Date from,
java.util.Date to)
Returns audit revisions.
|
java.util.List<java.lang.Object> |
getResultList(ClosureHolder closureWithQuery,
java.lang.String recordIterator,
Expression additionalWhereExp,
java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
java.lang.Integer index,
java.lang.Integer count)
Dynamically creates query and executes it.
|
java.util.List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> |
getResultList(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec,
java.util.Collection<?> parameters)
Executes the query and returns a result list.
|
protected java.util.List<java.lang.Object> |
getResultList(java.util.List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions,
com.whitestein.lsps.engine.sharedrecord.QueryExecutor.Orderings orderings,
java.lang.Integer index,
java.lang.Integer count)
Dynamically creates query and executes it.
|
java.util.List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> |
getResultList(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
java.util.Collection<?> parameters)
Executes the given query and returns a list of results.
|
QueryResult<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> |
getResultList(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
java.util.Collection<?> parameters,
OrderingAndPagingCriteria pagingCriteria)
Executes the given query and returns a list of results.
|
java.util.List<java.lang.Object> |
getResultList(com.whitestein.lsps.model.sharedrecord.SharedRecordType type,
java.lang.String recordIterator,
Expression whereExp,
java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
java.lang.Integer index,
java.lang.Integer count)
Dynamically creates query and executes it.
|
protected org.hibernate.Session |
getSession(java.lang.String jndi) |
com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity |
getSingleResult(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec,
java.util.Collection<?> parameters)
Executes the query and returns a unique result.
|
com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity |
getSingleResult(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
java.util.Collection<?> parameters)
Executes the given query and returns only the first result.
|
public QueryExecutor(ExecutionContext context)
context
- public QueryExecutor(ExecutionContext context, InterpreterStackTrace stackTrace)
context
- stackTrace
- protected org.hibernate.Session getSession(java.lang.String jndi)
public java.util.List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getAll(RecordType recordType) throws ErrorException
recordType
- ErrorException
public QueryResult<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getAll(RecordType recordType, OrderingAndPagingCriteria pagingCriteria) throws ErrorException
recordType
- pagingCriteria
- ErrorException
public java.util.List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getResultList(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec, java.util.Collection<?> parameters) throws ErrorException
spec
- parameters
- ErrorException
public Decimal count(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec, java.util.Collection<?> parameters) throws ErrorException
spec
- parameters
- ErrorException
public QueryResult<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getResultList(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec, java.util.Collection<?> parameters, OrderingAndPagingCriteria pagingCriteria) throws ErrorException
spec
- pagingCriteria
- parameters
- ErrorException
public com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity getSingleResult(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec, java.util.Collection<?> parameters) throws ErrorException
spec
- parameters
- ErrorException
public boolean contains(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec, java.util.Collection<?> parameters, java.lang.Object entity) throws ErrorException
spec
- parameters
- entity
- ErrorException
protected java.util.List<java.lang.Object> getAuditResultListInternal(java.util.List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions, java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, java.lang.Integer index, java.lang.Integer count, java.lang.Long revision, java.util.List<AuditCriteria> auditCriteria) throws ErrorException, ValidationException
whereExpressions
- orderings
- index
- count
- revision
- auditCriteria
- ErrorException
ValidationException
public java.util.List<java.lang.Object> getAuditRevisions(java.lang.Object id, com.whitestein.lsps.model.sharedrecord.SharedRecordType sharedRecordType, java.util.Date from, java.util.Date to) throws ErrorException
id
- sharedRecordType
- from
- to
- ErrorException
protected java.util.List<java.lang.Object> getAuditResultList(java.util.List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions, java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, java.lang.Integer index, java.lang.Integer count, java.lang.Long revision, java.util.List<AuditCriteria> auditCriteria) throws ErrorException, ValidationException
whereExpressions
- orderings
- index
- count
- revision
- auditCriteria
- ErrorException
ValidationException
public java.util.List<java.lang.Object> getAuditResultList(com.whitestein.lsps.model.sharedrecord.SharedRecordType type, java.lang.String recordIterator, Expression whereExp, java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, java.lang.Integer index, java.lang.Integer count, java.lang.Long revision, java.util.List<AuditCriteria> auditCriteria) throws ErrorException, ValidationException
type
- recordIterator
- whereExp
- orderings
- index
- count
- revision
- auditCriteria
- ErrorException
ValidationException
protected java.util.List<java.lang.Object> getResultList(java.util.List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions, com.whitestein.lsps.engine.sharedrecord.QueryExecutor.Orderings orderings, java.lang.Integer index, java.lang.Integer count) throws ErrorException, ValidationException
whereExpressions
- orderings
- index
- count
- ErrorException
ValidationException
public java.util.List<java.lang.Object> getResultList(com.whitestein.lsps.model.sharedrecord.SharedRecordType type, java.lang.String recordIterator, Expression whereExp, java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, java.lang.Integer index, java.lang.Integer count) throws ErrorException, ValidationException
type
- recordIterator
- whereExp
- orderings
- index
- count
- ErrorException
ValidationException
public java.util.List<java.lang.Object> getResultList(ClosureHolder closureWithQuery, java.lang.String recordIterator, Expression additionalWhereExp, java.util.List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, java.lang.Integer index, java.lang.Integer count) throws ErrorException, ValidationException
closureWithQuery
- recordIterator
- additionalWhereExp
- orderings
- index
- count
- ErrorException
ValidationException
protected Decimal count(java.util.List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions) throws ErrorException, ValidationException
whereExpressions
- ErrorException
ValidationException
public Decimal count(com.whitestein.lsps.model.sharedrecord.SharedRecordType type, java.lang.String recordIterator, Expression whereExp) throws ErrorException, ValidationException
type
- recordIterator
- whereExp
- ErrorException
ValidationException
public Decimal countAll(RecordType recordType) throws ErrorException
recordType
- ErrorException
public Decimal count(ClosureHolder closureWithQuery, java.lang.String recordIterator, Expression additionalWhereExp) throws ErrorException, ValidationException
closureWithQuery
- recordIterator
- additionalWhereExp
- ErrorException
ValidationException
public java.util.List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getResultList(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec, java.util.Collection<?> parameters) throws ErrorException
spec
- parameters
- ErrorException
public com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity getSingleResult(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec, java.util.Collection<?> parameters) throws ErrorException
spec
- parameters
- ErrorException
public Decimal count(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec, java.util.Collection<?> parameters) throws ErrorException
spec
- parameters
- ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.