DBVIEW
org.dbview.db.structure.Table Class Reference
Collaboration diagram for org.dbview.db.structure.Table:

List of all members.

Public Member Functions

void setIndexes (Hashtable< String, DbIndex > in_list)
Hashtable< String, DbIndexgetSimpleIndexes ()
Hashtable< String, DbIndexgetCompositeIndexes ()
Integer compositeIndexCount ()
Integer simpleIndexCount ()
String getName ()
 Table (Database in_db, String in_name) throws org.dbview.db.structure.DatabaseException
Field getField (String in_name)
ArrayList< FieldgetFields ()
Database getDatabase ()
String getDatabaseName ()
ArrayList< FieldgetForeignKeys ()
String toString ()

Package Functions

void addField (Field in_field) throws org.dbview.db.structure.TableException

Private Attributes

Hashtable< String, Field__fields = new Hashtable<String, Field>()
ArrayList< String > __orderedFields = new ArrayList<String>()
String __name = null
Database __db = null
Hashtable< String, DbIndex__indexes = new Hashtable<String, DbIndex>()
Hashtable< String, DbIndex__simple_indexes = new Hashtable<String, DbIndex>()
Hashtable< String, DbIndex__composite_indexes = new Hashtable<String, DbIndex>()
Integer __simple_indexes_count = -1
Integer __composite_indexes_count = -1

Detailed Description

This class represents a table.

Author:
Denis Beurive
Remarks:
Adding a field to a table is done when a field is created.

Definition at line 40 of file Table.java.


Constructor & Destructor Documentation

org.dbview.db.structure.Table.Table ( Database  in_db,
String  in_name 
) throws org.dbview.db.structure.DatabaseException

Create a table.

Parameters:
in_dbDatabase that contains the newly created table.
in_nameName of the table.
Exceptions:
org.dbview.db.structure.DatabaseException

Definition at line 163 of file Table.java.


Member Function Documentation

void org.dbview.db.structure.Table.addField ( Field  in_field) throws org.dbview.db.structure.TableException [package]

Add a field to the table.

Parameters:
in_fieldField to add.
Exceptions:
org.dbview.db.structure.TableException
Remarks:
This method is accessible for package's members only. Adding a field to a table is done when a field is created.

Definition at line 177 of file Table.java.

Referenced by org.dbview.db.structure.Field.Field().

Integer org.dbview.db.structure.Table.compositeIndexCount ( )

This method returns the number of indexes composed by only one index.

Returns:
The method returns the number of indexes composed by only one index.

Definition at line 132 of file Table.java.

Hashtable<String, DbIndex> org.dbview.db.structure.Table.getCompositeIndexes ( )

This method returns the list of indexes that are defined by more than one field.

Returns:
The method returns the list of indexes that are defined by more than one field.

Definition at line 111 of file Table.java.

Referenced by org.dbview.db.structure.Table.compositeIndexCount().

Database org.dbview.db.structure.Table.getDatabase ( )

Return the database that contains this table.

Returns:
The method returns the database that contains this table.

Definition at line 215 of file Table.java.

String org.dbview.db.structure.Table.getDatabaseName ( )

Return the name of the database that contains this table.

Returns:
The method returns the name of the database that contains this table.

Definition at line 224 of file Table.java.

Field org.dbview.db.structure.Table.getField ( String  in_name)

Returns a field.

Parameters:
in_nameName of the field to return
Returns:
If the field, referenced by its name, exists, then the method returns it. Otherwise, the method returns the value null.

Definition at line 193 of file Table.java.

ArrayList<Field> org.dbview.db.structure.Table.getFields ( )

Return the list of all fields in the table. The returned list is ordered. The order is the order of the table's definition.

Returns:
The method returns the list of all fields in the table.

Definition at line 203 of file Table.java.

Referenced by org.dbview.databaseExporters.dot.DotFull.__createFullTableLabel(), org.dbview.databaseExporters.dot.DotMedium.__createMediumTableLabel(), org.dbview.db.structure.Table.getForeignKeys(), and org.dbview.db.structure.Table.toString().

ArrayList<Field> org.dbview.db.structure.Table.getForeignKeys ( )

Return the list of foreign keys.

Returns:
The method returns the list of foreign keys.

Definition at line 233 of file Table.java.

String org.dbview.db.structure.Table.getName ( )

This method returns the name of the table.

Returns:
The method returns the name of the table.

Definition at line 152 of file Table.java.

Referenced by org.dbview.db.structure.Field.getFullName(), org.dbview.db.structure.Field.getTableName(), org.dbview.db.structure.JgraphtTableToTableEdge.toString(), and org.dbview.db.structure.Table.toString().

Hashtable<String, DbIndex> org.dbview.db.structure.Table.getSimpleIndexes ( )

This method returns the list of indexes that are defined by only one field.

Returns:
The method returns the list of indexes that are defined by only one field.

Definition at line 90 of file Table.java.

Referenced by org.dbview.db.structure.Table.simpleIndexCount().

void org.dbview.db.structure.Table.setIndexes ( Hashtable< String, DbIndex in_list)

Set the list of indexes.

Parameters:
in_listThe list of indexes to set.

Definition at line 81 of file Table.java.

Integer org.dbview.db.structure.Table.simpleIndexCount ( )

This method returns the number of indexes composed by more than one index.

Returns:
The method returns the number of indexes composed by more than one index.

Definition at line 142 of file Table.java.

String org.dbview.db.structure.Table.toString ( )

Produce a textual representation of the table.

Returns:
The method returns a string that represents a textual representation of the table.

Definition at line 244 of file Table.java.

Referenced by org.dbview.db.structure.Database.toString().


Member Data Documentation

Hashtable<String, DbIndex> org.dbview.db.structure.Table.__composite_indexes = new Hashtable<String, DbIndex>() [private]

List of all indexes that are composed of more than one field.

Definition at line 69 of file Table.java.

Referenced by org.dbview.db.structure.Table.getCompositeIndexes().

Number of indexes that are composed of one field.

Definition at line 75 of file Table.java.

Referenced by org.dbview.db.structure.Table.compositeIndexCount(), and org.dbview.db.structure.Table.getCompositeIndexes().

Hashtable<String, Field> org.dbview.db.structure.Table.__fields = new Hashtable<String, Field>() [private]

The hash table lists all table's fields.

  • Key: Name of the field.
  • Value: The field.

Definition at line 49 of file Table.java.

Referenced by org.dbview.db.structure.Table.addField(), org.dbview.db.structure.Table.getField(), and org.dbview.db.structure.Table.getFields().

Hashtable<String, DbIndex> org.dbview.db.structure.Table.__indexes = new Hashtable<String, DbIndex>() [private]
ArrayList<String> org.dbview.db.structure.Table.__orderedFields = new ArrayList<String>() [private]

The array contains the list of all fields listed in the order of declaration.

Definition at line 54 of file Table.java.

Referenced by org.dbview.db.structure.Table.addField(), and org.dbview.db.structure.Table.getFields().

Hashtable<String, DbIndex> org.dbview.db.structure.Table.__simple_indexes = new Hashtable<String, DbIndex>() [private]

List of all indexes that are composed of one field.

Definition at line 66 of file Table.java.

Referenced by org.dbview.db.structure.Table.getSimpleIndexes().

Number of indexes that are composed of more than one field.

Definition at line 72 of file Table.java.

Referenced by org.dbview.db.structure.Table.getSimpleIndexes(), and org.dbview.db.structure.Table.simpleIndexCount().


The documentation for this class was generated from the following file: