Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.sql
Class QSqlRelation

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.sql.QSqlRelation

All Implemented Interfaces:
  QtJambiInterface, java.lang.Cloneable

    public class QSqlRelation

extends QtJambiObject
implements java.lang.Cloneable

The `QSqlRelation` class stores information about an SQL foreign key. `QSqlRelation` is a helper class for `QSqlRelationalTableModel`. See `QSqlRelationalTableModel::setRelation()` and `QSqlRelationalTableModel::relation()` for details.

See also:
  `QSqlRelationalTableModel`, QSqlRelationalDelegate, and Relational Table Model Example.

Nested Class Summary

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Constructor Summary
`QSqlRelation()` Constructs an invalid `QSqlRelation` object.
`QSqlRelation(java.lang.String aTableName, java.lang.String indexCol, java.lang.String displayCol)` Constructs a `QSqlRelation` object, where `tableName` is the SQL table name to which a foreign key refers, `indexColumn` is the foreign key, and `displayColumn` is the field that should be presented to the user.

Method Summary
`QSqlRelation` | `clone()` This method is reimplemented for internal reasons
`java.lang.String` | `displayColumn()` Returns the column from table `tableName()` that should be presented to the user instead of a foreign key.
`java.lang.String` | `indexColumn()` Returns the index column from table `tableName()` to which a foreign key refers.
`boolean` | `isValid()` Returns true if the `QSqlRelation` object is valid; otherwise returns false.
`java.lang.String` | `tableName()` Returns the name of the table to which a foreign key refers.

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### QSqlRelation

    public QSqlRelation()

  Constructs an invalid `QSqlRelation` object.

  For such an object, the `tableName()`, `indexColumn()`, and `displayColumn()` functions return an empty string.

See also:
  `isValid()`.

### QSqlRelation

    public QSqlRelation(java.lang.String aTableName,
                        java.lang.String indexCol,
                        java.lang.String displayCol)

  Constructs a `QSqlRelation` object, where `tableName` is the SQL table name to which a foreign key refers, `indexColumn` is the foreign key, and `displayColumn` is the field that should be presented to the user.

See also:
  `tableName()`, `indexColumn()`, and `displayColumn()`.

Method Detail

### displayColumn

    public final java.lang.String displayColumn()

  Returns the column from table `tableName()` that should be presented to the user instead of a foreign key.

### indexColumn

    public final java.lang.String indexColumn()

  Returns the index column from table `tableName()` to which a foreign key refers.

### isValid

    public final boolean isValid()

  Returns true if the `QSqlRelation` object is valid; otherwise returns false.

### tableName

    public final java.lang.String tableName()

  Returns the name of the table to which a foreign key refers.

### clone

    public QSqlRelation clone()

  This method is reimplemented for internal reasons

  Overrides:
    `clone` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD