/** * Return the oid columns. */ public Column[] getColumns(ExpState state) { return _path.getClassMapping(state).getPrimaryKeyColumns(); }
/** * Return the oid columns. */ public Column[] getColumns(ExpState state) { return _path.getClassMapping(state).getPrimaryKeyColumns(); }
/** * Return the oid columns. */ public Column[] getColumns(ExpState state) { return _path.getClassMapping(state).getPrimaryKeyColumns(); }
/** * Return the oid columns. */ public Column[] getColumns(ExpState state) { return _path.getClassMapping(state).getPrimaryKeyColumns(); }
/** * Return the oid columns. */ public Column[] getColumns(ExpState state) { return _path.getClassMapping(state).getPrimaryKeyColumns(); }
public Object toDataStoreValue(Select sel, ExpContext ctx, ExpState state, Object val) { if (_exps.projections.length == 0) return _candidate.toDataStoreValue(val, _candidate.getPrimaryKeyColumns(), ctx.store); if (_exps.projections.length == 1) return ((Val) _exps.projections[0]).toDataStoreValue(sel, ctx, state, val); return val; }
public Object toDataStoreValue(Select sel, ExpContext ctx, ExpState state, Object val) { if (_exps.projections.length == 0) return _candidate.toDataStoreValue(val, _candidate.getPrimaryKeyColumns(), ctx.store); if (_exps.projections.length == 1) return ((Val) _exps.projections[0]).toDataStoreValue(sel, ctx, state, val); return val; }
protected List<SQLBuffer> getLockRows(DBDictionary dict, Object id, ClassMapping mapping, JDBCFetchConfiguration fetch, SQLFactory factory) { while (mapping.getJoinablePCSuperclassMapping() != null) mapping = mapping.getJoinablePCSuperclassMapping(); // select only the PK columns, since we just want to lock Select select = factory.newSelect(); select.select(mapping.getPrimaryKeyColumns()); select.wherePrimaryKey(id, mapping, _store); List<SQLBuffer> sqls = new ArrayList<SQLBuffer>(); sqls.add(select.toSelect(true, fetch)); return sqls; }
protected List<SQLBuffer> getLockRows(DBDictionary dict, Object id, ClassMapping mapping, JDBCFetchConfiguration fetch, SQLFactory factory) { while (mapping.getJoinablePCSuperclassMapping() != null) mapping = mapping.getJoinablePCSuperclassMapping(); // select only the PK columns, since we just want to lock Select select = factory.newSelect(); select.select(mapping.getPrimaryKeyColumns()); select.wherePrimaryKey(id, mapping, _store); List<SQLBuffer> sqls = new ArrayList<SQLBuffer>(); sqls.add(select.toSelect(true, fetch)); return sqls; }
protected List<SQLBuffer> getLockRows(DBDictionary dict, Object id, ClassMapping mapping, JDBCFetchConfiguration fetch, SQLFactory factory) { while (mapping.getJoinablePCSuperclassMapping() != null) mapping = mapping.getJoinablePCSuperclassMapping(); // select only the PK columns, since we just want to lock Select select = factory.newSelect(); select.select(mapping.getPrimaryKeyColumns()); select.wherePrimaryKey(id, mapping, _store); List<SQLBuffer> sqls = new ArrayList<SQLBuffer>(); sqls.add(select.toSelect(true, fetch)); return sqls; }
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 int orderByPrimaryKey(ClassMapping mapping, boolean asc, Joins joins, boolean select) { ClassMapping pks = mapping; while (!pks.isPrimaryKeyObjectId(true)) pks = pks.getJoinablePCSuperclassMapping(); Column[] cols = pks.getPrimaryKeyColumns(); recordOrderColumns(cols, asc); return sel.orderByPrimaryKey(mapping, asc, joins, select, isUnion()); }
public int orderByPrimaryKey(ClassMapping mapping, boolean asc, Joins joins, boolean select) { ClassMapping pks = mapping; while (!pks.isPrimaryKeyObjectId(true)) pks = pks.getJoinablePCSuperclassMapping(); Column[] cols = pks.getPrimaryKeyColumns(); recordOrderColumns(cols, asc); return sel.orderByPrimaryKey(mapping, asc, joins, select, isUnion()); }
public int orderByPrimaryKey(ClassMapping mapping, boolean asc, Joins joins, boolean select) { ClassMapping pks = mapping; while (!pks.isPrimaryKeyObjectId(true)) pks = pks.getJoinablePCSuperclassMapping(); Column[] cols = pks.getPrimaryKeyColumns(); recordOrderColumns(cols, asc); return sel.orderByPrimaryKey(mapping, asc, joins, select, isUnion()); }
/** * Flush the primary key values. */ private void flushPrimaryKey(OpenJPAStateManager sm, ColumnIO io, boolean set) throws SQLException { ClassMapping mapping = (ClassMapping) sm.getMetaData(); while (mapping.getTable() != getTable()) mapping = mapping.getPCSuperclassMapping(); Column[] cols = mapping.getPrimaryKeyColumns(); flushJoinValues(sm, cols, cols, io, set); }
public void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState) { super.calculateValue(sel, ctx, state, other, otherState); LitExpState lstate = (LitExpState) state; lstate.mapping = (ClassMapping) getMetaData(); lstate.disc = lstate.mapping.getDiscriminator(); lstate.discValue = lstate.disc != null ? lstate.disc.getValue() : null; sel.select(((ClassMapping) getMetaData()).getPrimaryKeyColumns(), lstate.joins); }
public void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState) { super.calculateValue(sel, ctx, state, other, otherState); LitExpState lstate = (LitExpState) state; lstate.mapping = (ClassMapping) getMetaData(); lstate.disc = lstate.mapping.getDiscriminator(); lstate.discValue = lstate.disc != null ? lstate.disc.getValue() : null; sel.select(((ClassMapping) getMetaData()).getPrimaryKeyColumns(), lstate.joins); }
public void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState) { super.calculateValue(sel, ctx, state, other, otherState); LitExpState lstate = (LitExpState) state; lstate.mapping = (ClassMapping) getMetaData(); lstate.disc = lstate.mapping.getDiscriminator(); lstate.discValue = lstate.disc != null ? lstate.disc.getValue() : null; sel.select(((ClassMapping) getMetaData()).getPrimaryKeyColumns(), lstate.joins); }