public Column[] map(ValueMapping vm, String name, ColumnIO io, boolean adapt) { List cols = new ArrayList(); List args = new ArrayList(); super.map(vm, name, io, adapt, cols, args); vm.setColumns((Column[]) cols.toArray(new Column[cols.size()])); _args = args.toArray(); return vm.getColumns(); }
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { List cols = new ArrayList(); List args = new ArrayList(); setMapsIdCol(vm); super.map(vm, name, io, adapt, cols, args); vm.setColumns((Column[]) cols.toArray(new Column[cols.size()])); _args = args.toArray(); return vm.getColumns(); }
public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) { List cols = new ArrayList(); List args = new ArrayList(); setMapsIdCol(vm); super.map(vm, name, io, adapt, cols, args); vm.setColumns((Column[]) cols.toArray(new Column[cols.size()])); _args = args.toArray(); return vm.getColumns(); }
/** * Set the Java type of the column for the given value. */ private static void setColumnJavaType(ValueMapping vm) { Column[] cols = vm.getColumns(); if (cols.length == 1) cols[0].setJavaType(vm.getDeclaredTypeCode()); }
public Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { OpenJPAStateManager sm = (val == null) ? null : new ObjectIdStateManager(val, null, vm); Column[] cols = vm.getColumns(); Object rval = null; if (cols.length > 1) rval = new Object[cols.length]; return super.toDataStoreValue(sm, vm, store, cols, rval, 0); }
public Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { OpenJPAStateManager sm = (val == null) ? null : new ObjectIdStateManager(val, null, vm); Column[] cols = vm.getColumns(); Object rval = null; if (cols.length > 1) rval = new Object[cols.length]; return super.toDataStoreValue(sm, vm, store, cols, rval, 0); }
/** * Set the Java type of the column for the given value. */ private static void setColumnJavaType(ValueMapping vm) { Column[] cols = vm.getColumns(); if (cols.length == 1) cols[0].setJavaType(vm.getDeclaredTypeCode()); }
public Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { OpenJPAStateManager sm = (val == null) ? null : new ObjectIdStateManager(val, null, vm); Column[] cols = vm.getColumns(); Object rval = null; if (cols.length > 1) rval = new Object[cols.length]; return super.toDataStoreValue(sm, vm, store, cols, rval, 0); }
public Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { OpenJPAStateManager sm = (val == null) ? null : new ObjectIdStateManager(val, null, vm); Column[] cols = vm.getColumns(); Object rval = null; if (cols.length > 1) rval = new Object[cols.length]; return super.toDataStoreValue(sm, vm, store, cols, rval, 0); }
/** * Set the Java type of the column for the given value. */ private static void setColumnJavaType(ValueMapping vm) { Column[] cols = vm.getColumns(); if (cols.length == 1) cols[0].setJavaType(vm.getDeclaredTypeCode()); }
public void order(Select sel, ClassMapping elem, Joins joins) { if (elem != null) sel.orderBy(elem.getPrimaryKeyColumns(), _asc, joins, false); else sel.orderBy(_fm.getElementMapping().getColumns(), _asc, joins, false); } }
public Column[] getColumns() { // pcl: 6 July 2007: this seems a bit hacky, but if the mapping is a // version, it will have a NoneFieldMapping (since the version strategy // for the class takes care of it's mapping), and NoneFieldStrategies // do not have columns. if (isVersion()) return getDeclaringMapping().getVersion().getColumns(); else return _val.getColumns(); }
public void order(Select sel, ClassMapping elem, Joins joins) { if (elem != null) sel.orderBy(elem.getPrimaryKeyColumns(), _asc, joins, false); else sel.orderBy(_fm.getElementMapping().getColumns(), _asc, joins, false); } }
public void order(Select sel, ClassMapping elem, Joins joins) { if (elem != null) sel.orderBy(elem.getPrimaryKeyColumns(), _asc, joins, false); else sel.orderBy(_fm.getElementMapping().getColumns(), _asc, joins, false); } }
public void order(Select sel, ClassMapping elem, Joins joins) { if (elem != null) sel.orderBy(elem.getPrimaryKeyColumns(), _asc, joins, false); else sel.orderBy(_fm.getElementMapping().getColumns(), _asc, joins, false); } }
public Unique getUnique(ValueMapping val, DBIdentifier name, boolean adapt) { Column[] cols = val.getColumns(); if (cols.length == 0) return null; Unique unq = val.getMappingRepository().getMappingDefaults(). getUnique(val, name, cols[0].getTable(), cols); return createUnique(val, null, unq, cols, adapt); }
public Index getIndex(ValueMapping val, DBIdentifier name, boolean adapt) { Column[] cols = val.getColumns(); if (cols.length == 0) return null; Index idx = val.getMappingRepository().getMappingDefaults(). getIndex(val, name, cols[0].getTable(), cols); return createIndex(val, null, idx, cols, adapt); }
public Index getIndex(ValueMapping val, DBIdentifier name, boolean adapt) { Column[] cols = val.getColumns(); if (cols.length == 0) return null; Index idx = val.getMappingRepository().getMappingDefaults(). getIndex(val, name, cols[0].getTable(), cols); return createIndex(val, null, idx, cols, adapt); }
/** * Return a unique constraint for the given columns, or null if none. */ public Unique getUnique(ValueMapping val, String name, boolean adapt) { Column[] cols = val.getColumns(); if (cols.length == 0) return null; Unique unq = val.getMappingRepository().getMappingDefaults(). getUnique(val, name, cols[0].getTable(), cols); return createUnique(val, null, unq, cols, adapt); }
public Unique getUnique(ValueMapping val, DBIdentifier name, boolean adapt) { Column[] cols = val.getColumns(); if (cols.length == 0) return null; Unique unq = val.getMappingRepository().getMappingDefaults(). getUnique(val, name, cols[0].getTable(), cols); return createUnique(val, null, unq, cols, adapt); }