E
- the generic type of the queried object (typically a Bean
).T
- the generic type of the internal results
. See AbstractSelectStatement.getMapper()
.public class JpqlSelectStatementImpl<E,T> extends AbstractSelectStatement<E,JpqlSelectStatement<E>,T> implements JpqlSelectStatement<E>
JpqlSelectStatement
.Modifier and Type | Field and Description |
---|---|
private javax.persistence.EntityManager |
entityManager |
Constructor and Description |
---|
JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager,
JpqlDialect dialect,
EntityAlias<?> alias,
Function<T,E> mapper,
Class<E> toClass,
PropertyPath<?>... constructorArgs)
The constructor.
|
JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager,
JpqlDialect dialect,
EntityAlias<?> alias,
Function<T,E> mapper,
PropertyPath<?>... paths)
The constructor.
|
JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager,
JpqlDialect dialect,
EntityAlias<E> alias,
Function<T,E> mapper)
The constructor.
|
JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager,
SqlDialect dialect,
EntityAlias<?> alias,
Function<T,E> mapper,
Class<E> toClass,
PropertyPath<?>... constructorArgs)
The constructor.
|
JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager,
SqlDialect dialect,
EntityAlias<?> alias,
Function<T,E> mapper,
PropertyPath<?>... paths)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
JpqlSelectStatement<E> |
andFrom(EntityAlias<?>... aliases) |
protected Object |
doExecute(String sql,
QueryMode mode,
Long offset,
Integer limit)
Creates a select query with the given
SQL and the given arguments. |
protected javax.persistence.EntityManager |
getEntityManager() |
JpqlSelectStatement<E> |
having(Expression... expressions)
Adds the given
Expression s as filter criteria to the WHERE-clause. |
buildStart, createSqlSingleQuery, execute, getMapper, getSelectionPaths, groupBy, limit, offset, orderBy, query, queryCount, queryFirst, queryOne, querySingle, where
addAlias, addAliases, build, createFeature, createSqlBuilder, feature, getAlias, getBuilder, getDialect, getFeature, getParameters, getResultClass, getSql, isSupportingAlias, self, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAlias, getDialect, getParameters, getSql, toString
fetch, fetchCount, fetchFirst, fetchFirstRequired, fetchOne, fetchOneRequired, query, queryCount, queryFirst, queryOne
where
orderBy, orderBy
groupBy
offset
limit
public JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager, JpqlDialect dialect, EntityAlias<E> alias, Function<T,E> mapper)
entityManager
- the EntityManager
instance.dialect
- - see AbstractStatement.getDialect()
. Typically JpqlDialect.INSTANCE
.alias
- - see AbstractStatement.getAlias()
.mapper
- - see AbstractSelectStatement.getMapper()
.public JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager, SqlDialect dialect, EntityAlias<?> alias, Function<T,E> mapper, Class<E> toClass, PropertyPath<?>... constructorArgs)
entityManager
- the EntityManager
instance.dialect
- - see AbstractStatement.getDialect()
. Typically JpqlDialect.INSTANCE
.alias
- - see AbstractStatement.getAlias()
.mapper
- - see AbstractSelectStatement.getMapper()
.toClass
- - see
net.sf.mmm.util.query.api.statement.StatementFactory#selectFrom(EntityAlias, Class, Path...)
.constructorArgs
- - see
net.sf.mmm.util.query.api.statement.StatementFactory#selectFrom(EntityAlias, Class, Path...)
.public JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager, SqlDialect dialect, EntityAlias<?> alias, Function<T,E> mapper, PropertyPath<?>... paths)
entityManager
- the EntityManager
instance.dialect
- - see AbstractStatement.getDialect()
. Typically JpqlDialect.INSTANCE
.alias
- - see AbstractStatement.getAlias()
.mapper
- - see AbstractSelectStatement.getMapper()
.paths
- - see
JpqlStatementFactory.selectFrom(EntityAlias, Class, PropertyPath...)
.public JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager, JpqlDialect dialect, EntityAlias<?> alias, Function<T,E> mapper, PropertyPath<?>... paths)
entityManager
- the EntityManager
instance.dialect
- - see AbstractStatement.getDialect()
. Typically JpqlDialect.INSTANCE
.alias
- - see AbstractStatement.getAlias()
.mapper
- - see AbstractSelectStatement.getMapper()
.paths
- - see
FeatureSelect.selectFrom(EntityAlias, Class, PropertyPath...)
.public JpqlSelectStatementImpl(javax.persistence.EntityManager entityManager, JpqlDialect dialect, EntityAlias<?> alias, Function<T,E> mapper, Class<E> toClass, PropertyPath<?>... constructorArgs)
entityManager
- the EntityManager
instance.dialect
- - see AbstractStatement.getDialect()
. Typically JpqlDialect.INSTANCE
.alias
- - see AbstractStatement.getAlias()
.mapper
- - see AbstractSelectStatement.getMapper()
.toClass
- - see
net.sf.mmm.util.query.api.statement.StatementFactory#selectFrom(EntityAlias, Class, Path...)
.constructorArgs
- - see
net.sf.mmm.util.query.api.statement.StatementFactory#selectFrom(EntityAlias, Class, Path...)
.protected javax.persistence.EntityManager getEntityManager()
EntityManager
.protected Object doExecute(String sql, QueryMode mode, Long offset, Integer limit)
AbstractSelectStatement
SQL
and the given arguments.doExecute
in class AbstractSelectStatement<E,JpqlSelectStatement<E>,T>
sql
- the SQL to execute.mode
- the QueryMode
.offset
- the offset
.limit
- the limit
.public JpqlSelectStatement<E> having(Expression... expressions)
FeatureHaving
Expression
s as filter criteria to the WHERE-clause. Multiple invocations will combine
Expression
s with logical AND
but it is preferred to use a
single invocation.having
in interface FeatureHaving<JpqlSelectStatement<E>>
expressions
- the Expression
s to add.public JpqlSelectStatement<E> andFrom(EntityAlias<?>... aliases)
andFrom
in interface FeatureAndFrom<JpqlSelectStatement<E>>
aliases
- the CollectionPath
to select from (in addition to
Statement.getAlias()
).Copyright © 2001–2016 mmm-Team. All rights reserved.