/** * INTERNAL: * Print SQL, this is called from functions, so must not be converted through the mapping. */ public void printSQLWithoutConversion(ExpressionSQLPrinter printer) { printer.printPrimitive(getValue()); }
/** * INTERNAL: * Print SQL onto the stream, using the ExpressionPrinter for context */ public void printSQL(ExpressionSQLPrinter printer) { Object value = this.value; if(this.localBase != null) { value = this.localBase.getFieldValue(value, getSession()); } if(value == null) { printer.printNull(this); } else { printer.printPrimitive(value); } }
/** * INTERNAL: * Print SQL onto the stream, using the ExpressionPrinter for context */ public void printSQL(ExpressionSQLPrinter printer) { Object value = getLocalBase().getFieldValue(getValue(), getSession()); if(value == null) { printer.printNull(this); } else { printer.printPrimitive(value); } }
/** * INTERNAL: * Print SQL onto the stream, using the ExpressionPrinter for context */ public void printSQL(ExpressionSQLPrinter printer) { Object value = getLocalBase().getFieldValue(getValue(), getSession()); if(value == null) { printer.printNull(this); } else { printer.printPrimitive(value); } }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer) { printer.printString("AS OF TIMESTAMP ("); Object value = getValue(); if (value instanceof Expression) { // Sort of an implementation of native sql. // Print AS OF TIMESTAMP (SYSDATE - 1000*60*10) not AS OF ('SYSDATE - 1000*60*10'). if ((value instanceof ConstantExpression) && (((ConstantExpression)value).getValue() instanceof String)) { printer.printString((String)((ConstantExpression)value).getValue()); } else { printer.printExpression((Expression)value); } } else { ConversionManager converter = ConversionManager.getDefaultManager(); value = converter.convertObject(value, ClassConstants.TIMESTAMP); printer.printPrimitive(value); } printer.printString(")"); }
/** * INTERNAL: * Print SQL onto the stream, using the ExpressionPrinter for context */ public void printSQL(ExpressionSQLPrinter printer) { if (printer.shouldPrintParameterValues()) { Object value = getValue(printer.getTranslationRow(), printer.getSession()); if (value instanceof Collection) { printer.printValuelist((Collection)value); }else{ if(getField() == null) { printer.printPrimitive(value); } else { printer.printParameter(this); } } } else { if (getField() != null) { printer.printParameter(this); } } }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer) { printer.printString("AS OF TIMESTAMP ("); Object value = getValue(); if (value instanceof Expression) { // Sort of an implementation of native sql. // Print AS OF TIMESTAMP (SYSDATE - 1000*60*10) not AS OF ('SYSDATE - 1000*60*10'). if ((value instanceof ConstantExpression) && (((ConstantExpression)value).getValue() instanceof String)) { printer.printString((String)((ConstantExpression)value).getValue()); } else { printer.printExpression((Expression)value); } } else { ConversionManager converter = ConversionManager.getDefaultManager(); value = converter.convertObject(value, ClassConstants.TIMESTAMP); printer.printPrimitive(value); } printer.printString(")"); }
/** * INTERNAL: * Print SQL onto the stream, using the ExpressionPrinter for context */ public void printSQL(ExpressionSQLPrinter printer) { if (printer.shouldPrintParameterValues()) { Object value = getValue(printer.getTranslationRow(), printer.getSession()); if (value instanceof Collection) { printer.printValuelist((Collection)value); }else{ if(getField() == null) { printer.printPrimitive(value); } else { printer.printParameter(this); } } } else { if (getField() != null) { printer.printParameter(this); } } }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer) { printer.printString("AS OF SCN ("); Object value = getValue(); if (value instanceof Expression) { // Sort of an implementation of native sql. // Print AS OF SCN (1000L - 45L) not AS OF ('1000L - 45L'). if ((value instanceof ConstantExpression) && (((ConstantExpression)value).getValue() instanceof String)) { printer.printString((String)((ConstantExpression)value).getValue()); } else { printer.printExpression((Expression)value); } } else { ConversionManager converter = ConversionManager.getDefaultManager(); value = converter.convertObject(value, ClassConstants.LONG); printer.printPrimitive(value); } printer.printString(")"); }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer) { printer.printString("AS OF TIMESTAMP ("); Object value = getValue(); if (value instanceof Expression) { // Sort of an implementation of native sql. // Print AS OF TIMESTAMP (SYSDATE - 1000*60*10) not AS OF ('SYSDATE - 1000*60*10'). if ((value instanceof ConstantExpression) && (((ConstantExpression)value).getValue() instanceof String)) { printer.printString((String)((ConstantExpression)value).getValue()); } else { printer.printExpression((Expression)value); } } else { ConversionManager converter = ConversionManager.getDefaultManager(); value = converter.convertObject(value, ClassConstants.TIMESTAMP); printer.printPrimitive(value); } printer.printString(")"); }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer) { printer.printString("AS OF SCN ("); Object value = getValue(); if (value instanceof Expression) { // Sort of an implementation of native sql. // Print AS OF SCN (1000L - 45L) not AS OF ('1000L - 45L'). if ((value instanceof ConstantExpression) && (((ConstantExpression)value).getValue() instanceof String)) { printer.printString((String)((ConstantExpression)value).getValue()); } else { printer.printExpression((Expression)value); } } else { ConversionManager converter = ConversionManager.getDefaultManager(); value = converter.convertObject(value, ClassConstants.LONG); printer.printPrimitive(value); } printer.printString(")"); }
/** * INTERNAL: * Print SQL onto the stream, using the ExpressionPrinter for context */ public void printSQL(ExpressionSQLPrinter printer) { if (printer.shouldPrintParameterValues()) { Object value = getValue(printer.getTranslationRow(), printer.getSession()); if (value instanceof Collection) { printer.printValuelist((Collection)value); }else{ if(getField() == null) { printer.printPrimitive(value); } else { printer.printParameter(this); } } } else { if (getField() != null) { printer.printParameter(this); } } }
/** * INTERNAL: * Prints the as of clause for an expression inside of the FROM clause. */ public void printSQL(ExpressionSQLPrinter printer) { printer.printString("AS OF SCN ("); Object value = getValue(); if (value instanceof Expression) { // Sort of an implementation of native sql. // Print AS OF SCN (1000L - 45L) not AS OF ('1000L - 45L'). if ((value instanceof ConstantExpression) && (((ConstantExpression)value).getValue() instanceof String)) { printer.printString((String)((ConstantExpression)value).getValue()); } else { printer.printExpression((Expression)value); } } else { ConversionManager converter = ConversionManager.getDefaultManager(); value = converter.convertObject(value, ClassConstants.LONG); printer.printPrimitive(value); } printer.printString(")"); }