public void printValuelist(Collection values) { try { getWriter().write("("); Iterator valuesEnum = values.iterator(); while (valuesEnum.hasNext()) { Object value = valuesEnum.next(); session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); if (valuesEnum.hasNext()) { getWriter().write(", "); } } getWriter().write(")"); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printList(Collection values) { try { getWriter().write("("); Iterator valuesEnum = values.iterator(); while (valuesEnum.hasNext()) { Object value = valuesEnum.next(); if (value instanceof Expression){ ((Expression)value).printSQL(this); }else{ session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); } if (valuesEnum.hasNext()) { getWriter().write(", "); } } getWriter().write(")"); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printList(Collection values) { try { getWriter().write("("); Iterator valuesEnum = values.iterator(); while (valuesEnum.hasNext()) { Object value = valuesEnum.next(); if (value instanceof Expression){ ((Expression)value).printSQL(this); }else{ session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); } if (valuesEnum.hasNext()) { getWriter().write(", "); } } getWriter().write(")"); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printList(Collection values) { try { getWriter().write("("); Iterator valuesEnum = values.iterator(); while (valuesEnum.hasNext()) { Object value = valuesEnum.next(); if (value instanceof Expression){ ((Expression)value).printSQL(this); }else{ session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); } if (valuesEnum.hasNext()) { getWriter().write(", "); } } getWriter().write(")"); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printPrimitive(Object value) { if (value instanceof Collection) { printValuelist((Collection)value); return; } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); }
public void printValuelist(Collection values) { try { getWriter().write("("); Iterator valuesEnum = values.iterator(); while (valuesEnum.hasNext()) { Object value = valuesEnum.next(); // Support nested arrays for IN. if (value instanceof Collection) { printValuelist((Collection)value); } else if (value instanceof Expression) { ((Expression)value).printSQL(this); } else { session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); } if (valuesEnum.hasNext()) { getWriter().write(", "); } } getWriter().write(")"); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printValuelist(Collection values) { try { getWriter().write("("); Iterator valuesEnum = values.iterator(); while (valuesEnum.hasNext()) { Object value = valuesEnum.next(); // Support nested arrays for IN. if (value instanceof Collection) { printValuelist((Collection)value); } else if (value instanceof Expression) { ((Expression)value).printSQL(this); } else { session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); } if (valuesEnum.hasNext()) { getWriter().write(", "); } } getWriter().write(")"); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printPrimitive(Object value) { if (value instanceof Collection) { printValuelist((Collection)value); return; } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); }
public void printPrimitive(Object value) { if (value instanceof Collection) { printValuelist((Collection)value); return; } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); }
public void printNull(ConstantExpression nullValueExpression) { if(session.getPlatform().shouldBindLiterals()) { DatabaseField field = null; Expression localBase = nullValueExpression.getLocalBase(); if(localBase != null && (localBase.isFieldExpression() || localBase.isQueryKeyExpression())) { field = ((DataExpression)localBase).getField(); } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), field); } else { session.getPlatform().appendLiteralToCall(getCall(), getWriter(), null); } }
public void printNull(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 printNull(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); } }