protected RowImpl newInstance(Column[] cols, int action) { return new PrimaryRow(cols, action, _pk); }
protected RowImpl newInstance(Column[] cols, int action) { return new PrimaryRow(cols, action, _pk); }
protected RowImpl newInstance(Column[] cols, int action) { return new PrimaryRow(cols, action, _pk); }
protected RowImpl newInstance(Column[] cols, int action) { return new PrimaryRow(cols, action, _pk); }
protected RowImpl newInstance(Column[] cols, int action) { return new PrimaryRow(cols, action, _pk); }
_row = new PrimaryRow(table, action, sm); map.put(_key, _row); if (_primaryOrder != null) {
_row = new PrimaryRow(table, action, sm); map.put(_key, _row); if (_primaryOrder != null) {
/** * Break a circular dependency caused by delete operations. * If deleted row A has a ciricular fk to deleted row B, then use an update * statement to null A's fk to B before deleting B, then delete A. * @param edge Edge in the dependency graph corresponding to a foreign key * constraint. This dependency is broken by nullifying the foreign key. * @param deleteUpdates Collection of update statements that are executed * before the delete operations are flushed */ private void addDeleteUpdate(Edge edge, Collection deleteUpdates) throws SQLException { PrimaryRow row; RowImpl update; ForeignKey fk; // copy where conditions into new update that nulls the fk row = (PrimaryRow) edge.getTo(); update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); if (edge.getUserObject() instanceof ForeignKey) { fk = (ForeignKey) edge.getUserObject(); update.setForeignKey(fk, row.getForeignKeyIO(fk), null); } else update.setNull((Column) edge.getUserObject()); deleteUpdates.add(update); }
/** * Break a circular dependency caused by delete operations. * If deleted row A has a ciricular fk to deleted row B, then use an update * statement to null A's fk to B before deleting B, then delete A. * @param edge Edge in the dependency graph corresponding to a foreign key * constraint. This dependency is broken by nullifying the foreign key. * @param deleteUpdates Collection of update statements that are executed * before the delete operations are flushed */ private void addDeleteUpdate(Edge edge, Collection deleteUpdates) throws SQLException { PrimaryRow row; RowImpl update; ForeignKey fk; // copy where conditions into new update that nulls the fk row = (PrimaryRow) edge.getTo(); update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); if (edge.getUserObject() instanceof ForeignKey) { fk = (ForeignKey) edge.getUserObject(); update.setForeignKey(fk, row.getForeignKeyIO(fk), null); } else update.setNull((Column) edge.getUserObject()); deleteUpdates.add(update); }
/** * Break a circular dependency caused by delete operations. * If deleted row A has a ciricular fk to deleted row B, then use an update * statement to null A's fk to B before deleting B, then delete A. * @param edge Edge in the dependency graph corresponding to a foreign key * constraint. This dependency is broken by nullifying the foreign key. * @param deleteUpdates Collection of update statements that are executed * before the delete operations are flushed */ private void addDeleteUpdate(Edge edge, Collection deleteUpdates) throws SQLException { PrimaryRow row; RowImpl update; ForeignKey fk; // copy where conditions into new update that nulls the fk row = (PrimaryRow) edge.getTo(); update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); if (edge.getUserObject() instanceof ForeignKey) { fk = (ForeignKey) edge.getUserObject(); update.setForeignKey(fk, row.getForeignKeyIO(fk), null); } else update.setNull((Column) edge.getUserObject()); deleteUpdates.add(update); }
/** * Break a circular dependency caused by delete operations. * If deleted row A has a ciricular fk to deleted row B, then use an update * statement to null A's fk to B before deleting B, then delete A. * @param edge Edge in the dependency graph corresponding to a foreign key * constraint. This dependency is broken by nullifying the foreign key. * @param deleteUpdates Collection of update statements that are executed * before the delete operations are flushed */ private void addDeleteUpdate(Edge edge, Collection deleteUpdates) throws SQLException { PrimaryRow row; RowImpl update; ForeignKey fk; // copy where conditions into new update that nulls the fk row = (PrimaryRow) edge.getTo(); update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); if (edge.getUserObject() instanceof ForeignKey) { fk = (ForeignKey) edge.getUserObject(); update.setForeignKey(fk, row.getForeignKeyIO(fk), null); } else update.setNull((Column) edge.getUserObject()); deleteUpdates.add(update); }
/** * Break a circular dependency caused by delete operations. * If deleted row A has a ciricular fk to deleted row B, then use an update * statement to null A's fk to B before deleting B, then delete A. * @param edge Edge in the dependency graph corresponding to a foreign key * constraint. This dependency is broken by nullifying the foreign key. * @param deleteUpdates Collection of update statements that are executed * before the delete operations are flushed */ private void addDeleteUpdate(Edge edge, Collection deleteUpdates) throws SQLException { PrimaryRow row; RowImpl update; ForeignKey fk; // copy where conditions into new update that nulls the fk row = (PrimaryRow) edge.getTo(); update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); if (edge.getUserObject() instanceof ForeignKey) { fk = (ForeignKey) edge.getUserObject(); update.setForeignKey(fk, row.getForeignKeyIO(fk), null); } else update.setNull((Column) edge.getUserObject()); deleteUpdates.add(update); }
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); update.setForeignKey(fks[i], row.getForeignKeyIO(fks[i]), null);
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); update.setForeignKey(fks[i], row.getForeignKeyIO(fks[i]), null);
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); update.setForeignKey(fks[i], row.getForeignKeyIO(fks[i]), null);
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); row.copyInto(update, true); update.setForeignKey(fks[i], row.getForeignKeyIO(fks[i]), null);
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); if (row.getAction() == Row.ACTION_INSERT) { if (row.getPrimaryKey() == null)
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); if (row.getAction() == Row.ACTION_INSERT) { if (row.getPrimaryKey() == null)
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); if (row.getAction() == Row.ACTION_INSERT) { if (row.getPrimaryKey() == null)
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null); if (row.getAction() == Row.ACTION_INSERT) { if (row.getPrimaryKey() == null)