*/
public static Value createValue(Object value) {
if (value instanceof Value) {
return (Value) value;
} else if (value == null) {
return new TextValue(null, null);
} else {
if (value instanceof Boolean) {
return new BooleanValue(null, (Boolean) value);
} else if (value instanceof Double) {
return new NumberValue(null, value.toString());
} else if (value instanceof String) {
return new TextValue(null, (String) value);
} else if (value instanceof Long) {
return new NumberValue(null, value.toString());
} else if (value instanceof DateTime) {
return new DateTimeValue(null, (DateTime) value);
} else if (value instanceof Date) {