@SuppressWarnings({"unchecked"}) public String renderProjection(RenderingContext renderingContext) { // some drivers/servers do not like parameters in the select clause final ValueHandlerFactory.ValueHandler handler = ValueHandlerFactory.determineAppropriateHandler(literal.getClass()); if (ValueHandlerFactory.isCharacter(literal)) { return '\'' + handler.render(literal) + '\''; } else { return handler.render(literal); } }
@Override @SuppressWarnings({"unchecked"}) protected void resetJavaType(Class targetType) { super.resetJavaType(targetType); ValueHandlerFactory.ValueHandler valueHandler = getValueHandler(); if (valueHandler == null) { valueHandler = ValueHandlerFactory.determineAppropriateHandler(targetType); forceConversion(valueHandler); } if (valueHandler != null) { literal = valueHandler.convert(literal); } }