getRowIdLifetime()

Syntax:

RowIdLifetime getRowIdLifetime()
                               throws SQLException

Description:

Indicates whether or not this data source supports the SQL ROWID type, and if so the lifetime for which a RowId object remains valid.

The returned int values have the following relationship:

ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION 
    < ROWID_VALID_SESSION < ROWID_VALID_FOREVER

so conditional logic such as

if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION)

can be used. Valid Forever means valid across all Sessions, and valid for a Session means valid across all its contained Transactions.

Returns:

the status indicating the lifetime of a RowId

Throws:

SQLException - if a database access error occurs