Example usage for java.sql SQLFeatureNotSupportedException SQLFeatureNotSupportedException

List of usage examples for java.sql SQLFeatureNotSupportedException SQLFeatureNotSupportedException

Introduction

In this page you can find the example usage for java.sql SQLFeatureNotSupportedException SQLFeatureNotSupportedException.

Prototype

public SQLFeatureNotSupportedException(Throwable cause) 

Source Link

Document

Constructs a SQLFeatureNotSupportedException object with a given cause.

Usage

From source file:com.github.adejanovski.cassandra.jdbc.CassandraStatement.java

@SuppressWarnings("boxing")
public boolean getMoreResults(int current) throws SQLException {
    checkNotClosed();/*  www.j  a  v a2 s.  c om*/

    switch (current) {
    case CLOSE_CURRENT_RESULT:
        resetResults();
        break;

    case CLOSE_ALL_RESULTS:
    case KEEP_CURRENT_RESULT:
        throw new SQLFeatureNotSupportedException(NO_MULTIPLE);

    default:
        throw new SQLSyntaxErrorException(String.format(BAD_KEEP_RSET, current));
    }
    // in the current Cassandra implementation there are never MORE results
    return false;
}

From source file:com.facebook.presto.jdbc.PrestoConnection.java

private static void checkResultSet(int resultSetType, int resultSetConcurrency)
        throws SQLFeatureNotSupportedException {
    if (resultSetType != ResultSet.TYPE_FORWARD_ONLY) {
        throw new SQLFeatureNotSupportedException("Result set type must be TYPE_FORWARD_ONLY");
    }//from w  w w. j  a va2s  .  co m
    if (resultSetConcurrency != ResultSet.CONCUR_READ_ONLY) {
        throw new SQLFeatureNotSupportedException("Result set concurrency must be CONCUR_READ_ONLY");
    }
}

From source file:com.facebook.presto.jdbc.PrestoConnection.java

private static void checkHoldability(int resultSetHoldability) throws SQLFeatureNotSupportedException {
    if (resultSetHoldability != ResultSet.HOLD_CURSORS_OVER_COMMIT) {
        throw new SQLFeatureNotSupportedException("Result set holdability must be HOLD_CURSORS_OVER_COMMIT");
    }/*from w w w .  jav a  2 s . c  o  m*/
}

From source file:com.github.adejanovski.cassandra.jdbc.CassandraStatement.java

public <T> T unwrap(Class<T> iface) throws SQLException {
    if (iface.isInstance(this))
        return iface.cast(this);
    throw new SQLFeatureNotSupportedException(String.format(NO_INTERFACE, iface.getSimpleName()));
}

From source file:com.micromux.cassandra.jdbc.CassandraConnection.java

public void rollback() throws SQLException {
    checkNotClosed();//from   www . j  a  v  a  2  s .  c o m
    throw new SQLFeatureNotSupportedException(ALWAYS_AUTOCOMMIT);
}

From source file:com.micromux.cassandra.jdbc.CassandraConnection.java

public void setAutoCommit(boolean autoCommit) throws SQLException {
    checkNotClosed();/*from  w w  w .ja  va2  s.c om*/
    if (!autoCommit)
        throw new SQLFeatureNotSupportedException(ALWAYS_AUTOCOMMIT);
}

From source file:org.apache.hive.jdbc.HiveStatement.java

@Override
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
    throw new SQLFeatureNotSupportedException("Method not supported");
}

From source file:org.apache.hive.jdbc.HiveStatement.java

@Override
public boolean execute(String sql, int[] columnIndexes) throws SQLException {
    throw new SQLFeatureNotSupportedException("Method not supported");
}

From source file:org.apache.hive.jdbc.HiveStatement.java

@Override
public boolean execute(String sql, String[] columnNames) throws SQLException {
    throw new SQLFeatureNotSupportedException("Method not supported");
}

From source file:org.apache.hive.jdbc.HiveStatement.java

@Override
public int[] executeBatch() throws SQLException {
    throw new SQLFeatureNotSupportedException("Method not supported");
}