下面列出了怎么用java.sql.RowIdLifetime的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* {@inheritDoc}
*/
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
this.conn.lock();
try {
initServiceMetaData();
switch (this.serviceMetaData.getRowIdLifeTime()) {
case ROWID_UNSUPPORTED:
return RowIdLifetime.ROWID_UNSUPPORTED;
case ROWID_VALID_OTHER:
return RowIdLifetime.ROWID_VALID_OTHER;
case ROWID_VALID_SESSION:
return RowIdLifetime.ROWID_VALID_SESSION;
case ROWID_VALID_TRANSACTION:
return RowIdLifetime.ROWID_VALID_TRANSACTION;
case ROWID_VALID_FOREVER:
return RowIdLifetime.ROWID_VALID_FOREVER;
default:
return RowIdLifetime.ROWID_UNSUPPORTED;
}
} finally {
this.conn.unlock();
}
}
/**
* {@inheritDoc}
*/
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
this.conn.lock();
try {
initServiceMetaData();
switch (this.serviceMetaData.getRowIdLifeTime()) {
case ROWID_UNSUPPORTED:
return RowIdLifetime.ROWID_UNSUPPORTED;
case ROWID_VALID_OTHER:
return RowIdLifetime.ROWID_VALID_OTHER;
case ROWID_VALID_SESSION:
return RowIdLifetime.ROWID_VALID_SESSION;
case ROWID_VALID_TRANSACTION:
return RowIdLifetime.ROWID_VALID_TRANSACTION;
case ROWID_VALID_FOREVER:
return RowIdLifetime.ROWID_VALID_FOREVER;
default:
return RowIdLifetime.ROWID_UNSUPPORTED;
}
} finally {
this.conn.unlock();
}
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
try {
return databaseMetaData.getRowIdLifetime();
} catch (final SQLException e) {
handleException(e);
throw new AssertionError();
}
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException
{
logger.debug("public RowIdLifetime getRowIdLifetime()");
throw new SQLFeatureNotSupportedException();
}
private RowIdLifetime getRowIdLifetimeFromOriginMetaData(final DatabaseMetaData databaseMetaData) throws SQLException {
try {
return databaseMetaData.getRowIdLifetime();
} catch (final SQLFeatureNotSupportedException ignore) {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
}
private RowIdLifetime getRowIdLifetimeFromOriginMetaData(final DatabaseMetaData databaseMetaData) throws SQLException {
try {
return databaseMetaData.getRowIdLifetime();
} catch (final SQLFeatureNotSupportedException ignore) {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
try {
return databaseMetaData.getRowIdLifetime();
} catch (final SQLException e) {
handleException(e);
throw new AssertionError();
}
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
throw new SQLFeatureNotSupportedException("Functionality is not supported");
}
@Override
public RowIdLifetime getRowIdLifetime()
throws SQLException
{
return RowIdLifetime.ROWID_UNSUPPORTED;
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
throw new SQLException(METHOD_NOT_SUPPORTED_STRING);
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
public RowIdLifetime getRowIdLifetime() {
throw new UnsupportedOperationException();
}
@Override public RowIdLifetime getRowIdLifetime() throws SQLException {
throw new UnsupportedOperationException("Not implemented yet.");
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
@Test
public void testGetRowIdLifetime() throws SQLException {
assertEquals(RowIdLifetime.ROWID_UNSUPPORTED, testSubject.getRowIdLifetime());
}
public java.sql.RowIdLifetime getRowIdLifetime() throws SQLException {
return null;
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
// TODO Auto-generated method stub
return null;
}
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
@Override public RowIdLifetime getRowIdLifetime() throws SQLException {
throw unsupported();
}
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
throwIfClosed();
return super.getRowIdLifetime();
}
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
public RowIdLifetime getRowIdLifetime() throws SQLException {
throw new AssertionError("only expected to be called in JDBC 4.0");
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
return RowIdLifetime.ROWID_UNSUPPORTED;
}
@Override
public RowIdLifetime getRowIdLifetime() throws SQLException {
return null;
}