if (className.equals("com.hardcode.gdbms.engine.values.DateValue")) {
try {
return createValue(DateFormat.getInstance().parse(text));
} catch (ParseException e) {
throw new SemanticException(e);
}
}
if (className.equals("com.hardcode.gdbms.engine.values.DoubleValue")) {
return createValue(Double.parseDouble(text));
}
if (className.equals("com.hardcode.gdbms.engine.values.FloatValue")) {
return createValue(Float.parseFloat(text));
}
if (className.equals("com.hardcode.gdbms.engine.values.IntValue")) {
return createValue(Integer.parseInt(text));
}
if (className.equals("com.hardcode.gdbms.engine.values.LongValue")) {
return createValue(Long.parseLong(text));
}
if (className.equals("com.hardcode.gdbms.engine.values.StringValue")) {
return createValue(text);
}
// default:
throw new SemanticException(
"Unexpected className in createValue (GDBMS) text: " + text +
"-> className: " + className);
}