// This method generates CAST for parameter markers whose type is correctly
// identified by the query compiler
String paramaterMarker = "?";
Object type = parameter.getType();
if(type != null) {
BasicTypeHelperImpl typeHelper = BasicTypeHelperImpl.getInstance();
String castType = null;
if (typeHelper.isBooleanType(type) || typeHelper.isByteType(type) || typeHelper.isShortType(type)) {
castType = "SMALLINT";
} else if (typeHelper.isIntType(type)) {
castType = "INTEGER";
} else if (typeHelper.isLongType(type)) {
castType = "BIGINT";
} else if (typeHelper.isFloatType(type)) {
castType = "REAL";
} else if (typeHelper.isDoubleType(type)) {
castType = "DOUBLE";
} else if (typeHelper.isStringType(type)) {
castType = "VARCHAR(32672)";
}
if(castType != null){
paramaterMarker = "CAST (? AS " + castType + " )";