Purpose: Expression SQL printer.
Responsibilities:
| Modifier and Type | Field and Description |
|---|---|
| protected SQLCall | call
Stores the call being created. |
| protected boolean | |
| private static final String | |
| protected DatabasePlatform | platform
Stores the current platform to access platform specific functions. |
| protected boolean | requiresDistinct
Used for distincts in functions. |
| protected AbstractSession | session
Stores the current session. |
| protected boolean | shouldPrintQualifiedNames
Indicates whether fully qualified field names (owner + table) should be used or not. |
| protected AbstractRecord | translationRow
Stores the row. |
| protected Writer |
| Access | Constructor and Description |
|---|---|
| public | ExpressionSQLPrinter(AbstractSession session, AbstractRecord translationRow, SQLCall call, boolean printQualifiedNames, ExpressionBuilder builder)
|
| Modifier and Type | Method and Description |
|---|---|
| public SQLCall | |
| public DatabasePlatform | |
| protected AbstractSession | |
| protected AbstractRecord | |
| public Writer | |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| protected void | |
| public void | setIsFirstElementPrinted(boolean isFirstElementPrinted)
INTERNAL: Used in figuring out when to print a comma in the select clause |
| public void | setRequiresDistinct(boolean requiresDistinct)
If a distinct has been set the DISTINCT clause will be printed. |
| protected void | |
| protected void | |
| protected void | |
| public void | |
| public boolean | |
| protected boolean | |
| protected void | translateExpression(Expression theExpression)
Translate an expression i.e. call the appropriate translation method for the expression based on its type. |
| call | back to summary |
|---|---|
| protected SQLCall call Stores the call being created. | |
| isFirstElementPrinted | back to summary |
|---|---|
| protected boolean isFirstElementPrinted | |
| NULL_STRING | back to summary |
|---|---|
| private static final String NULL_STRING | |
| platform | back to summary |
|---|---|
| protected DatabasePlatform platform Stores the current platform to access platform specific functions. | |
| requiresDistinct | back to summary |
|---|---|
| protected boolean requiresDistinct Used for distincts in functions. | |
| session | back to summary |
|---|---|
| protected AbstractSession session Stores the current session. The session accessor is used to print all the primitive types. | |
| shouldPrintQualifiedNames | back to summary |
|---|---|
| protected boolean shouldPrintQualifiedNames Indicates whether fully qualified field names (owner + table) should be used or not. | |
| translationRow | back to summary |
|---|---|
| protected AbstractRecord translationRow Stores the row. Used to print PARAMETER nodes. | |
| writer | back to summary |
|---|---|
| protected Writer writer | |
| ExpressionSQLPrinter | back to summary |
|---|---|
| public ExpressionSQLPrinter(AbstractSession session, AbstractRecord translationRow, SQLCall call, boolean printQualifiedNames, ExpressionBuilder builder) | |
| getCall | back to summary |
|---|---|
| public SQLCall getCall() Return the call. | |
| getPlatform | back to summary |
|---|---|
| public DatabasePlatform getPlatform() INTERNAL: Return the database platform specific information. | |
| getSession | back to summary |
|---|---|
| protected AbstractSession getSession() | |
| getTranslationRow | back to summary |
|---|---|
| protected AbstractRecord getTranslationRow() INTERNAL: Return the row for translation | |
| getWriter | back to summary |
|---|---|
| public Writer getWriter() | |
| isFirstElementPrinted | back to summary |
|---|---|
| public boolean isFirstElementPrinted() INTERNAL: Used in figuring out when to print a comma in the select clause | |
| printExpression | back to summary |
|---|---|
| public void printExpression(Expression expression) | |
| printField | back to summary |
|---|---|
| public void printField(DatabaseField field) | |
| printField | back to summary |
|---|---|
| public void printField(DatabaseField field, DatabaseTable tableAlias) | |
| printList | back to summary |
|---|---|
| public void printList(Collection<Object> values, Boolean canBind) | |
| printNull | back to summary |
|---|---|
| public void printNull(ConstantExpression nullValueExpression) | |
| printParameter | back to summary |
|---|---|
| public void printParameter(ParameterExpression expression) | |
| printParameter | back to summary |
|---|---|
| public void printParameter(DatabaseField field) | |
| printPrimitive | back to summary |
|---|---|
| public void printPrimitive(Object value, Boolean canBind) | |
| printString | back to summary |
|---|---|
| public void printString(String value) | |
| printValuelist | back to summary |
|---|---|
| public void printValuelist(Collection<Object> values, Boolean canBind) | |
| requiresDistinct | back to summary |
|---|---|
| public boolean requiresDistinct() If a distinct has been set the DISTINCT clause will be printed. This is required for batch reading. | |
| setCall | back to summary |
|---|---|
| protected void setCall(SQLCall call) | |
| setIsFirstElementPrinted | back to summary |
|---|---|
| public void setIsFirstElementPrinted(boolean isFirstElementPrinted) INTERNAL: Used in figuring out when to print a comma in the select clause | |
| setRequiresDistinct | back to summary |
|---|---|
| public void setRequiresDistinct(boolean requiresDistinct) If a distinct has been set the DISTINCT clause will be printed. This is required for batch reading. | |
| setSession | back to summary |
|---|---|
| protected void setSession(AbstractSession theSession) | |
| setShouldPrintQualifiedNames | back to summary |
|---|---|
| protected void setShouldPrintQualifiedNames(boolean shouldPrintQualifiedNames) | |
| setTranslationRow | back to summary |
|---|---|
| protected void setTranslationRow(AbstractRecord theRow) INTERNAL: Set the row for translation | |
| setWriter | back to summary |
|---|---|
| public void setWriter(Writer writer) | |
| shouldPrintParameterValues | back to summary |
|---|---|
| public boolean shouldPrintParameterValues() | |
| shouldPrintQualifiedNames | back to summary |
|---|---|
| protected boolean shouldPrintQualifiedNames() | |
| translateExpression | back to summary |
|---|---|
| protected void translateExpression(Expression theExpression) Translate an expression i.e. call the appropriate translation method for the expression based on its type. The translation method is then responsible for translating the subexpressions. | |