* Utility method for use by mapping strategies.
*/
public Row getRow(OpenJPAStateManager sm, JDBCStore store, RowManager rm,
int action)
throws SQLException {
Row row = null;
boolean newOuterRow = false;
if (_fk != null && _outer && action != Row.ACTION_DELETE) {
// if updating with outer join, delete old value first, then insert;
// we can't just update b/c the row might not exist
if (action == Row.ACTION_UPDATE) {
// maybe some other field already is updating?
row = rm.getRow(getTable(), Row.ACTION_UPDATE, sm, false);
if (row == null) {
Row del = rm.getRow(getTable(), Row.ACTION_DELETE, sm,
true);
del.whereForeignKey(_fk, sm);
}
} else
row = rm.getRow(getTable(), Row.ACTION_INSERT, sm, false);
// only update/insert if the row exists already or the value is