DBVIEW
|
Public Member Functions | |
DeadForeignKey | getDeadForeignKey () throws org.dbview.db.structure.FieldException |
void | isASoftForeignKey () |
void | isAHardForeignKey () |
Boolean | isSoftForeignKey () |
Boolean | isHardForeignKey () |
void | setIndexName (String in_index_name) |
String | getIndexName () |
Field (Table in_table, String in_name) throws org.dbview.db.structure.TableException | |
void | isANull () |
void | isAPrimaryKey () |
void | isAforeignKey (Field in_reference) throws org.dbview.db.structure.FieldException |
void | isADeadforeignKey (String in_reference_table, String in_reference_field) throws org.dbview.db.structure.FieldException |
void | isAUniqueIndex () |
void | isAMultipleIndex () |
Field | getFkToMe () |
String | getName () |
String | getFullName () |
Field | getReference () throws org.dbview.db.structure.FieldException |
Table | getTable () |
String | getTableName () |
Boolean | isPrimaryKey () |
Boolean | isForeignKey () |
Boolean | isDeadForeignKey () |
Boolean | isKey () |
Boolean | isUniqueIndex () |
Boolean | isUnique () |
Boolean | isMultipleIndex () |
Boolean | isIndex () |
Boolean | isNull () |
String | toString () |
Static Package Attributes | |
static final int | NOT_INDEX = 0 |
static final int | NOT_KEY = 0 |
static final int | MULTIPLE_INDEX = 1 |
static final int | UNIQUE_INDEX = 2 |
static final int | KEY_FOREIGN = 1 |
static final int | KEY_PRIMRY = 2 |
static final int | KEY_DEAD_FOREIGN = 3 |
static final int | NOT_NULL = 0 |
static final int | CAN_BE_NULL = 1 |
Private Attributes | |
Table | __table = null |
String | __name = null |
String | __index_name = null |
int | __key = Field.NOT_KEY |
int | __index = Field.NOT_INDEX |
int | __null = Field.NOT_NULL |
Field | __reference = null |
Field | __fk = null |
Boolean | __fk_hard = Boolean.TRUE |
DeadForeignKey | __dead_reference = null |
This class represents a table's field.
Definition at line 31 of file Field.java.
org.dbview.db.structure.Field.Field | ( | Table | in_table, |
String | in_name | ||
) | throws org.dbview.db.structure.TableException |
Create a field, and add the field to a table.
in_table | Table that contains this field. |
in_name | Name of the field. |
org.dbview.db.structure.TableException |
Definition at line 178 of file Field.java.
DeadForeignKey org.dbview.db.structure.Field.getDeadForeignKey | ( | ) | throws org.dbview.db.structure.FieldException |
Assuming that this field is a dead foreign key, then the method returns the dead foreign key's reference.
Definition at line 112 of file Field.java.
Field org.dbview.db.structure.Field.getFkToMe | ( | ) |
If the field is a "reference" for a foreign key, then the method returns the foreign key.
Definition at line 265 of file Field.java.
String org.dbview.db.structure.Field.getFullName | ( | ) |
This method returns the full name of the field. The full name includes the table's name.
Definition at line 283 of file Field.java.
Referenced by org.dbview.db.structure.Field.getDeadForeignKey(), and org.dbview.db.structure.Field.toString().
String org.dbview.db.structure.Field.getIndexName | ( | ) |
Return the name of the index that uses this field.
Definition at line 167 of file Field.java.
String org.dbview.db.structure.Field.getName | ( | ) |
Return the name of the field.
Definition at line 274 of file Field.java.
Referenced by org.dbview.databaseExporters.dot.DotFull.__createIndexLabel().
Field org.dbview.db.structure.Field.getReference | ( | ) | throws org.dbview.db.structure.FieldException |
Return the field's "reference" (if the field is a foreign key).
org.dbview.db.structure.FieldException |
Definition at line 293 of file Field.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable().
Table org.dbview.db.structure.Field.getTable | ( | ) |
Return the table that contains this field.
Definition at line 304 of file Field.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable().
String org.dbview.db.structure.Field.getTableName | ( | ) |
This method returns the name of the field's table.
Definition at line 313 of file Field.java.
void org.dbview.db.structure.Field.isADeadforeignKey | ( | String | in_reference_table, |
String | in_reference_field | ||
) | throws org.dbview.db.structure.FieldException |
Set the field a "dead" foreign key.
in_reference_table | Name of the reference table. |
in_reference_field | Name of the reference field. |
Definition at line 230 of file Field.java.
void org.dbview.db.structure.Field.isAforeignKey | ( | Field | in_reference | ) | throws org.dbview.db.structure.FieldException |
Set the field a foreign key.
in_reference | "Reference" field. |
Definition at line 205 of file Field.java.
void org.dbview.db.structure.Field.isAHardForeignKey | ( | ) |
This method is used to specify that a foreign key is a hard one.
Definition at line 131 of file Field.java.
void org.dbview.db.structure.Field.isAMultipleIndex | ( | ) |
Set the field a multiple index.
Definition at line 255 of file Field.java.
void org.dbview.db.structure.Field.isANull | ( | ) |
Set the field "can be NULL".
Definition at line 188 of file Field.java.
void org.dbview.db.structure.Field.isAPrimaryKey | ( | ) |
Set the field a primary key.
Definition at line 196 of file Field.java.
void org.dbview.db.structure.Field.isASoftForeignKey | ( | ) |
This method is used to specify that a foreign key is a soft one.
Definition at line 122 of file Field.java.
void org.dbview.db.structure.Field.isAUniqueIndex | ( | ) |
Set the field a unique index.
Definition at line 247 of file Field.java.
Boolean org.dbview.db.structure.Field.isDeadForeignKey | ( | ) |
Test if the field is a dead foreign key.
Definition at line 343 of file Field.java.
Referenced by org.dbview.db.structure.Field.getDeadForeignKey(), and org.dbview.db.structure.Field.toString().
Boolean org.dbview.db.structure.Field.isForeignKey | ( | ) |
Test if the field is a foreign key.
Definition at line 333 of file Field.java.
Referenced by org.dbview.db.structure.Field.toString().
Boolean org.dbview.db.structure.Field.isHardForeignKey | ( | ) |
Test if a foreign key is hard.
Definition at line 149 of file Field.java.
Boolean org.dbview.db.structure.Field.isIndex | ( | ) |
Test if the field is an index.
Definition at line 395 of file Field.java.
Boolean org.dbview.db.structure.Field.isKey | ( | ) |
Test if the field is a key (primary or foreign).
Definition at line 353 of file Field.java.
Boolean org.dbview.db.structure.Field.isMultipleIndex | ( | ) |
Test if the field is a multiple index.
Definition at line 385 of file Field.java.
Referenced by org.dbview.db.structure.Field.toString().
Boolean org.dbview.db.structure.Field.isNull | ( | ) |
Test if the field can be null.
Definition at line 406 of file Field.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable().
Boolean org.dbview.db.structure.Field.isPrimaryKey | ( | ) |
Test if the field is a primary key.
Definition at line 323 of file Field.java.
Referenced by org.dbview.db.structure.Field.toString().
Boolean org.dbview.db.structure.Field.isSoftForeignKey | ( | ) |
Test if a foreign key is soft.
Definition at line 140 of file Field.java.
Boolean org.dbview.db.structure.Field.isUnique | ( | ) |
Test if the field has a unique constraint.
Definition at line 375 of file Field.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable().
Boolean org.dbview.db.structure.Field.isUniqueIndex | ( | ) |
Test if the field is a unique index.
Definition at line 365 of file Field.java.
Referenced by org.dbview.db.structure.Field.isUnique(), and org.dbview.db.structure.Field.toString().
void org.dbview.db.structure.Field.setIndexName | ( | String | in_index_name | ) |
Set the name of the index that uses this field.
in_index_name | Name of the index. |
Definition at line 158 of file Field.java.
String org.dbview.db.structure.Field.toString | ( | ) |
Create a textual representation of the field.
Definition at line 415 of file Field.java.
Referenced by org.dbview.db.structure.Table.toString().
DeadForeignKey org.dbview.db.structure.Field.__dead_reference = null [private] |
If the field is a "dead" foreign key (type IFieldTypes.DEAD_FOREIGN_KEY), then his member represents the "dead" field's "reference".
Definition at line 106 of file Field.java.
Referenced by org.dbview.db.structure.Field.getDeadForeignKey(), org.dbview.db.structure.Field.isADeadforeignKey(), and org.dbview.db.structure.Field.toString().
Field org.dbview.db.structure.Field.__fk = null [private] |
If this field is a "reference" for a foreign key, then this field represents the foreign key.
Definition at line 100 of file Field.java.
Referenced by org.dbview.db.structure.Field.getFkToMe(), org.dbview.db.structure.Field.isAforeignKey(), and org.dbview.db.structure.Field.toString().
Boolean org.dbview.db.structure.Field.__fk_hard = Boolean.TRUE [private] |
If the field is a foreign key, then this attribute tells whether the field is a "hard" (as opposed to "soft") foreign key or not.
Definition at line 103 of file Field.java.
Referenced by org.dbview.db.structure.Field.isAHardForeignKey(), org.dbview.db.structure.Field.isASoftForeignKey(), org.dbview.db.structure.Field.isHardForeignKey(), and org.dbview.db.structure.Field.isSoftForeignKey().
int org.dbview.db.structure.Field.__index = Field.NOT_INDEX [private] |
Is the field an index?
Definition at line 91 of file Field.java.
Referenced by org.dbview.db.structure.Field.isAMultipleIndex(), org.dbview.db.structure.Field.isAUniqueIndex(), org.dbview.db.structure.Field.isIndex(), org.dbview.db.structure.Field.isMultipleIndex(), and org.dbview.db.structure.Field.isUniqueIndex().
String org.dbview.db.structure.Field.__index_name = null [private] |
Name of the index that uses this field.
Definition at line 85 of file Field.java.
Referenced by org.dbview.db.structure.Field.getIndexName(), and org.dbview.db.structure.Field.setIndexName().
int org.dbview.db.structure.Field.__key = Field.NOT_KEY [private] |
Is the field a key?
Definition at line 88 of file Field.java.
Referenced by org.dbview.db.structure.Field.isADeadforeignKey(), org.dbview.db.structure.Field.isAforeignKey(), org.dbview.db.structure.Field.isAPrimaryKey(), org.dbview.db.structure.Field.isDeadForeignKey(), org.dbview.db.structure.Field.isForeignKey(), org.dbview.db.structure.Field.isKey(), and org.dbview.db.structure.Field.isPrimaryKey().
String org.dbview.db.structure.Field.__name = null [private] |
Name of the field.
Definition at line 82 of file Field.java.
Referenced by org.dbview.db.structure.Field.Field(), org.dbview.db.structure.Field.getFullName(), org.dbview.db.structure.Field.getName(), and org.dbview.db.structure.Field.getReference().
int org.dbview.db.structure.Field.__null = Field.NOT_NULL [private] |
Can the field be null?
Definition at line 94 of file Field.java.
Referenced by org.dbview.db.structure.Field.isANull(), and org.dbview.db.structure.Field.isNull().
Field org.dbview.db.structure.Field.__reference = null [private] |
If the field is a foreign key (type IFieldTypes.FOREIGN_KEY), then his member represents the field's "reference".
Definition at line 97 of file Field.java.
Referenced by org.dbview.db.structure.Field.getReference(), org.dbview.db.structure.Field.isAforeignKey(), and org.dbview.db.structure.Field.toString().
Table org.dbview.db.structure.Field.__table = null [private] |
Name of the table.
Definition at line 79 of file Field.java.
Referenced by org.dbview.db.structure.Field.Field(), org.dbview.db.structure.Field.getFullName(), org.dbview.db.structure.Field.getTable(), and org.dbview.db.structure.Field.getTableName().
final int org.dbview.db.structure.Field.CAN_BE_NULL = 1 [static, package] |
This constant is used to say that a field can be null.
Definition at line 76 of file Field.java.
Referenced by org.dbview.db.structure.Field.isANull(), and org.dbview.db.structure.Field.isNull().
final int org.dbview.db.structure.Field.KEY_DEAD_FOREIGN = 3 [static, package] |
This constant is used to say that a field is a "dead" foreign key.
Definition at line 66 of file Field.java.
Referenced by org.dbview.db.structure.Field.isADeadforeignKey(), and org.dbview.db.structure.Field.isDeadForeignKey().
final int org.dbview.db.structure.Field.KEY_FOREIGN = 1 [static, package] |
This constant is used to say that a field is a (hard or soft) foreign key.
Definition at line 56 of file Field.java.
Referenced by org.dbview.db.structure.Field.getReference(), org.dbview.db.structure.Field.isADeadforeignKey(), org.dbview.db.structure.Field.isAforeignKey(), org.dbview.db.structure.Field.isForeignKey(), and org.dbview.db.structure.Field.isKey().
final int org.dbview.db.structure.Field.KEY_PRIMRY = 2 [static, package] |
This constant is used to say that a field is a primary index.
Definition at line 61 of file Field.java.
Referenced by org.dbview.db.structure.Field.isAPrimaryKey(), org.dbview.db.structure.Field.isKey(), and org.dbview.db.structure.Field.isPrimaryKey().
final int org.dbview.db.structure.Field.MULTIPLE_INDEX = 1 [static, package] |
This constant is used to say that a field is a multiple index.
Definition at line 46 of file Field.java.
Referenced by org.dbview.db.structure.Field.isAMultipleIndex(), org.dbview.db.structure.Field.isIndex(), and org.dbview.db.structure.Field.isMultipleIndex().
final int org.dbview.db.structure.Field.NOT_INDEX = 0 [static, package] |
This constant is used to say that a field is not an index.
Definition at line 36 of file Field.java.
final int org.dbview.db.structure.Field.NOT_KEY = 0 [static, package] |
This constant is used to say that a field is not a key.
Definition at line 41 of file Field.java.
final int org.dbview.db.structure.Field.NOT_NULL = 0 [static, package] |
This constant is used to say that a field can not be null.
Definition at line 71 of file Field.java.
final int org.dbview.db.structure.Field.UNIQUE_INDEX = 2 [static, package] |
This constant is used to say that a field is a unique index.
Definition at line 51 of file Field.java.
Referenced by org.dbview.db.structure.Field.isAUniqueIndex(), org.dbview.db.structure.Field.isIndex(), and org.dbview.db.structure.Field.isUniqueIndex().