public interface QueryTextGenerator
Modifier and Type | Interface and Description |
---|---|
static interface |
QueryTextGenerator.StringBuilderAppender |
Modifier and Type | Field and Description |
---|---|
static String |
PREFIX_PARAMETER_IDENTIFIER |
Modifier and Type | Method and Description |
---|---|
void |
appendBinaryOperation(String operatorIdentifier,
int precedence,
QueryTextGenerator.StringBuilderAppender operand1Appender,
QueryTextGenerator.StringBuilderAppender operand2Appender,
StringBuilder builder) |
void |
appendBooleanLiteral(boolean value,
StringBuilder builder) |
void |
appendFieldName(String fieldName,
StringBuilder builder) |
void |
appendNumericalLiteral(Number value,
StringBuilder builder) |
void |
appendOperand(QueryExpression operand,
int precedence,
StringBuilder builder)
Appends the given operand as child of an operation with the given precedence to the given
StringBuilder . |
void |
appendParameterName(String parameterName,
StringBuilder builder) |
void |
appendStringLiteral(String value,
StringBuilder builder) |
void |
appendUnaryOperation(String operatorIdentifier,
QueryTextGenerator.StringBuilderAppender stringBuilderAppender,
StringBuilder builder) |
int |
binaryOperationSizeGuess(String operatorIdentifier,
int sizeGuessOperand1,
int sizeGuessOperand2) |
int |
booleanLiteralSizeGuess() |
String |
createSelectQuery(String tableName,
String tableAlias,
QueryExpression condition)
Creates the string of a select query for the given parameters.
|
int |
fieldNameSizeGuess(String fieldName) |
int |
numericalLiteralSizeGuess() |
int |
parameterNameSizeGuess(String parameterName) |
int |
stringLiteralSizeGuess(String value) |
String |
translateSaperionPattern(String parameterValue) |
int |
unaryOperationSizeGuess(String operatorIdentifier,
int sizeGuessOperand) |
String |
uniqueIdentifier(String identifierPrefix)
creates an syntactically valid identifier that is unique and starts with the given prefix.
|
static final String PREFIX_PARAMETER_IDENTIFIER
String uniqueIdentifier(String identifierPrefix)
identifierPrefix
- the prefix for the identifierString createSelectQuery(String tableName, String tableAlias, QueryExpression condition)
tableName
- the name of the table to select ontableAlias
- the alias to give the table - for reference in the conditioncondition
- the where clause of the queryvoid appendOperand(QueryExpression operand, int precedence, StringBuilder builder)
StringBuilder
. It is assumed, that the builder builds the where clause of a query.operand
- the operand to appendprecedence
- the precedence of the operands operationbuilder
- the builder to append tovoid appendBinaryOperation(String operatorIdentifier, int precedence, QueryTextGenerator.StringBuilderAppender operand1Appender, QueryTextGenerator.StringBuilderAppender operand2Appender, StringBuilder builder)
void appendUnaryOperation(String operatorIdentifier, QueryTextGenerator.StringBuilderAppender stringBuilderAppender, StringBuilder builder)
int binaryOperationSizeGuess(String operatorIdentifier, int sizeGuessOperand1, int sizeGuessOperand2)
int unaryOperationSizeGuess(String operatorIdentifier, int sizeGuessOperand)
void appendBooleanLiteral(boolean value, StringBuilder builder)
int booleanLiteralSizeGuess()
void appendFieldName(String fieldName, StringBuilder builder)
void appendParameterName(String parameterName, StringBuilder builder)
int fieldNameSizeGuess(String fieldName)
int parameterNameSizeGuess(String parameterName)
void appendNumericalLiteral(Number value, StringBuilder builder)
int numericalLiteralSizeGuess()
void appendStringLiteral(String value, StringBuilder builder)
int stringLiteralSizeGuess(String value)
Copyright © 2016 SAPERION AG. All rights reserved.