public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.COLLECTION && field.getTypeCode() != JavaTypes.ARRAY) throw new MetaDataException(_loc.get("not-coll", field)); super.map(adapt); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.COLLECTION && field.getTypeCode() != JavaTypes.ARRAY) throw new MetaDataException(_loc.get("not-coll", field)); super.map(adapt); }
protected int getJavaType() { if (_javaType == null && vers.getClassMapping().getVersionFieldMapping() != null) { _javaType = Integer.valueOf(vers.getClassMapping().getVersionFieldMapping().getTypeCode()); } else { return JavaTypes.INT; } return _javaType; }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.STRING) throw new MetaDataException(_loc.get("not-clobstring", field)); super.map(adapt); }
protected int getJavaType() { if (_javaType == null && vers.getClassMapping().getVersionFieldMapping() != null) { _javaType = Integer.valueOf(vers.getClassMapping().getVersionFieldMapping().getTypeCode()); } else { return JavaTypes.INT; } return _javaType; }
/** * Convert the field value to a collection. Handles collections and * arrays by default. */ protected Collection toCollection(Object val) { if (field.getTypeCode() == JavaTypes.COLLECTION) return (Collection) val; return JavaTypes.toList(val, field.getElement().getType(), false); }
public Object getPrimaryKeyValue(Result res, Column[] cols, ForeignKey fk, JDBCStore store, Joins joins) throws SQLException { Column col = cols[0]; if (fk != null) col = fk.getColumn(col); return JavaTypes.convert(res.getObject(col, null, joins), field.getTypeCode()); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.STRING) throw new MetaDataException(_loc.get("not-clobstring", field)); super.map(adapt); }
public Object getPrimaryKeyValue(Result res, Column[] cols, ForeignKey fk, JDBCStore store, Joins joins) throws SQLException { Column col = cols[0]; if (fk != null) col = fk.getColumn(col); return JavaTypes.convert(res.getObject(col, null, joins), field.getTypeCode()); }
/** * Convert the field value to a collection. Handles collections and * arrays by default. */ protected Collection toCollection(Object val) { if (field.getTypeCode() == JavaTypes.COLLECTION) return (Collection) val; return JavaTypes.toList(val, field.getElement().getType(), false); }
public boolean populateOrderColumns(FieldMapping fm, Table table, Column[] cols) { for (int i = 0; i < cols.length; i++) { if (_orderName != null && cols.length == 1) cols[i].setName(_orderName); else if (_orderName != null) cols[i].setName(_orderName + i); correctName(table, cols[i]); } return _orderLists && (JavaTypes.ARRAY == fm.getTypeCode() || List.class.isAssignableFrom(fm.getType())); }
public Object getPrimaryKeyValue(Result res, Column[] cols, ForeignKey fk, JDBCStore store, Joins joins) throws SQLException { Column col = cols[0]; if (fk != null) col = fk.getColumn(col); return JavaTypes.convert(res.getObject(col, null, joins), field.getTypeCode()); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.STRING) throw new MetaDataException(_loc.get("not-clobstring", field)); super.map(adapt); }
public boolean populateOrderColumns(FieldMapping fm, Table table, Column[] cols) { for (int i = 0; i < cols.length; i++) { if (!DBIdentifier.isNull(_orderName) && cols.length == 1) cols[i].setIdentifier(_orderName); else if (!DBIdentifier.isNull(_orderName)) cols[i].setIdentifier(DBIdentifier.append(_orderName, Integer.toString(i))); correctName(table, cols[i]); } return _orderLists && (JavaTypes.ARRAY == fm.getTypeCode() || List.class.isAssignableFrom(fm.getType())); }
public boolean populateOrderColumns(FieldMapping fm, Table table, Column[] cols) { for (int i = 0; i < cols.length; i++) { if (!DBIdentifier.isNull(_orderName) && cols.length == 1) cols[i].setIdentifier(_orderName); else if (!DBIdentifier.isNull(_orderName)) cols[i].setIdentifier(DBIdentifier.append(_orderName, Integer.toString(i))); correctName(table, cols[i]); } return _orderLists && (JavaTypes.ARRAY == fm.getTypeCode() || List.class.isAssignableFrom(fm.getType())); }
public boolean populateOrderColumns(FieldMapping fm, Table table, Column[] cols) { for (int i = 0; i < cols.length; i++) { if (!DBIdentifier.isNull(_orderName) && cols.length == 1) cols[i].setIdentifier(_orderName); else if (!DBIdentifier.isNull(_orderName)) cols[i].setIdentifier(DBIdentifier.append(_orderName, Integer.toString(i))); correctName(table, cols[i]); } return _orderLists && (JavaTypes.ARRAY == fm.getTypeCode() || List.class.isAssignableFrom(fm.getType())); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.MAP) throw new MetaDataException(_loc.get("not-map", field)); if (field.getKey().getValueMappedBy() == null) throw new MetaDataException(_loc.get("not-mapped-by-key", field)); super.map(adapt); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.MAP) throw new MetaDataException(_loc.get("not-map", field)); if (field.getKey().getValueMappedBy() == null) throw new MetaDataException(_loc.get("not-mapped-by-key", field)); super.map(adapt); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.MAP) throw new MetaDataException(_loc.get("not-map", field)); if (field.getKey().getValueMappedBy() != null) throw new MetaDataException(_loc.get("mapped-by-key", field)); field.getValueInfo().assertNoSchemaComponents(field, !adapt); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.MAP) throw new MetaDataException(_loc.get("not-map", field)); if (field.getKey().getValueMappedBy() != null) throw new MetaDataException(_loc.get("mapped-by-key", field)); // Non-default mapping Uni-/OneToMany/ForeignKey allows schema components if (field.isUni1ToMFK()) return; if (field.isBiMTo1JT()) field.setBi1MJoinTableInfo(); field.getValueInfo().assertNoSchemaComponents(field, !adapt); }