public Column[] map(ValueMapping vm, String name, ColumnIO io, boolean adapt) { // all enum classes have a static method called 'values()' // that returns an array of all the enum values try { Method m = vm.getType().getMethod("values", (Class[]) null); _vals = (Enum[]) m.invoke(null, (Object[]) null); } catch (Exception e) { throw new MetaDataException().setCause(e); } Column col = new Column(); col.setName(name); if (_ordinal) col.setJavaType(JavaTypes.SHORT); else { // look for the longest enum value name; use 20 as min length to // leave room for future long names int len = 20; for (int i = 0; i < _vals.length; i++) len = Math.max(_vals[i].name().length(), len); col.setJavaType(JavaTypes.STRING); col.setSize(len); } return new Column[]{ col }; }
public Column[] map(ValueMapping vm, String name, ColumnIO io, boolean adapt) { // all enum classes have a static method called 'values()' // that returns an array of all the enum values try { Method m = vm.getType().getMethod("values", (Class[]) null); _vals = (Enum[]) m.invoke(null, (Object[]) null); } catch (Exception e) { throw new MetaDataException().setCause(e); } Column col = new Column(); col.setName(name); if (_ordinal) col.setJavaType(JavaTypes.SHORT); else { // look for the longest enum value name; use 20 as min length to // leave room for future long names int len = 20; for (int i = 0; i < _vals.length; i++) len = Math.max(_vals[i].name().length(), len); col.setJavaType(JavaTypes.STRING); col.setSize(len); } return new Column[]{ col }; }
e = ((PrivilegedActionException) e).getException(); throw new MetaDataException(_loc.get("factory-err", this, Exceptions.toString(val), e.toString())).setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("null-cons", oid, _type)). setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("externalizer-err", this, Exceptions.toString(val), e.toString())).setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("externalizer-err", this, Exceptions.toString(val), e.toString())).setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("externalizer-err", this, Exceptions.toString(val), e.toString())).setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("externalizer-err", this, Exceptions.toString(val), e.toString())).setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("null-cons", oid, _type)). setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("null-cons", oid, _type)). setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("null-cons", oid, _type)). setCause(e);
} catch (Exception e) { throw new MetaDataException(_loc.get("null-cons", _type)). setCause(e);
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { // all enum classes have a static method called 'values()' // that returns an array of all the enum values try { Method m = vm.getType().getMethod("values", (Class[]) null); _vals = (Enum[]) m.invoke(null, (Object[]) null); } catch (Exception e) { throw new MetaDataException(_loc.get("not-enum-field", vm.getFieldMapping().getFullName(true), Exceptions.toClassName(vm.getType()))).setCause(e); } Column col = new Column(); col.setIdentifier(name); if (_ordinal) col.setJavaType(JavaTypes.SHORT); else { // look for the longest enum value name; use 20 as min length to // leave room for future long names int len = 20; for (int i = 0; i < _vals.length; i++) len = Math.max(_vals[i].name().length(), len); col.setJavaType(JavaTypes.STRING); col.setSize(len); } return new Column[]{ col }; }
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { // all enum classes have a static method called 'values()' // that returns an array of all the enum values try { Method m = vm.getType().getMethod("values", (Class[]) null); _vals = (Enum[]) m.invoke(null, (Object[]) null); } catch (Exception e) { throw new MetaDataException(_loc.get("not-enum-field", vm.getFieldMapping().getFullName(true), Exceptions.toClassName(vm.getType()))).setCause(e); } Column col = new Column(); col.setIdentifier(name); if (_ordinal) col.setJavaType(JavaTypes.SHORT); else { // look for the longest enum value name; use 20 as min length to // leave room for future long names int len = 20; for (int i = 0; i < _vals.length; i++) len = Math.max(_vals[i].name().length(), len); col.setJavaType(JavaTypes.STRING); col.setSize(len); } return new Column[]{ col }; }
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { // all enum classes have a static method called 'values()' // that returns an array of all the enum values try { Method m = vm.getType().getMethod("values", (Class[]) null); _vals = (Enum[]) m.invoke(null, (Object[]) null); } catch (Exception e) { throw new MetaDataException(_loc.get("not-enum-field", vm.getFieldMapping().getFullName(true), Exceptions.toClassName(vm.getType()))).setCause(e); } Column col = new Column(); col.setIdentifier(name); if (_ordinal) col.setJavaType(JavaTypes.SHORT); else { // look for the longest enum value name; use 20 as min length to // leave room for future long names int len = 20; for (int i = 0; i < _vals.length; i++) len = Math.max(_vals[i].name().length(), len); col.setJavaType(JavaTypes.STRING); col.setSize(len); } return new Column[]{ col }; }
e = ((PrivilegedActionException) e).getException(); throw new MetaDataException(_loc.get("cant-init-seq", _name)). setCause(e);
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { // all enum classes have a static method called 'values()' // that returns an array of all the enum values try { Method m = vm.getType().getMethod("values", (Class[]) null); _vals = (Enum[]) m.invoke(null, (Object[]) null); } catch (Exception e) { throw new MetaDataException(_loc.get("not-enum-field", vm.getFieldMapping().getFullName(true), Exceptions.toClassName(vm.getType()))).setCause(e); } Column col = new Column(); col.setIdentifier(name); if (_ordinal) col.setJavaType(JavaTypes.SHORT); else { // look for the longest enum value name; use 20 as min length to // leave room for future long names int len = 20; for (int i = 0; i < _vals.length; i++) len = Math.max(_vals[i].name().length(), len); col.setJavaType(JavaTypes.STRING); col.setSize(len); } return new Column[]{ col }; }
e = ((PrivilegedActionException) e).getException(); throw new MetaDataException(_loc.get("cant-init-seq", _name)). setCause(e);
e = ((PrivilegedActionException) e).getException(); throw new MetaDataException(_loc.get("cant-init-seq", _name)). setCause(e);
e = ((PrivilegedActionException) e).getException(); throw new MetaDataException(_loc.get("cant-init-seq", _name)). setCause(e);