public class SqlBuilder extends SimpleExpressionFormatter
Modifier and Type | Field and Description |
---|---|
private SqlDialect |
dialect |
private List<Object> |
parameters |
private List<Object> |
parametersInternal |
private List<Path<?>> |
paths |
private AbstractStatement<?,?> |
statement |
Constructor and Description |
---|
SqlBuilder(AbstractStatement<?,?> statement)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addExpression(Expression expression) |
void |
addParameter(Object value) |
void |
addPath(Path<?> path) |
void |
addPaths(List<Path<?>> pathList) |
void |
addPaths(Path<?>... pathArray) |
void |
addVariable(Variable<?> variable) |
void |
append(Argument<?> argument) |
void |
append(SqlOperator<?,?> operator,
Argument<?> arg2) |
String |
format(Conjunction conjunction) |
protected String |
formatPathSegment(AttributeReadName segment) |
List<Object> |
getParameters() |
(package private) List<Path<?>> |
getPaths() |
String |
getSql() |
AbstractStatement<?,?> |
getStatement() |
getBuffer, isResolveNegativeConjunctions, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
append, append
private final AbstractStatement<?,?> statement
private final SqlDialect dialect
public SqlBuilder(AbstractStatement<?,?> statement)
statement
- the AbstractStatement
to build.public AbstractStatement<?,?> getStatement()
List<Path<?>> getPaths()
List
of all collected PropertyPath
s.public void append(SqlOperator<?,?> operator, Argument<?> arg2)
operator
- the SqlOperator
to append.arg2
- the Argument
to append.public String format(Conjunction conjunction)
conjunction
- the Conjunction
to append.String
representation of the Conjunction
.public void addExpression(Expression expression)
expression
- the Expression
to add.public void addParameter(Object value)
value
- the value to add as bind variable.public void addPath(Path<?> path)
path
- the PropertyPath
to add.protected String formatPathSegment(AttributeReadName segment)
public void addPaths(Path<?>... pathArray)
pathArray
- the PropertyPath
s to add.Copyright © 2001–2016 mmm-Team. All rights reserved.