public Object toObjectValue(ValueMapping vm, Object val) { if (val == null) return null; if (_ordinal) return _vals[((Number) val).intValue()]; return Enum.valueOf(vm.getType(), (String) val); } }
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { Column col = new Column(); col.setIdentifier(name); if (vm.getTypeCode() == JavaTypes.DATE) col.setJavaType(JavaSQLTypes.getDateTypeCode(vm.getType())); else col.setJavaType(vm.getTypeCode()); return new Column[]{ col }; }
public Column[] map(ValueMapping vm, String name, ColumnIO io, boolean adapt) { Column col = new Column(); col.setName(name); if (vm.getTypeCode() == JavaTypes.DATE) col.setJavaType(JavaSQLTypes.getDateTypeCode(vm.getType())); else col.setJavaType(vm.getTypeCode()); return new Column[]{ col }; }
public Object toObjectValue(ValueMapping vm, Object val) { if (val == null) return null; if (_ordinal) return _vals[((Number) val).intValue()]; return Enum.valueOf(vm.getType(), (String) val); } }
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { Column col = new Column(); col.setIdentifier(name); if (vm.getTypeCode() == JavaTypes.DATE) col.setJavaType(JavaSQLTypes.getDateTypeCode(vm.getType())); else col.setJavaType(vm.getTypeCode()); return new Column[]{ col }; }
public Object toObjectValue(ValueMapping vm, Object val) { if (val == null) return null; if (_ordinal) return _vals[((Number) val).intValue()]; return Enum.valueOf(vm.getType(), (String) val); } }
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { Column col = new Column(); col.setIdentifier(name); if (vm.getTypeCode() == JavaTypes.DATE) col.setJavaType(JavaSQLTypes.getDateTypeCode(vm.getType())); else col.setJavaType(vm.getTypeCode()); return new Column[]{ col }; }
public Object toObjectValue(ValueMapping vm, Object val) { if (val == null) return null; if (_ordinal) return _vals[((Number) val).intValue()]; return Enum.valueOf(vm.getType(), (String) val); } }
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { Column col = new Column(); col.setIdentifier(name); if (vm.getTypeCode() == JavaTypes.DATE) col.setJavaType(JavaSQLTypes.getDateTypeCode(vm.getType())); else col.setJavaType(vm.getTypeCode()); return new Column[]{ col }; }
public Object toObjectValue(ValueMapping vm, Object val) { if (val == null) return null; if (_ordinal) return _vals[((Number) val).intValue()]; return Enum.valueOf(vm.getType(), (String) val); } }
public void map(boolean adapt) { ValueMapping vm = cls.getEmbeddingMapping(); if (vm == null || vm.getType() != cls.getDescribedType() || vm.getTypeCode() != JavaTypes.OID) throw new MetaDataException(_loc.get("not-oid", cls)); ClassMappingInfo info = cls.getMappingInfo(); info.assertNoSchemaComponents(cls, true); cls.setTable(vm.getFieldMapping().getTable()); } }
public Object toObjectValue(ValueMapping vm, Object val) { if (val == null) return null; if (_ordinal) return _vals[((Number) val).intValue()]; return Enum.valueOf(vm.getType(), (String) val); } }
public void map(boolean adapt) { ValueMapping vm = cls.getEmbeddingMapping(); if (vm == null || vm.getType() != cls.getDescribedType() || vm.getTypeCode() != JavaTypes.OID) throw new MetaDataException(_loc.get("not-oid", cls)); ClassMappingInfo info = cls.getMappingInfo(); info.assertNoSchemaComponents(cls, true); cls.setTable(vm.getFieldMapping().getTable()); } }
/** * Convert the given primitive array to a wrapper array if needed. */ public static Object toObjectValue(ValueMapping vm, byte[] array) { if (array == null) return null; if (vm.getType().getComponentType() == Byte.class) { Byte[] objectArray = new Byte[array.length]; for (int i = 0; i < array.length; i++) objectArray[i] = new Byte(array[i]); return objectArray; } return array; }
public void map(boolean adapt) { ValueMapping vm = cls.getEmbeddingMapping(); if (vm == null || vm.getType() != cls.getDescribedType() || vm.getTypeCode() != JavaTypes.OID) throw new MetaDataException(_loc.get("not-oid", cls)); ClassMappingInfo info = cls.getMappingInfo(); info.assertNoSchemaComponents(cls, true); cls.setTable(vm.getFieldMapping().getTable()); } }
/** * Convert the given primitive array to a wrapper array if needed. */ public static Object toObjectValue(ValueMapping vm, byte[] array) { if (array == null) return null; if (vm.getType().getComponentType() == Byte.class) { Byte[] objectArray = new Byte[array.length]; for (int i = 0; i < array.length; i++) objectArray[i] = Byte.valueOf(array[i]); return objectArray; } return array; }
public void map(boolean adapt) { ValueMapping vm = cls.getEmbeddingMapping(); if (vm == null || vm.getType() != cls.getDescribedType() || vm.getTypeCode() != JavaTypes.OID) throw new MetaDataException(_loc.get("not-oid", cls)); ClassMappingInfo info = cls.getMappingInfo(); info.assertNoSchemaComponents(cls, true); cls.setTable(vm.getFieldMapping().getTable()); } }
/** * Convert the given primitive array to a wrapper array if needed. */ public static Object toObjectValue(ValueMapping vm, byte[] array) { if (array == null) return null; if (vm.getType().getComponentType() == Byte.class) { Byte[] objectArray = new Byte[array.length]; for (int i = 0; i < array.length; i++) objectArray[i] = Byte.valueOf(array[i]); return objectArray; } return array; }
public void map(boolean adapt) { ValueMapping vm = cls.getEmbeddingMapping(); if (vm == null || vm.getType() != cls.getDescribedType() || vm.getTypeCode() != JavaTypes.OID) throw new MetaDataException(_loc.get("not-oid", cls)); ClassMappingInfo info = cls.getMappingInfo(); info.assertNoSchemaComponents(cls, true); cls.setTable(vm.getFieldMapping().getTable()); } }
/** * Convert the given primitive array to a wrapper array if needed. */ public static Object toObjectValue(ValueMapping vm, char[] array) { if (array == null) return null; if (vm.getType().getComponentType() == Character.class) { Character[] objectArray = new Character[array.length]; for (int i = 0; i < array.length; i++) objectArray[i] = Character.valueOf(array[i]); return objectArray; } return array; }