|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.sql.RowImpl org.apache.openjpa.jdbc.meta.strats.StateComparisonVersionStrategy.CustomUpdate
public static class StateComparisonVersionStrategy.CustomUpdate
Row implementation we use to pass to versionable mappings so they can set up the where conditions we need to add to update statements.
Field Summary |
---|
Fields inherited from class org.apache.openjpa.jdbc.sql.RowImpl |
---|
flags, NULL, VALID |
Fields inherited from interface org.apache.openjpa.jdbc.sql.Row |
---|
ACTION_DELETE, ACTION_INSERT, ACTION_UNKNOWN, ACTION_UPDATE |
Method Summary | |
---|---|
void |
flushAllRows(Row row)
Flush the logical row. |
void |
flushSecondaryRow(Row row)
Flush the secondary row; after flushing the row is available for reuse. |
Collection |
getAllRowDeletes()
|
Row |
getAllRows(Table table,
int action)
Return a logical row representing an update that should be made to all rows of the given table. |
Collection |
getAllRowUpdates()
|
Collection |
getDeletes()
|
Collection |
getInserts()
|
Row |
getRow(Table table,
int action,
OpenJPAStateManager sm,
boolean create)
Return the row for the given table and owner object, or null if create is false and the row has not already been created. |
Collection |
getSecondaryDeletes()
|
Row |
getSecondaryRow(Table table,
int action)
Return a row for the given secondary table. |
Collection |
getSecondaryUpdates()
|
String |
getSQL()
Return a boolean SQL expression that should be added to the WHERE clause of an UPDATE to test whether the current database record matches our stored version. |
Collection |
getUpdates()
|
boolean |
hasAutoAssignConstraints()
|
protected RowImpl |
newInstance(Column[] cols,
int action)
Return a new row. |
void |
setObject(Column col,
Object val)
Set the value of the given column in this row. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getSQL()
protected RowImpl newInstance(Column[] cols, int action)
RowImpl
newInstance
in class RowImpl
public boolean hasAutoAssignConstraints()
public Collection getInserts()
public Collection getUpdates()
public Collection getDeletes()
public Collection getSecondaryUpdates()
public Collection getSecondaryDeletes()
public Collection getAllRowUpdates()
public Collection getAllRowDeletes()
public Row getRow(Table table, int action, OpenJPAStateManager sm, boolean create)
RowManager
create
is false and the row has not already been created.
The action must be one of Row.ACTION_INSERT
,
Row.ACTION_UPDATE
, Row.ACTION_DELETE
.
getRow
in interface RowManager
public Row getSecondaryRow(Table table, int action)
RowManager
Row.ACTION_INSERT
,
Row.ACTION_UPDATE
, Row.ACTION_DELETE
.
Note that secondary rows are not considered when creating the foreign
key dependency graph, with can cause constraint violations when using
the UPDATE
action. Only use this action if the secondary
row does not have restrict-action foreign keys. Otherwise use both
a delete and then an insert to perform the update.
getSecondaryRow
in interface RowManager
public void flushSecondaryRow(Row row)
RowManager
flushSecondaryRow
in interface RowManager
public Row getAllRows(Table table, int action)
RowManager
Row.ACTION_UPDATE
, Row.ACTION_DELETE
.
getAllRows
in interface RowManager
public void flushAllRows(Row row)
RowManager
flushAllRows
in interface RowManager
public void setObject(Column col, Object val) throws SQLException
Row
setObject
in interface Row
setObject
in class RowImpl
col
- the column being setval
- the value for the column
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |