public void wherePrimaryKey(OpenJPAStateManager sm) throws SQLException { _pk = sm; flags |= PK_WHERE; // force valid if (getAction() == ACTION_DELETE) setValid(true); }
public void wherePrimaryKey(OpenJPAStateManager sm) throws SQLException { _pk = sm; flags |= PK_WHERE; // force valid if (getAction() == ACTION_DELETE) setValid(true); }
public void wherePrimaryKey(OpenJPAStateManager sm) throws SQLException { _pk = sm; flags |= PK_WHERE; // force valid if (getAction() == ACTION_DELETE) setValid(true); }
public void wherePrimaryKey(OpenJPAStateManager sm) throws SQLException { _pk = sm; flags |= PK_WHERE; // force valid if (getAction() == ACTION_DELETE) setValid(true); }
public void wherePrimaryKey(OpenJPAStateManager sm) throws SQLException { _pk = sm; flags |= PK_WHERE; // force valid if (getAction() == ACTION_DELETE) setValid(true); }
public String toString() { StringBuilder buf = new StringBuilder(); buf.append("PrimaryRow["); switch (getAction()) { case ACTION_UPDATE: buf.append("UPDATE"); break; case ACTION_INSERT: buf.append("INSERT"); break; case ACTION_DELETE: buf.append("DELETE"); break; default: buf.append("UNKNOWN"); } buf.append(" ").append(getTable().getName()).append("]: "); buf.append(_pk); return buf.toString(); } }
public String toString() { StringBuilder buf = new StringBuilder(); buf.append("PrimaryRow["); switch (getAction()) { case ACTION_UPDATE: buf.append("UPDATE"); break; case ACTION_INSERT: buf.append("INSERT"); break; case ACTION_DELETE: buf.append("DELETE"); break; default: buf.append("UNKNOWN"); } buf.append(" ").append(getTable().getName()).append("]: "); buf.append(_pk); return buf.toString(); } }
public String toString() { StringBuilder buf = new StringBuilder(); buf.append("PrimaryRow["); switch (getAction()) { case ACTION_UPDATE: buf.append("UPDATE"); break; case ACTION_INSERT: buf.append("INSERT"); break; case ACTION_DELETE: buf.append("DELETE"); break; default: buf.append("UNKNOWN"); } buf.append(" ").append(getTable().getName()).append("]: "); buf.append(_pk); return buf.toString(); } }
public String toString() { StringBuilder buf = new StringBuilder(); buf.append("PrimaryRow["); switch (getAction()) { case ACTION_UPDATE: buf.append("UPDATE"); break; case ACTION_INSERT: buf.append("INSERT"); break; case ACTION_DELETE: buf.append("DELETE"); break; default: buf.append("UNKNOWN"); } buf.append(" ").append(getTable().getName()).append("]: "); buf.append(_pk); return buf.toString(); } }
&& _row != null && _row.getAction() == action) return _row;
/** * If this is a delete, delay foreign keys to other deleted objects if * the key is restricted. If this is an update or insert, delay foreign * keys to other inserts if the key is not logical. If the foreign key * is to a new record and the columns are auto-inc, record it. */ private boolean delayForeignKey(ForeignKey fk, OpenJPAStateManager sm, boolean set) { if (sm == null) return false; if (getAction() == ACTION_DELETE) return sm.isDeleted() && !fk.isDeferred() && fk.getDeleteAction() == ForeignKey.ACTION_RESTRICT; if (!sm.isNew() || sm.isFlushed()) return false; if (!fk.isDeferred() && !fk.isLogical()) return true; if (fk.isPrimaryKeyAutoAssigned()) return true; return false; }
/** * If this is a delete, delay foreign keys to other deleted objects if the * key is restricted or cascade. If this is an update or insert, delay * foreign keys to other inserts if the key is not logical. If the foreign * key is to a new record and the columns are auto-inc, record it. */ private boolean delayForeignKey(ForeignKey fk, OpenJPAStateManager sm, boolean set) { if (sm == null) return false; if (getAction() == ACTION_DELETE) return sm.isDeleted() && !fk.isDeferred() && (fk.getDeleteAction() == ForeignKey.ACTION_RESTRICT || fk.getDeleteAction() == ForeignKey.ACTION_CASCADE); if (!sm.isNew() || sm.isFlushed()) return false; if (!fk.isDeferred() && !fk.isLogical()) return true; if (fk.isPrimaryKeyAutoAssigned()) return true; return false; }
/** * If this is a delete, delay foreign keys to other deleted objects if the * key is restricted or cascade. If this is an update or insert, delay * foreign keys to other inserts if the key is not logical. If the foreign * key is to a new record and the columns are auto-inc, record it. */ private boolean delayForeignKey(ForeignKey fk, OpenJPAStateManager sm, boolean set) { if (sm == null) return false; if (getAction() == ACTION_DELETE) return sm.isDeleted() && !fk.isDeferred() && (fk.getDeleteAction() == ForeignKey.ACTION_RESTRICT || fk.getDeleteAction() == ForeignKey.ACTION_CASCADE); if (!sm.isNew() || sm.isFlushed()) return false; if (!fk.isDeferred() && !fk.isLogical()) return true; if (fk.isPrimaryKeyAutoAssigned()) return true; return false; }
/** * If this is a delete, delay foreign keys to other deleted objects if the * key is restricted or cascade. If this is an update or insert, delay * foreign keys to other inserts if the key is not logical. If the foreign * key is to a new record and the columns are auto-inc, record it. */ private boolean delayForeignKey(ForeignKey fk, OpenJPAStateManager sm, boolean set) { if (sm == null) return false; if (getAction() == ACTION_DELETE) return sm.isDeleted() && !fk.isDeferred() && (fk.getDeleteAction() == ForeignKey.ACTION_RESTRICT || fk.getDeleteAction() == ForeignKey.ACTION_CASCADE); if (!sm.isNew() || sm.isFlushed()) return false; if (!fk.isDeferred() && !fk.isLogical()) return true; if (fk.isPrimaryKeyAutoAssigned()) return true; return false; }
/** * If this is a delete, delay foreign keys to other deleted objects if the * key is restricted or cascade. If this is an update or insert, delay * foreign keys to other inserts if the key is not logical. If the foreign * key is to a new record and the columns are auto-inc, record it. */ private boolean delayForeignKey(ForeignKey fk, OpenJPAStateManager sm, boolean set) { if (sm == null) return false; if (getAction() == ACTION_DELETE) return sm.isDeleted() && !fk.isDeferred() && (fk.getDeleteAction() == ForeignKey.ACTION_RESTRICT || fk.getDeleteAction() == ForeignKey.ACTION_CASCADE); if (!sm.isNew() || sm.isFlushed()) return false; if (!fk.isDeferred() && !fk.isLogical()) return true; if (fk.isPrimaryKeyAutoAssigned()) return true; return false; }
if (row.getAction() == Row.ACTION_INSERT) { if (row.getPrimaryKey() == null) throw new InternalException(_loc.get("ref-cycle"));