public class QueryExecutor extends 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,
Collection<?> parameters,
Object entity)
Returns true if the given query result list contains the given entity.
|
Decimal |
count(ClosureHolder closureWithQuery,
String recordIterator,
Expression additionalWhereExp)
Dynamically creates query and executes it.
|
Decimal |
count(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec,
Collection<?> parameters)
Executes the count query.
|
protected Decimal |
count(List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions)
Dynamically creates query and executes it.
|
Decimal |
count(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
Collection<?> parameters)
Executes the given query and returns a list of results.
|
Decimal |
count(com.whitestein.lsps.model.sharedrecord.SharedRecordType type,
String recordIterator,
Expression whereExp)
Dynamically creates query and executes it.
|
Decimal |
countAll(RecordType recordType)
Runs a count query for records of a given type.
|
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 List<Object> |
getAuditResultList(List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions,
List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
Integer index,
Integer count,
Long revision,
List<AuditCriteria> auditCriteria)
Dynamically creates query and executes it.
|
List<Object> |
getAuditResultList(com.whitestein.lsps.model.sharedrecord.SharedRecordType type,
String recordIterator,
Expression whereExp,
List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
Integer index,
Integer count,
Long revision,
List<AuditCriteria> auditCriteria)
Dynamically creates query and executes it.
|
protected List<Object> |
getAuditResultListInternal(List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions,
List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
Integer index,
Integer count,
Long revision,
List<AuditCriteria> auditCriteria) |
List<Object> |
getAuditRevisions(Object id,
com.whitestein.lsps.model.sharedrecord.SharedRecordType sharedRecordType,
Date from,
Date to)
Returns audit revisions.
|
List<Object> |
getResultList(ClosureHolder closureWithQuery,
String recordIterator,
Expression additionalWhereExp,
List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
Integer index,
Integer count)
Dynamically creates query and executes it.
|
List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> |
getResultList(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec,
Collection<?> parameters)
Executes the query and returns a result list.
|
protected List<Object> |
getResultList(List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions,
com.whitestein.lsps.engine.sharedrecord.QueryExecutor.Orderings orderings,
Integer index,
Integer count)
Dynamically creates query and executes it.
|
List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> |
getResultList(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
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,
Collection<?> parameters,
OrderingAndPagingCriteria pagingCriteria)
Executes the given query and returns a list of results.
|
List<Object> |
getResultList(com.whitestein.lsps.model.sharedrecord.SharedRecordType type,
String recordIterator,
Expression whereExp,
List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
Integer index,
Integer count)
Dynamically creates query and executes it.
|
protected org.hibernate.Session |
getSession(String jndi) |
com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity |
getSingleResult(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec,
Collection<?> parameters)
Executes the query and returns a unique result.
|
com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity |
getSingleResult(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
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(String jndi)
public List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getAll(RecordType recordType) throws ErrorException
recordType - ErrorExceptionpublic QueryResult<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getAll(RecordType recordType, OrderingAndPagingCriteria pagingCriteria) throws ErrorException
recordType - pagingCriteria - ErrorExceptionpublic List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getResultList(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec, Collection<?> parameters) throws ErrorException
spec - parameters - ErrorExceptionpublic Decimal count(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec, Collection<?> parameters) throws ErrorException
spec - parameters - ErrorExceptionpublic QueryResult<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getResultList(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec, Collection<?> parameters, OrderingAndPagingCriteria pagingCriteria) throws ErrorException
spec - pagingCriteria - parameters - ErrorExceptionpublic com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity getSingleResult(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
Collection<?> parameters)
throws ErrorException
spec - parameters - ErrorExceptionpublic boolean contains(com.whitestein.lsps.model.sharedrecord.QuerySpecification spec,
Collection<?> parameters,
Object entity)
throws ErrorException
spec - parameters - entity - ErrorExceptionprotected List<Object> getAuditResultListInternal(List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions, List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, Integer index, Integer count, Long revision, List<AuditCriteria> auditCriteria) throws ErrorException, ValidationException
whereExpressions - orderings - index - count - revision - auditCriteria - ErrorExceptionValidationExceptionpublic List<Object> getAuditRevisions(Object id, com.whitestein.lsps.model.sharedrecord.SharedRecordType sharedRecordType, Date from, Date to) throws ErrorException
id - sharedRecordType - from - to - ErrorExceptionprotected List<Object> getAuditResultList(List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions, List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, Integer index, Integer count, Long revision, List<AuditCriteria> auditCriteria) throws ErrorException, ValidationException
whereExpressions - orderings - index - count - revision - auditCriteria - ErrorExceptionValidationExceptionpublic List<Object> getAuditResultList(com.whitestein.lsps.model.sharedrecord.SharedRecordType type, String recordIterator, Expression whereExp, List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, Integer index, Integer count, Long revision, List<AuditCriteria> auditCriteria) throws ErrorException, ValidationException
type - recordIterator - whereExp - orderings - index - count - revision - auditCriteria - ErrorExceptionValidationExceptionprotected List<Object> getResultList(List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions, com.whitestein.lsps.engine.sharedrecord.QueryExecutor.Orderings orderings, Integer index, Integer count) throws ErrorException, ValidationException
whereExpressions - orderings - index - count - ErrorExceptionValidationExceptionpublic List<Object> getResultList(com.whitestein.lsps.model.sharedrecord.SharedRecordType type, String recordIterator, Expression whereExp, List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, Integer index, Integer count) throws ErrorException, ValidationException
type - recordIterator - whereExp - orderings - index - count - ErrorExceptionValidationExceptionpublic List<Object> getResultList(ClosureHolder closureWithQuery, String recordIterator, Expression additionalWhereExp, List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, Integer index, Integer count) throws ErrorException, ValidationException
closureWithQuery - recordIterator - additionalWhereExp - orderings - index - count - ErrorExceptionValidationExceptionprotected Decimal count(List<com.whitestein.lsps.engine.sharedrecord.QueryExecutor.WhereExpression> whereExpressions) throws ErrorException, ValidationException
whereExpressions - ErrorExceptionValidationExceptionpublic Decimal count(com.whitestein.lsps.model.sharedrecord.SharedRecordType type, String recordIterator, Expression whereExp) throws ErrorException, ValidationException
type - recordIterator - whereExp - ErrorExceptionValidationExceptionpublic Decimal countAll(RecordType recordType) throws ErrorException
recordType - ErrorExceptionpublic Decimal count(ClosureHolder closureWithQuery, String recordIterator, Expression additionalWhereExp) throws ErrorException, ValidationException
closureWithQuery - recordIterator - additionalWhereExp - ErrorExceptionValidationExceptionpublic List<com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity> getResultList(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec, Collection<?> parameters) throws ErrorException
spec - parameters - ErrorExceptionpublic com.whitestein.lsps.model.sharedrecord.ExternalRecordEntity getSingleResult(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec,
Collection<?> parameters)
throws ErrorException
spec - parameters - ErrorExceptionpublic Decimal count(com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification spec, Collection<?> parameters) throws ErrorException
spec - parameters - ErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.