private void resolveSqlType(Value value, Type type) {
if ( value == null || ! ( value instanceof SimpleValue ) || ! ( type instanceof AbstractStandardBasicType ) ) {
return;
}
// Converting to AbstractStandardBasicType is bad, but this resolver is TEMPORARY!
AbstractStandardBasicType basicType = ( AbstractStandardBasicType ) type;
Datatype dataType = new Datatype(
basicType.getSqlTypeDescriptor().getSqlType(),
basicType.getName(),
basicType.getReturnedClass()
);
( (SimpleValue) value ).setDatatype( dataType );
}