Methods Summary |
---|
protected oracle.toplink.essentials.queryframework.SQLCall | getCall()Return the call.
return call;
|
public oracle.toplink.essentials.internal.databaseaccess.DatabasePlatform | getPlatform()INTERNAL:
Return the database platform specific information.
return session.getPlatform();
|
protected oracle.toplink.essentials.internal.sessions.AbstractSession | getSession()
return session;
|
protected oracle.toplink.essentials.internal.sessions.AbstractRecord | getTranslationRow()INTERNAL:
Return the row for translation
return translationRow;
|
public java.io.Writer | getWriter()
return writer;
|
public boolean | isFirstElementPrinted()INTERNAL:
Used in figuring out when to print a comma in the select clause
return isFirstElementPrinted;
|
public void | printExpression(oracle.toplink.essentials.expressions.Expression expression)
translateExpression(expression);
|
public void | printField(oracle.toplink.essentials.internal.helper.DatabaseField field)
if (field == null) {
return;
}
try {
// Print the field using either short or long notation i.e. owner + table name.
if (shouldPrintQualifiedNames()) {
getWriter().write(field.getQualifiedName());
} else {
getWriter().write(field.getName());
}
} catch (IOException exception) {
throw ValidationException.fileError(exception);
}
|
public void | printNull(oracle.toplink.essentials.internal.expressions.ConstantExpression nullValueExpression)
if(session.getPlatform().shouldBindLiterals()) {
DatabaseField field = null;
Expression localBase = nullValueExpression.getLocalBase();
if(localBase.isFieldExpression()) {
field = ((FieldExpression)localBase).getField();
} else if(localBase.isQueryKeyExpression()) {
field = ((QueryKeyExpression)localBase).getField();
}
session.getPlatform().appendLiteralToCall(getCall(), getWriter(), field);
} else {
session.getPlatform().appendLiteralToCall(getCall(), getWriter(), null);
}
|
public void | printParameter(oracle.toplink.essentials.internal.expressions.ParameterExpression expression)
try {
getCall().appendTranslationParameter(getWriter(), expression, getPlatform());
} catch (IOException exception) {
throw ValidationException.fileError(exception);
}
|
public void | printParameter(oracle.toplink.essentials.internal.helper.DatabaseField field)
getCall().appendTranslation(getWriter(), field);
|
public void | printPrimitive(java.lang.Object value)
if (value instanceof Vector) {
printValuelist((Vector)value);
return;
}
session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value);
|
public void | printString(java.lang.String value)
try {
getWriter().write(value);
} catch (IOException exception) {
throw ValidationException.fileError(exception);
}
|
public void | printValuelist(java.util.Vector values)
try {
Enumeration valuesEnum = values.elements();
while (valuesEnum.hasMoreElements()) {
Object value = valuesEnum.nextElement();
session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value);
if (valuesEnum.hasMoreElements()) {
getWriter().write(", ");
}
}
} catch (IOException exception) {
throw ValidationException.fileError(exception);
}
|
public boolean | requiresDistinct()If a distinct has been set the DISTINCT clause will be printed.
This is required for batch reading.
return requiresDistinct;
|
protected void | setCall(oracle.toplink.essentials.queryframework.SQLCall call)
this.call = call;
|
public void | setIsFirstElementPrinted(boolean isFirstElementPrinted)INTERNAL:
Used in figuring out when to print a comma in the select clause
this.isFirstElementPrinted = isFirstElementPrinted;
|
public void | setRequiresDistinct(boolean requiresDistinct)If a distinct has been set the DISTINCT clause will be printed.
This is required for batch reading.
this.requiresDistinct = requiresDistinct;
|
protected void | setSession(oracle.toplink.essentials.internal.sessions.AbstractSession theSession)
session = theSession;
|
protected void | setShouldPrintQualifiedNames(boolean shouldPrintQualifiedNames)
this.shouldPrintQualifiedNames = shouldPrintQualifiedNames;
|
protected void | setTranslationRow(oracle.toplink.essentials.internal.sessions.AbstractRecord theRow)INTERNAL:
Set the row for translation
translationRow = theRow;
|
public void | setWriter(java.io.Writer writer)
this.writer = writer;
|
public boolean | shouldPrintParameterValues()
return getTranslationRow() != null;
|
protected boolean | shouldPrintQualifiedNames()
return shouldPrintQualifiedNames;
|
protected void | translateExpression(oracle.toplink.essentials.expressions.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.
theExpression.printSQL(this);
|