Package edu.caltech.nanodb.relations
Class ForeignKeyColumnRefs
- java.lang.Object
-
- edu.caltech.nanodb.relations.ForeignKeyColumnRefs
-
public class ForeignKeyColumnRefs extends java.lang.Object
This class represents a foreign key constraint between two tables in the database. The referencing table is not recorded in this data structure because this key will be a member of that table's schema.
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
colIndexes
This is the array of column indexes in the referencing table of the foreign key.private java.lang.String
constraintName
This is the optional name of the constraint specified in the DDL.private ForeignKeyValueChangeOption
onDeleteOption
This is the ON DELETE behaviorprivate ForeignKeyValueChangeOption
onUpdateOption
This is the ON UPDATE behaviorprivate int[]
referencedColIndexes
These are the indexes of the columns in the referenced table.private java.lang.String
referencedTable
This is the name of the referenced table in the foreign key.
-
Constructor Summary
Constructors Constructor Description ForeignKeyColumnRefs(int[] colIndexes, java.lang.String referencedTable, int[] referencedColIndexes, ForeignKeyValueChangeOption onDeleteOption, ForeignKeyValueChangeOption onUpdateOption)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCol(int i)
int[]
getCols()
java.lang.String
getConstraintName()
ForeignKeyValueChangeOption
getOnDeleteOption()
ForeignKeyValueChangeOption
getOnUpdateOption()
int
getRefCol(int i)
int[]
getRefCols()
java.lang.String
getRefTable()
void
setConstraintName(java.lang.String constraintName)
int
size()
Returns the number of columns in the foreign key constraint.java.lang.String
toString()
-
-
-
Field Detail
-
constraintName
private java.lang.String constraintName
This is the optional name of the constraint specified in the DDL.
-
colIndexes
private int[] colIndexes
This is the array of column indexes in the referencing table of the foreign key.
-
referencedTable
private java.lang.String referencedTable
This is the name of the referenced table in the foreign key.
-
referencedColIndexes
private int[] referencedColIndexes
These are the indexes of the columns in the referenced table.
-
onDeleteOption
private ForeignKeyValueChangeOption onDeleteOption
This is the ON DELETE behavior
-
onUpdateOption
private ForeignKeyValueChangeOption onUpdateOption
This is the ON UPDATE behavior
-
-
Constructor Detail
-
ForeignKeyColumnRefs
public ForeignKeyColumnRefs(int[] colIndexes, java.lang.String referencedTable, int[] referencedColIndexes, ForeignKeyValueChangeOption onDeleteOption, ForeignKeyValueChangeOption onUpdateOption)
-
-
Method Detail
-
getConstraintName
public java.lang.String getConstraintName()
-
setConstraintName
public void setConstraintName(java.lang.String constraintName)
-
size
public int size()
Returns the number of columns in the foreign key constraint.
-
getCol
public int getCol(int i)
-
getCols
public int[] getCols()
-
getRefTable
public java.lang.String getRefTable()
-
getRefCol
public int getRefCol(int i)
-
getRefCols
public int[] getRefCols()
-
getOnDeleteOption
public ForeignKeyValueChangeOption getOnDeleteOption()
-
getOnUpdateOption
public ForeignKeyValueChangeOption getOnUpdateOption()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-