Q - concrete subtypepublic abstract class AbstractSQLQuery<Q extends AbstractSQLQuery<Q>> extends ProjectableSQLQuery<Q>
| Modifier and Type | Field and Description | 
|---|---|
| protected SQLListeners | listeners | 
| protected boolean | useLiterals | 
configuration, firstUnionSubQuery, union, unionAllMDC_PARAMETERS, MDC_QUERY, queryMixin| Constructor and Description | 
|---|
| AbstractSQLQuery(Connection conn,
                Configuration configuration) | 
| AbstractSQLQuery(Connection conn,
                Configuration configuration,
                QueryMetadata metadata) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addListener(SQLListener listener) | 
| protected void | cleanupMDC() | 
| Q | clone() | 
| abstract Q | clone(Connection connection) | 
| protected void | clone(Q query) | 
| long | count()return the amount of matched rows | 
| protected SQLSerializer | createSerializer() | 
| protected void | endContext(SQLListenerContext context)Called to end a SQL listener context | 
| Q | forUpdate()If you use forUpdate() with a backend that uses page or row locks, rows examined by the
 query are write-locked until the end of the current transaction. | 
| protected Configuration | getConfiguration() | 
| ResultSet | getResults(Expression<?>... exprs)Get the results as an JDBC result set | 
| <RT> com.mysema.commons.lang.CloseableIterator<RT> | iterate(Expression<RT> expr)iterate over the results for the given projection | 
| <RT> List<RT> | list(Expression<RT> expr)list the results for the given projection
 
 An empty list is returned for no results. | 
| <RT> SearchResults<RT> | listResults(Expression<RT> expr)list the results for the given projection | 
| protected void | logQuery(String queryString,
        Collection<Object> parameters) | 
| protected void | onException(SQLListenerContextImpl context,
           Exception e)Called to make the call back to listeners when an exception happens | 
| protected void | setParameters(PreparedStatement stmt,
             List<?> objects,
             List<Path<?>> constantPaths,
             Map<ParamExpression<?>,?> params) | 
| void | setStatementOptions(StatementOptions statementOptions) | 
| void | setUseLiterals(boolean useLiterals) | 
| protected SQLListenerContextImpl | startContext(Connection connection,
            QueryMetadata metadata)Called to create and start a new SQL Listener context | 
| <RT> RT | uniqueResult(Expression<RT> expr)return a unique result for the given projection or null if no result is found | 
addFlag, addFlag, addFlag, addFlag, addJoinFlag, addJoinFlag, exists, from, from, from, fullJoin, fullJoin, fullJoin, fullJoin, getMetadata, getSQL, innerJoin, innerJoin, innerJoin, innerJoin, iterate, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, list, listResults, on, on, rightJoin, rightJoin, rightJoin, rightJoin, serialize, toString, union, union, union, union, unionAll, unionAll, unionAll, unionAll, uniqueResult, with, with, with, withRecursive, withRecursive, withRecursivemap, notExists, singleResult, singleResult, transform, uniqueResultdistinct, equals, groupBy, groupBy, hashCode, having, having, limit, offset, orderBy, orderBy, restrict, set, where, wherefinalize, getClass, notify, notifyAll, wait, wait, waitdistinct, limit, offset, orderBy, restrict, setwhereprotected SQLListeners listeners
protected boolean useLiterals
public AbstractSQLQuery(@Nullable Connection conn, Configuration configuration)
public AbstractSQLQuery(@Nullable Connection conn, Configuration configuration, QueryMetadata metadata)
public void addListener(SQLListener listener)
listener - public long count()
Projectablecount in interface Projectablecount in class ProjectableSQLQuery<Q extends AbstractSQLQuery<Q>>public Q forUpdate()
protected SQLSerializer createSerializer()
createSerializer in class ProjectableSQLQuery<Q extends AbstractSQLQuery<Q>>protected SQLListenerContextImpl startContext(Connection connection, QueryMetadata metadata)
connection - the database connectionmetadata - the meta data for that contextprotected void onException(SQLListenerContextImpl context, Exception e)
context - the current context in playe - the exceptionprotected void endContext(SQLListenerContext context)
context - the listener context to endpublic ResultSet getResults(Expression<?>... exprs)
exprs - the expression arguments to retrieveprotected Configuration getConfiguration()
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> expr)
ProjectableRT - generic type of the Iteratorpublic <RT> List<RT> list(Expression<RT> expr)
Projectablelist in interface Projectablelist in class ProjectableQuery<Q extends AbstractSQLQuery<Q>>RT - generic type of the Listpublic <RT> SearchResults<RT> listResults(Expression<RT> expr)
Projectableprotected void setParameters(PreparedStatement stmt, List<?> objects, List<Path<?>> constantPaths, Map<ParamExpression<?>,?> params)
public <RT> RT uniqueResult(Expression<RT> expr)
ProjectableThere is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
uniqueResult in interface ProjectableuniqueResult in class ProjectableSQLQuery<Q extends AbstractSQLQuery<Q>>RT - return typeprotected void logQuery(String queryString, Collection<Object> parameters)
protected void cleanupMDC()
public void setUseLiterals(boolean useLiterals)
protected void clone(Q query)
clone in class ProjectableSQLQuery<Q extends AbstractSQLQuery<Q>>public Q clone()
clone in class ProjectableSQLQuery<Q extends AbstractSQLQuery<Q>>public abstract Q clone(Connection connection)
public void setStatementOptions(StatementOptions statementOptions)
Copyright © 2007–2015 Querydsl. All rights reserved.