Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
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.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.sql.QSqlRelation

All Implemented Interfaces:
  QtJambiInterface

    public class QSqlRelation

extends QtJambiObject

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`, `Table Model Example`

Nested Class Summary

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>`

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 `aTableName` is the SQL table name to which a foreign key refers, `indexCol` is the foreign key, and `displayCol` is the field that should be presented to the user.

Method Summary
`java.lang.String` | `displayColumn()` Returns the column from table `tableName` that should be presented to the user instead of a foreign key.
`static QSqlRelation` | `fromNativePointer(QNativePointer nativePointer)` This function returns the QSqlRelation instance pointed to by nativePointer
`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.
`static QNativePointer` | `nativePointerArray(QSqlRelation[] array)` This function returns a QNativePointer that is pointing to the specified QSqlRelation array.
`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, finalize, reassignNativeResources, tr, tr, tr`

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

Methods inherited from class java.lang.Object
`clone, equals, 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 `aTableName` is the SQL table name to which a foreign key refers, `indexCol` is the foreign key, and `displayCol` is the field that should be presented to the user.

  See Also:
    `tableName`, `indexColumn`, `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.

### fromNativePointer

    public static QSqlRelation fromNativePointer(QNativePointer nativePointer)

  This function returns the QSqlRelation instance pointed to by nativePointer

  Parameters:
    `nativePointer` - the QNativePointer of which object should be returned.

### nativePointerArray

    public static QNativePointer nativePointerArray(QSqlRelation[] array)

  This function returns a QNativePointer that is pointing to the specified QSqlRelation array.

  Parameters:
    `array` - the array that the returned pointer will point to.
  Returns:
    a QNativePointer that is pointing to the specified array.

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