Package org.apache.openjpa.jdbc.sql
Interface RowManager
-
- All Known Implementing Classes:
RowManagerImpl,StateComparisonVersionStrategy.CustomUpdate
public interface RowManagerManages rows during an insert/update/delete process. Row managers do not have to be threadsafe.- Author:
- Abe White
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidflushAllRows(Row row)Flush the logical row.voidflushSecondaryRow(Row row)Flush the secondary row; after flushing the row is available for reuse.RowgetAllRows(Table table, int action)Return a logical row representing an update that should be made to all rows of the given table.RowgetRow(Table table, int action, OpenJPAStateManager sm, boolean create)Return the row for the given table and owner object, or null ifcreateis false and the row has not already been created.RowgetSecondaryRow(Table table, int action)Return a row for the given secondary table.
-
-
-
Method Detail
-
getRow
Row getRow(Table table, int action, OpenJPAStateManager sm, boolean create)
Return the row for the given table and owner object, or null ifcreateis false and the row has not already been created. The action must be one ofRow.ACTION_INSERT,Row.ACTION_UPDATE,Row.ACTION_DELETE.
-
getSecondaryRow
Row getSecondaryRow(Table table, int action)
Return a row for the given secondary table. The action must be one ofRow.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 theUPDATEaction. 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.
-
flushSecondaryRow
void flushSecondaryRow(Row row) throws java.sql.SQLException
Flush the secondary row; after flushing the row is available for reuse. It will retain all previously set values.- Throws:
java.sql.SQLException
-
getAllRows
Row getAllRows(Table table, int action)
Return a logical row representing an update that should be made to all rows of the given table. The action must be one ofRow.ACTION_UPDATE,Row.ACTION_DELETE.
-
flushAllRows
void flushAllRows(Row row) throws java.sql.SQLException
Flush the logical row.- Throws:
java.sql.SQLException
-
-