List of usage examples for java.sql SQLFeatureNotSupportedException SQLFeatureNotSupportedException
public SQLFeatureNotSupportedException(Throwable cause)
SQLFeatureNotSupportedException
object with a given cause
. From source file:org.apache.jena.jdbc.remote.connections.RemoteEndpointConnection.java
@Override protected JenaPreparedStatement createPreparedStatementInternal(String sparql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { if (this.isClosed()) throw new SQLException("Cannot create a statement after the connection was closed"); if (resultSetType == ResultSet.TYPE_SCROLL_SENSITIVE) throw new SQLFeatureNotSupportedException( "Remote endpoint backed connection do not support scroll sensitive result sets"); if (resultSetConcurrency != ResultSet.CONCUR_READ_ONLY) throw new SQLFeatureNotSupportedException( "Remote endpoint backed connections only support read-only result sets"); return new RemoteEndpointPreparedStatement(sparql, this, this.client, resultSetType, ResultSet.FETCH_FORWARD, 0, resultSetHoldability); }
From source file:com.facebook.presto.jdbc.PrestoConnection.java
@Override public void rollback(Savepoint savepoint) throws SQLException { throw new SQLFeatureNotSupportedException("rollback"); }
From source file:com.facebook.presto.jdbc.PrestoConnection.java
@Override public void releaseSavepoint(Savepoint savepoint) throws SQLException { throw new SQLFeatureNotSupportedException("releaseSavepoint"); }
From source file:org.apache.hive.jdbc.HiveStatement.java
public void closeOnCompletion() throws SQLException { throw new SQLFeatureNotSupportedException("Method not supported"); }
From source file:com.github.adejanovski.cassandra.jdbc.CassandraStatement.java
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { checkNotClosed();//from ww w .j av a 2 s . c o m if (!(autoGeneratedKeys == RETURN_GENERATED_KEYS || autoGeneratedKeys == NO_GENERATED_KEYS)) throw new SQLSyntaxErrorException(BAD_AUTO_GEN); if (autoGeneratedKeys == RETURN_GENERATED_KEYS) throw new SQLFeatureNotSupportedException(NO_GEN_KEYS); return execute(sql); }
From source file:com.alibaba.otter.common.push.datasource.media.MediaPushDataSource.java
public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException { try {/*w w w .j av a 2 s. c om*/ Method getParentLoggerMethod = CommonDataSource.class.getDeclaredMethod("getParentLogger", new Class<?>[0]); return (java.util.logging.Logger) getParentLoggerMethod.invoke(delegate, new Object[0]); } catch (NoSuchMethodException e) { throw new SQLFeatureNotSupportedException(e); } catch (InvocationTargetException e2) { throw new SQLFeatureNotSupportedException(e2); } catch (IllegalArgumentException e2) { throw new SQLFeatureNotSupportedException(e2); } catch (IllegalAccessException e2) { throw new SQLFeatureNotSupportedException(e2); } }
From source file:com.facebook.presto.jdbc.PrestoConnection.java
@Override public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { if (autoGeneratedKeys != Statement.RETURN_GENERATED_KEYS) { throw new SQLFeatureNotSupportedException("Auto generated keys must be NO_GENERATED_KEYS"); }// w w w. j a v a 2 s . com return prepareStatement(sql); }
From source file:com.facebook.presto.jdbc.PrestoConnection.java
@Override public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { throw new SQLFeatureNotSupportedException("prepareStatement"); }
From source file:org.apache.jena.jdbc.remote.connections.RemoteEndpointConnection.java
@Override protected void checkTransactionIsolation(int level) throws SQLException { switch (level) { case Connection.TRANSACTION_NONE: return;// www.java 2 s .c o m default: throw new SQLFeatureNotSupportedException( "Transactions are not supported for remote endpoint backed connections"); } }
From source file:com.facebook.presto.jdbc.PrestoConnection.java
@Override public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { throw new SQLFeatureNotSupportedException("prepareStatement"); }