public class StatementBuilder extends Object
| Constructor and Description |
|---|
StatementBuilder(int maxBodySize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(String head,
String item,
String separator,
String terminator)
Appends an item.
|
String |
build()
Builds the SQL-statement and resets the builder.
|
int |
getMaxBodySize()
Gets the maximal size of a body-list.
|
boolean |
isAppendable(String head)
Checks whether an item is appendable to previously appended items.
|
boolean |
isAppendable(String head,
String item)
Checks whether an item is appendable to previously appended items.
|
boolean |
isEmpty()
Checks if builder is empty.
|
int |
size()
Returns the size of the current statement.
|
public StatementBuilder(int maxBodySize)
maxBodySize - the maximal size of a body-listpublic boolean isAppendable(String head, String item)
head - the statements headitem - the itemtrue iff item is appendablepublic boolean isAppendable(String head)
head - the statements headtrue iff item is appendablepublic String build()
public void append(String head, String item, String separator, String terminator)
head - same head as previously appended, if anyitem - the itemseparator - separates the itemsterminator - terminates the statementpublic boolean isEmpty()
true if builder is emptypublic int size()
public int getMaxBodySize()