/** * Write a database-friendly representation of the given parameter to the writer. * Determine the class of the object to be written, and invoke the appropriate print method * for that object. The default is "toString". * The platform may decide to bind some types, such as byte arrays and large strings. * Should only be called in case binding is not used. */ @Override public void appendParameter(Call call, Writer writer, Object parameter) { appendParameterInternal(call, writer, parameter); }
/** * Write a database-friendly representation of the given parameter to the writer. * Determine the class of the object to be written, and invoke the appropriate print method * for that object. The default is "toString". * The platform may decide to bind some types, such as byte arrays and large strings. * Should only be called in case binding is not used. */ public void appendParameter(Call call, Writer writer, Object parameter) { appendParameterInternal(call, writer, parameter); }
/** * Write a database-friendly representation of the given parameter to the writer. * Determine the class of the object to be written, and invoke the appropriate print method * for that object. The default is "toString". * The platform may decide to bind some types, such as byte arrays and large strings. * Should only be called in case binding is not used. */ public void appendParameter(Call call, Writer writer, Object parameter) { appendParameterInternal(call, writer, parameter); }
public int printValuelist(Collection theObjects, DatabaseCall call, Writer writer) throws IOException { int nBoundParameters = 0; writer.write("("); Iterator iterator = theObjects.iterator(); while (iterator.hasNext()) { nBoundParameters = nBoundParameters + appendParameterInternal(call, writer, iterator.next()); if (iterator.hasNext()) { writer.write(", "); } } writer.write(")"); return nBoundParameters; }
public int printValuelist(Collection theObjects, DatabaseCall call, Writer writer) throws IOException { int nBoundParameters = 0; writer.write("("); Iterator iterator = theObjects.iterator(); while (iterator.hasNext()) { nBoundParameters = nBoundParameters + appendParameterInternal(call, writer, iterator.next()); if (iterator.hasNext()) { writer.write(", "); } } writer.write(")"); return nBoundParameters; }
public int printValuelist(Collection theObjects, DatabaseCall call, Writer writer) throws IOException { int nBoundParameters = 0; writer.write("("); Iterator iterator = theObjects.iterator(); while (iterator.hasNext()) { nBoundParameters = nBoundParameters + appendParameterInternal(call, writer, iterator.next()); if (iterator.hasNext()) { writer.write(", "); } } writer.write(")"); return nBoundParameters; }
/** * Print the int array on the writer. Added to handle int[] passed as parameters to named queries * Returns the number of objects using binding. */ public int printValuelist(int[] theObjects, DatabaseCall call, Writer writer) throws IOException { int nBoundParameters = 0; writer.write("("); for (int i = 0; i < theObjects.length; i++) { nBoundParameters = nBoundParameters + appendParameterInternal(call, writer, Integer.valueOf(theObjects[i])); if (i < (theObjects.length - 1)) { writer.write(", "); } } writer.write(")"); return nBoundParameters; }
/** * Print the int array on the writer. Added to handle int[] passed as parameters to named queries * Returns the number of objects using binding. */ public int printValuelist(int[] theObjects, DatabaseCall call, Writer writer) throws IOException { int nBoundParameters = 0; writer.write("("); for (int i = 0; i < theObjects.length; i++) { nBoundParameters = nBoundParameters + appendParameterInternal(call, writer, new Integer(theObjects[i])); if (i < (theObjects.length - 1)) { writer.write(", "); } } writer.write(")"); return nBoundParameters; }
/** * Print the int array on the writer. Added to handle int[] passed as parameters to named queries * Returns the number of objects using binding. */ public int printValuelist(int[] theObjects, DatabaseCall call, Writer writer) throws IOException { int nBoundParameters = 0; writer.write("("); for (int i = 0; i < theObjects.length; i++) { nBoundParameters = nBoundParameters + appendParameterInternal(call, writer, Integer.valueOf(theObjects[i])); if (i < (theObjects.length - 1)) { writer.write(", "); } } writer.write(")"); return nBoundParameters; }
/** * INTERNAL: * In case shouldBindLiterals is true, instead of null value a DatabaseField * value may be passed (so that it's type could be used for binding null). */ public void appendLiteralToCall(Call call, Writer writer, Object literal) { if(shouldBindLiterals()) { appendLiteralToCallWithBinding(call, writer, literal); } else { int nParametersToAdd = appendParameterInternal(call, writer, literal); for(int i=0; i < nParametersToAdd; i++ ) { ((DatabaseCall)call).getParameterTypes().addElement(DatabaseCall.LITERAL); } } }
/** * INTERNAL: * In case shouldBindLiterals is true, instead of null value a DatabaseField * value may be passed (so that it's type could be used for binding null). */ public void appendLiteralToCall(Call call, Writer writer, Object literal) { if(shouldBindLiterals()) { appendLiteralToCallWithBinding(call, writer, literal); } else { int nParametersToAdd = appendParameterInternal(call, writer, literal); for (int i = 0; i < nParametersToAdd; i++) { ((DatabaseCall)call).getParameterTypes().add(DatabaseCall.LITERAL); } } }
/** * INTERNAL: * In case shouldBindLiterals is true, instead of null value a DatabaseField * value may be passed (so that it's type could be used for binding null). */ public void appendLiteralToCall(Call call, Writer writer, Object literal) { if(shouldBindLiterals()) { appendLiteralToCallWithBinding(call, writer, literal); } else { int nParametersToAdd = appendParameterInternal(call, writer, literal); for (int i = 0; i < nParametersToAdd; i++) { ((DatabaseCall)call).getParameterTypes().add(DatabaseCall.LITERAL); } } }