public abstract class AbstractSQLClause<C extends AbstractSQLClause<C>> extends Object implements DMLClause<C>
Modifier and Type | Field and Description |
---|---|
protected Configuration |
configuration |
protected SQLListeners |
listeners |
protected boolean |
useLiterals |
Constructor and Description |
---|
AbstractSQLClause(Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(SQLListener listener) |
protected void |
close(ResultSet rs) |
protected void |
close(Statement stmt) |
protected SQLBindings |
createBindings(QueryMetadata metadata,
SQLSerializer serializer) |
protected SQLSerializer |
createSerializer() |
protected long |
executeBatch(PreparedStatement stmt) |
abstract List<SQLBindings> |
getSQL()
Get the SQL string and bindings
|
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 final Configuration configuration
protected final SQLListeners listeners
protected boolean useLiterals
public AbstractSQLClause(Configuration configuration)
configuration
- public void addListener(SQLListener listener)
listener
- protected 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(PreparedStatement stmt) throws SQLException
SQLException
protected void close(Statement stmt)
protected void close(ResultSet rs)
public void setUseLiterals(boolean useLiterals)
Copyright © 2007–2014 Mysema Ltd. All rights reserved.