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

List of all members.

Public Member Functions

String type () throws Exception
String cardinality_from_dependent_to_reference ()
String cardinality_from_reference_to_dependent ()

Public Attributes

int src_min
int src_max
int dst_min
int dst_max
Field src_field
Field dst_field
int type = Database.UNDEFINED_LINK

Private Member Functions

String __getSymbol (int in_min, int in_max)

Detailed Description

This class represents a join (between two fields). A join is defined by a foreign key (defined in the "dependent" table).

Please note that we define two kinds of foreign keys :

  • Soft foreign keys. A hard foreign key is associated to a database constraint.
  • Hard foreign keys. A soft foreign key is defined only by its name (this implies the existence of naming conventions). Example : "fk_customer_id" is a foreign key. It joins the field "fk_customer_id" to the field "id" of the table "customer".

The join connects a "dependent" field - which is the foreign key - (in a dependent table), to a "reference" field (in a reference table).

A join contains 2 cardinalities :

  • One cardinality represents the number of "reference" fields potentially associated to one "dependent" field.
  • The other cardinality represents the number of "dependent" fields potentially associated to one "reference" fields.

Cardinalities are represented by a character.

  • ?: Zero or one.
  • *: Zero or more.
  • +: At least one (1,2,3...).
  • 1: One.
Remarks:
Please note that these conventions are inspired by the regular expressions.
Author:
Denis Beurive

Definition at line 49 of file FieldToFieldJoin.java.


Member Function Documentation

String org.dbview.db.structure.FieldToFieldJoin.__getSymbol ( int  in_min,
int  in_max 
) [private]

This method returns the symbol that represents a cadinality.

Cardinalities are represented by a character.

  • ?: Zero or one.
  • *: Zero or more.
  • +: At least one (1,2,3...).
  • 1: One.
Parameters:
in_minMinimum occurrence of the field.
in_maxMaximtm occurrence of the field.
Remarks:
Please note that these conventions are inspired by the regular expressions.
Returns:
This method returns the symbol that represents a cadinality.

Definition at line 163 of file FieldToFieldJoin.java.

Referenced by org.dbview.db.structure.FieldToFieldJoin.cardinality_from_dependent_to_reference(), and org.dbview.db.structure.FieldToFieldJoin.cardinality_from_reference_to_dependent().

String org.dbview.db.structure.FieldToFieldJoin.cardinality_from_dependent_to_reference ( )

This method returns a textual representation of the cardinality from the "dependent field" to the "reference field".

Returns:
The method returns a textual representation of the cardinality.

Definition at line 133 of file FieldToFieldJoin.java.

String org.dbview.db.structure.FieldToFieldJoin.cardinality_from_reference_to_dependent ( )

This method returns a textual representation of the cardinality from the "reference field" to the "dependent field".

Returns:
The method returns a textual representation of the cardinality.

Definition at line 143 of file FieldToFieldJoin.java.

String org.dbview.db.structure.FieldToFieldJoin.type ( ) throws Exception

This method returns a textual representation of the type of the join.

Returns:
The method returns a textual representation of the type of the join.
Exceptions:
Exception

Definition at line 118 of file FieldToFieldJoin.java.


Member Data Documentation

Field at the destination of the relation (in the reference table).

Remarks:
To get the field's table: dst_field.getTable().

Definition at line 101 of file FieldToFieldJoin.java.

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

Maximum occurrence of the field at the end - in the reference table - of the relation (values can be "1" or "N"). Value:

Definition at line 89 of file FieldToFieldJoin.java.

Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), and org.dbview.db.structure.FieldToFieldJoin.cardinality_from_dependent_to_reference().

Minimum occurrence of the field at the end - in the reference table - of the relation (values can be "0" or "1"). Value:

Definition at line 79 of file FieldToFieldJoin.java.

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

Field at the origin of the relation (in the dependent table).

Remarks:
To get the field's table: src_field.getTable().

Definition at line 95 of file FieldToFieldJoin.java.

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

Maximum occurrence of the field at the origin - in the dependent table - of the relation (values can be "1" or "N"). Value:

Definition at line 69 of file FieldToFieldJoin.java.

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

Minimum occurrence of the field at the origin - in the dependent table - of the relation (values can be "0" or "1"). Values:

Definition at line 59 of file FieldToFieldJoin.java.

Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), and org.dbview.db.structure.FieldToFieldJoin.cardinality_from_dependent_to_reference().


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