com.aerospike.jdbc.sql.SimpleWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aerospike-jdbc Show documentation
Show all versions of aerospike-jdbc Show documentation
A JDBC driver for the Aerospike database
package com.aerospike.jdbc.sql;
import java.sql.SQLException;
import java.sql.Wrapper;
public interface SimpleWrapper extends Wrapper {
@Override
default T unwrap(Class iface) throws SQLException {
try {
// This works for classes that aren't actually wrapping anything
return iface.cast(this);
} catch (ClassCastException e) {
throw new SQLException("Cannot unwrap " + iface, e);
}
}
@Override
default boolean isWrapperFor(Class> iface) {
// This works for classes that aren't actually wrapping anything
return iface.isInstance(this);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy