public abstract class AbstractSQLClause<C extends AbstractSQLClause<C>> extends Object implements DMLClause<C>
| Modifier and Type | Field and Description | 
|---|---|
| protected Configuration | configuration | 
| protected SQLListenerContextImpl | context | 
| protected SQLListeners | listeners | 
| protected boolean | useLiterals | 
| Constructor and Description | 
|---|
| AbstractSQLClause(Configuration configuration) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addListener(SQLListener listener) | 
| protected void | cleanupMDC() | 
| protected void | close(Collection<? extends Statement> stmts) | 
| protected void | close(ResultSet rs) | 
| protected void | close(Statement stmt) | 
| protected SQLBindings | createBindings(QueryMetadata metadata,
              SQLSerializer serializer) | 
| protected SQLSerializer | createSerializer() | 
| protected void | endContext(SQLListenerContextImpl context)Called to end a SQL listener context | 
| protected long | executeBatch(Collection<PreparedStatement> stmts) | 
| abstract List<SQLBindings> | getSQL()Get the SQL string and bindings | 
| protected void | logQuery(org.slf4j.Logger logger,
        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 | reset() | 
| protected void | setParameters(PreparedStatement stmt,
             List<?> objects,
             List<Path<?>> constantPaths,
             Map<ParamExpression<?>,?> params)Set the parameters to the given PreparedStatement | 
| void | setUseLiterals(boolean useLiterals) | 
| protected SQLListenerContextImpl | startContext(Connection connection,
            QueryMetadata metadata,
            RelationalPath<?> entity)Called to create and start a new SQL Listener context | 
protected final Configuration configuration
protected final SQLListeners listeners
protected boolean useLiterals
protected SQLListenerContextImpl context
public AbstractSQLClause(Configuration configuration)
configuration - public void addListener(SQLListener listener)
listener - protected SQLListenerContextImpl startContext(Connection connection, QueryMetadata metadata, RelationalPath<?> entity)
connection - the database connectionmetadata - the meta data for that contextentity - the entity for that contextprotected void onException(SQLListenerContextImpl context, Exception e)
context - the current context in playe - the exceptionprotected void endContext(SQLListenerContextImpl context)
context - the listener context to endprotected SQLBindings createBindings(QueryMetadata metadata, SQLSerializer serializer)
protected SQLSerializer createSerializer()
public abstract List<SQLBindings> getSQL()
protected void setParameters(PreparedStatement stmt, List<?> objects, List<Path<?>> constantPaths, Map<ParamExpression<?>,?> params)
stmt - preparedStatement to be populatedobjects - list of constantsconstantPaths - list of paths related to the constantsparams - map of param to value for param resolvingprotected long executeBatch(Collection<PreparedStatement> stmts) throws SQLException
SQLExceptionprotected void close(Statement stmt)
protected void close(Collection<? extends Statement> stmts)
protected void close(ResultSet rs)
protected void logQuery(org.slf4j.Logger logger,
                        String queryString,
                        Collection<Object> parameters)
protected void cleanupMDC()
protected void reset()
public void setUseLiterals(boolean useLiterals)
Copyright © 2007–2015 Querydsl. All rights reserved.