![]() |
Quadcap Embeddable Database |
Inheritance diagram for com.quadcap.sql.ForeignKeyConstraint:

Definition at line 63 of file ForeignKeyConstraint.java.
Public Member Functions | |
| ForeignKeyConstraint () | |
| Default constructor. | |
| ForeignKeyConstraint (String name, String fTableName) | |
| ForeignKeyConstraint (String name, Vector colNames, String fTableName, Vector fColNames) | |
| void | resetColumns () throws SQLException |
| Reset any mapped columns (e.g. | |
| void | checkInsert (Session session, Row row) throws SQLException, IOException |
| ---INSERT Called before a row is INSERTED, with an opportunity to signal a constraint violation if one can be detected. | |
| void | applyInsert (Session session, Row row, long rowId, Constraint activeIndex) throws SQLException, IOException |
| Called after the specified row has been inserted, with the resulting row ID, and with the active index. | |
| void | checkUpdate (Session session, Row row, long rowId) throws SQLException, IOException |
| void | applyUpdate (Session session, byte[] oldKey, Row row, Row oldRow, long rowId, Constraint activeIndex) throws SQLException, IOException |
| Called after a row has been updated, with the old row, old key, new row and row ID. | |
| void | checkDelete (Session session, Row row, long rowId) throws SQLException, IOException |
| ----DELETE Called before a row is DELETED, with an opportunity to signal a constraint violation if one can be detected. | |
| void | applyDelete (Session session, Row row, long rowId, Constraint activeIndex) throws SQLException, IOException |
| Called after a row has been deleted, with the old row and row ID. | |
| final boolean | isDeferred () |
| Is this constraint 'deferred'? | |
| byte[] | makeKey (Session session, Row row) throws SQLException |
| Create a candidate key for a row from this table. | |
| byte[] | makeFKey (Session session, Row row) throws IOException, SQLException |
| Create a candidate key for a row from the foreign table. | |
| void | setForeignColumn (String name) |
| void | readExternal (ObjectInput in) throws IOException, ClassNotFoundException |
| Read me from a stream. | |
| void | writeExternal (ObjectOutput out) throws IOException |
| Write me to a stream. | |
| String | getFTableName () |
| void | setFTableName (String s) |
| Table | getFTable (Database db) throws SQLException, IOException |
| void | add (Session session) throws SQLException, IOException |
| If you care, remember to 'extend' and embrace. | |
| abstract void | delete (Session session) throws SQLException, IOException |
| Called when the constraint itself is being removed. | |
| int[] | getFCols (Database db) throws SQLException, IOException |
| String | toString () |
| Return a displayable representation for debugging. | |
Package Functions | |
| final Comparator | getComparator () throws SQLException |
| boolean | isSelfReferencing (Database db) throws IOException, SQLException |
Package Attributes | |
| String | fTableName |
| Vector | fColNames |
| Table | fTable |
| UniqueConstraint | fConstraint |
| int[] | fCols |
| transient Comparator | compare |
Private Member Functions | |
| final byte[] | makeKey (Row row, int[] k) throws SQLException |
|
|
Default constructor.
Definition at line 77 of file ForeignKeyConstraint.java. |
|
||||||||||||
|
Definition at line 79 of file ForeignKeyConstraint.java. |
|
||||||||||||||||||||
|
Definition at line 84 of file ForeignKeyConstraint.java. |
|
|
If you care, remember to 'extend' and embrace.
Implements com.quadcap.sql.Constraint. Reimplemented in com.quadcap.sql.ImportedKeyConstraint. Definition at line 213 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.add(). Referenced by com.quadcap.sql.ForeignKeyConstraint.add(). |
|
||||||||||||||||||||
|
Called after a row has been deleted, with the old row and row ID. Constraints which maintain state (such as an index) would extend this class and implement this method to update the index. Implements com.quadcap.sql.Constraint. Reimplemented in com.quadcap.sql.ImportedKeyConstraint. Definition at line 126 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.applyDelete(). Referenced by com.quadcap.sql.ForeignKeyConstraint.applyDelete(). |
|
||||||||||||||||||||
|
Called after the specified row has been inserted, with the resulting row ID, and with the active index. Constraints which maintain state (such as an index) would extend this class and implement this method to update the index Implements com.quadcap.sql.Constraint. Reimplemented in com.quadcap.sql.ImportedKeyConstraint. Definition at line 104 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.applyInsert(). Referenced by com.quadcap.sql.ForeignKeyConstraint.applyInsert(). |
|
||||||||||||||||||||||||||||
|
Called after a row has been updated, with the old row, old key, new row and row ID. Constraints which maintain state (such as an index) would extend this class and implement this method to update the index. Implements com.quadcap.sql.Constraint. Definition at line 115 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.applyUpdate(). Referenced by com.quadcap.sql.ForeignKeyConstraint.applyUpdate(). |
|
||||||||||||||||
|
----DELETE Called before a row is DELETED, with an opportunity to signal a constraint violation if one can be detected.
Implements com.quadcap.sql.Constraint. Reimplemented in com.quadcap.sql.ExportedKeyConstraint. Definition at line 121 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.checkDelete(). Referenced by com.quadcap.sql.ForeignKeyConstraint.checkDelete(). |
|
||||||||||||
|
---INSERT Called before a row is INSERTED, with an opportunity to signal a constraint violation if one can be detected.
Implements com.quadcap.sql.Constraint. Reimplemented in com.quadcap.sql.ImportedKeyConstraint. Definition at line 99 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.checkInsert(). Referenced by com.quadcap.sql.ForeignKeyConstraint.checkInsert(). |
|
||||||||||||||||
|
Definition at line 110 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.checkUpdate(). Referenced by com.quadcap.sql.ForeignKeyConstraint.checkUpdate(). |
|
|
Called when the constraint itself is being removed. Constraints which allocate resources of any kind should release them here since they are about to be discarded and gc'ed. Implements com.quadcap.sql.Constraint. Implemented in com.quadcap.sql.ExportedKeyConstraint, and com.quadcap.sql.ImportedKeyConstraint. |
|
|
Definition at line 139 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.compare, and com.quadcap.sql.Constraint.getColumns(). Referenced by com.quadcap.sql.ExportedKeyConstraint.checkKeyRemoval(), com.quadcap.sql.ImportedKeyConstraint.checkUpdate(), and com.quadcap.sql.ExportedKeyConstraint.checkUpdate(). |
|
|
|
Definition at line 193 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.fTable, com.quadcap.sql.ForeignKeyConstraint.fTableName, and com.quadcap.sql.ForeignKeyConstraint.getFTable(). Referenced by com.quadcap.sql.DeleteConstraint.deleteForeign(), and com.quadcap.sql.ForeignKeyConstraint.getFTable(). |
|
|
Definition at line 185 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.fTableName. Referenced by com.quadcap.sql.StmtDropTable.execute(), com.quadcap.sql.StmtRenameTable.rename(), and com.quadcap.sql.StmtRenameTable.renameForeignKeys(). |
|
|
Is this constraint 'deferred'?
Reimplemented from com.quadcap.sql.Constraint. Definition at line 135 of file ForeignKeyConstraint.java. Referenced by com.quadcap.sql.ImportedKeyConstraint.checkUpdate(), and com.quadcap.sql.ExportedKeyConstraint.getExportedKeys(). |
|
|
Definition at line 240 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.isSelfReferencing(). Referenced by com.quadcap.sql.StmtDropTable.execute(), and com.quadcap.sql.ForeignKeyConstraint.isSelfReferencing(). |
|
||||||||||||
|
Create a candidate key for a row from the foreign table.
Definition at line 156 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.getFCols(), and com.quadcap.sql.ForeignKeyConstraint.makeFKey(). Referenced by com.quadcap.sql.ExportedKeyConstraint.checkDelete(), and com.quadcap.sql.ForeignKeyConstraint.makeFKey(). |
|
||||||||||||
|
Definition at line 162 of file ForeignKeyConstraint.java. |
|
||||||||||||
|
Create a candidate key for a row from this table.
Definition at line 147 of file ForeignKeyConstraint.java. References com.quadcap.sql.Constraint.getColumns(), and com.quadcap.sql.ForeignKeyConstraint.makeKey(). Referenced by com.quadcap.sql.ImportedKeyConstraint.makeKey(), and com.quadcap.sql.ForeignKeyConstraint.makeKey(). |
|
|
Read me from a stream.
Reimplemented from com.quadcap.sql.Constraint. Reimplemented in com.quadcap.sql.ExportedKeyConstraint, and com.quadcap.sql.ImportedKeyConstraint. Definition at line 171 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.fColNames, com.quadcap.sql.ForeignKeyConstraint.fTableName, and com.quadcap.sql.ForeignKeyConstraint.readExternal(). Referenced by com.quadcap.sql.ForeignKeyConstraint.readExternal(). |
|
|
Reset any mapped columns (e.g. in case a column is added or deleted) Reimplemented from com.quadcap.sql.Constraint. Definition at line 94 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.fCols. Referenced by com.quadcap.sql.StmtRenameTable.renameForeignKeys(). |
|
|
Definition at line 166 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.fColNames, and com.quadcap.sql.ForeignKeyConstraint.setForeignColumn(). Referenced by com.quadcap.sql.SQLParser.columnConstraint(), and com.quadcap.sql.ForeignKeyConstraint.setForeignColumn(). |
|
|
Definition at line 189 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.fTableName, and com.quadcap.sql.ForeignKeyConstraint.setFTableName(). Referenced by com.quadcap.sql.StmtRenameTable.renameForeignKeys(), and com.quadcap.sql.ForeignKeyConstraint.setFTableName(). |
|
|
Return a displayable representation for debugging.
Reimplemented from com.quadcap.sql.Constraint. Definition at line 245 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.fColNames, and com.quadcap.sql.ForeignKeyConstraint.fTableName. Referenced by com.quadcap.sql.ImportedKeyConstraint.checkInsert(). |
|
|
Write me to a stream.
Reimplemented from com.quadcap.sql.Constraint. Reimplemented in com.quadcap.sql.ExportedKeyConstraint, and com.quadcap.sql.ImportedKeyConstraint. Definition at line 179 of file ForeignKeyConstraint.java. References com.quadcap.sql.ForeignKeyConstraint.fColNames, com.quadcap.sql.ForeignKeyConstraint.fTableName, and com.quadcap.sql.ForeignKeyConstraint.writeExternal(). Referenced by com.quadcap.sql.ForeignKeyConstraint.writeExternal(). |
|
|
Definition at line 72 of file ForeignKeyConstraint.java. Referenced by com.quadcap.sql.ForeignKeyConstraint.getComparator(). |
|
|
|
Definition at line 71 of file ForeignKeyConstraint.java. Referenced by com.quadcap.sql.ForeignKeyConstraint.getFCols(), and com.quadcap.sql.ForeignKeyConstraint.resetColumns(). |
|
|
Definition at line 70 of file ForeignKeyConstraint.java. Referenced by com.quadcap.sql.ForeignKeyConstraint.getFCols(). |
|
|
Definition at line 69 of file ForeignKeyConstraint.java. Referenced by com.quadcap.sql.ForeignKeyConstraint.getFCols(), and com.quadcap.sql.ForeignKeyConstraint.getFTable(). |
|