public void copyInto(RowImpl row, boolean whereOnly) { super.copyInto(row, whereOnly); if (_fks == null || whereOnly || row.getAction() == ACTION_DELETE || !(row instanceof SecondaryRow)) return; SecondaryRow srow = (SecondaryRow) row; if (srow._fks == null) srow._fks = new OpenJPAStateManager[_fks.length]; System.arraycopy(_fks, 0, srow._fks, 0, _fks.length); if (_fkIO != null) { if (srow._fkIO == null) srow._fkIO = new ColumnIO[_fkIO.length]; System.arraycopy(_fkIO, 0, srow._fkIO, 0, _fkIO.length); } } }
protected Column[] getAutoAssignColumns(RowImpl row) { Column[] autoAssign = null; if (row.getAction() == Row.ACTION_INSERT) autoAssign = row.getTable().getAutoAssignedColumns(); return autoAssign; }
protected Column[] getAutoAssignColumns(RowImpl row) { Column[] autoAssign = null; if (row.getAction() == Row.ACTION_INSERT) autoAssign = row.getTable().getAutoAssignedColumns(); return autoAssign; }
protected Column[] getAutoAssignColumns(RowImpl row) { Column[] autoAssign = null; if (row.getAction() == Row.ACTION_INSERT) autoAssign = row.getTable().getAutoAssignedColumns(); return autoAssign; }
protected Column[] getAutoAssignColumns(RowImpl row) { Column[] autoAssign = null; if (row.getAction() == Row.ACTION_INSERT) autoAssign = row.getTable().getAutoAssignedColumns(); return autoAssign; }
/** * Performs a proper deep clone. */ public Object clone() { RowImpl clone = newInstance(getColumns(), getAction()); copyInto(clone, false); return clone; }
/** * Generate the SQL for this row; the result of this method is cached. */ protected String generateSQL(DBDictionary dict) { switch (getAction()) { case ACTION_UPDATE: return getUpdateSQL(dict); case ACTION_INSERT: return getInsertSQL(dict); default: return getDeleteSQL(dict); } }
private void flushSingleRow(RowImpl row, PreparedStatement ps) throws SQLException { row.flush(ps, _dict, _store); int count = ps.executeUpdate(); if (count != 1) { Object failed = row.getFailedObject(); if (failed != null) _exceptions.add(new OptimisticException(failed)); else if (row.getAction() == Row.ACTION_INSERT) throw new SQLException(_loc.get("update-failed-no-failed-obj", String.valueOf(count), row.getSQL(_dict)).getMessage()); } }
/** * Generate the SQL for this row; the result of this method is cached. */ protected String generateSQL(DBDictionary dict) { switch (getAction()) { case ACTION_UPDATE: return getUpdateSQL(dict); case ACTION_INSERT: return getInsertSQL(dict); default: return getDeleteSQL(dict); } }
/** * Performs a proper deep clone. */ public Object clone() { RowImpl clone = newInstance(getColumns(), getAction()); copyInto(clone, false); return clone; }
/** * Performs a proper deep clone. */ public Object clone() { RowImpl clone = newInstance(getColumns(), getAction()); copyInto(clone, false); return clone; }
/** * Performs a proper deep clone. */ public Object clone() { RowImpl clone = newInstance(getColumns(), getAction()); copyInto(clone, false); return clone; }
/** * Performs a proper deep clone. */ public Object clone() { RowImpl clone = newInstance(getColumns(), getAction()); copyInto(clone, false); return clone; }
/** * Generate the SQL for this row; the result of this method is cached. */ protected String generateSQL(DBDictionary dict) { switch (getAction()) { case ACTION_UPDATE: return getUpdateSQL(dict); case ACTION_INSERT: return getInsertSQL(dict); default: return getDeleteSQL(dict); } }
/** * Generate the SQL for this row; the result of this method is cached. */ protected String generateSQL(DBDictionary dict) { switch (getAction()) { case ACTION_UPDATE: return getUpdateSQL(dict); case ACTION_INSERT: return getInsertSQL(dict); default: return getDeleteSQL(dict); } }
/** * Generate the SQL for this row; the result of this method is cached. */ protected String generateSQL(DBDictionary dict) { switch (getAction()) { case ACTION_UPDATE: return getUpdateSQL(dict); case ACTION_INSERT: return getInsertSQL(dict); default: return getDeleteSQL(dict); } }
private void flushSingleRow(RowImpl row, PreparedStatement ps) throws SQLException { if (ps != null) row.flush(ps, _dict, _store); int count = executeUpdate(ps, row.getSQL(_dict), row); if (count != 1) { logSQLWarnings(ps); Object failed = row.getFailedObject(); if (failed != null) _exceptions.add(new OptimisticException(failed)); else if (row.getAction() == Row.ACTION_INSERT) throw new SQLException(_loc.get("update-failed-no-failed-obj", String.valueOf(count), row.getSQL(_dict)).getMessage()); } }
private void flushSingleRow(RowImpl row, PreparedStatement ps) throws SQLException { if (ps != null) row.flush(ps, _dict, _store); int count = executeUpdate(ps, row.getSQL(_dict), row); if (count != 1) { logSQLWarnings(ps); Object failed = row.getFailedObject(); if (failed != null) _exceptions.add(new OptimisticException(failed)); else if (row.getAction() == Row.ACTION_INSERT) throw new SQLException(_loc.get("update-failed-no-failed-obj", String.valueOf(count), row.getSQL(_dict)).getMessage()); } }
private void flushSingleRow(RowImpl row, PreparedStatement ps) throws SQLException { if (ps != null) row.flush(ps, _dict, _store); int count = executeUpdate(ps, row.getSQL(_dict), row); if (count != 1) { logSQLWarnings(ps); Object failed = row.getFailedObject(); if (failed != null) _exceptions.add(new OptimisticException(failed)); else if (row.getAction() == Row.ACTION_INSERT) throw new SQLException(_loc.get("update-failed-no-failed-obj", String.valueOf(count), row.getSQL(_dict)).getMessage()); } }
private void flushSingleRow(RowImpl row, PreparedStatement ps) throws SQLException { if (ps != null) row.flush(ps, _dict, _store); int count = executeUpdate(ps, row.getSQL(_dict), row); if (count != 1) { logSQLWarnings(ps); Object failed = row.getFailedObject(); if (failed != null) _exceptions.add(new OptimisticException(failed)); else if (row.getAction() == Row.ACTION_INSERT) throw new SQLException(_loc.get("update-failed-no-failed-obj", String.valueOf(count), row.getSQL(_dict)).getMessage()); } }