@Override public void dropDatabase(final String databaseName) throws UndefinedDatabaseException, InsufficientPrivilegeException, CannotDropCurrentDatabaseException { try { final BlockingInterface stub = conn.getTMStub(); final ReturnState state = stub.dropDatabase(null, conn.getSessionedString(databaseName)); throwsIfThisError(state, UndefinedDatabaseException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); throwsIfThisError(state, CannotDropCurrentDatabaseException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public final void createIndex(final IndexDesc index) throws DuplicateIndexException, UndefinedDatabaseException, UndefinedTableException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.createIndex(null, index.getProto()); throwsIfThisError(state, DuplicateIndexException.class); throwsIfThisError(state, UndefinedTableException.class); throwsIfThisError(state, UndefinedDatabaseException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public void updateTableStats(final UpdateTableStatsProto updateTableStatsProto) throws InsufficientPrivilegeException, UndefinedTableException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.updateTableStats(null, updateTableStatsProto); throwsIfThisError(state, UndefinedTableException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } } }
@Override public void updateTableStats(final UpdateTableStatsProto updateTableStatsProto) throws InsufficientPrivilegeException, UndefinedTableException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.updateTableStats(null, updateTableStatsProto); throwsIfThisError(state, UndefinedTableException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } } }
@Override public final void dropTablespace(final String tablespaceName) throws UndefinedTablespaceException, InsufficientPrivilegeException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.dropTablespace(null, ProtoUtil.convertString(tablespaceName)); throwsIfThisError(state, UndefinedTablespaceException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public final void dropTablespace(final String tablespaceName) throws UndefinedTablespaceException, InsufficientPrivilegeException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.dropTablespace(null, ProtoUtil.convertString(tablespaceName)); throwsIfThisError(state, UndefinedTablespaceException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public final void dropDatabase(final String databaseName) throws UndefinedDatabaseException, InsufficientPrivilegeException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.dropDatabase(null, ProtoUtil.convertString(databaseName)); throwsIfThisError(state, UndefinedDatabaseException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public final void dropDatabase(final String databaseName) throws UndefinedDatabaseException, InsufficientPrivilegeException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.dropDatabase(null, ProtoUtil.convertString(databaseName)); throwsIfThisError(state, UndefinedDatabaseException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public void alterTablespace(final AlterTablespaceProto alterTablespace) throws UndefinedTablespaceException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.alterTablespace(null, alterTablespace); throwsIfThisError(state, UndefinedTablespaceException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public void alterTablespace(final AlterTablespaceProto alterTablespace) throws UndefinedTablespaceException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.alterTablespace(null, alterTablespace); throwsIfThisError(state, UndefinedTablespaceException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public final void createFunction(final FunctionDesc funcDesc) throws DuplicateFunctionException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.createFunction(null, funcDesc.getProto()); throwsIfThisError(state, DuplicateFunctionException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public final void createFunction(final FunctionDesc funcDesc) throws DuplicateFunctionException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.createFunction(null, funcDesc.getProto()); throwsIfThisError(state, DuplicateFunctionException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
public void selectDatabase(final String dbName) throws UndefinedDatabaseException { try { final BlockingInterface stub = getTMStub(); final ReturnState state = stub.selectDatabase(null, getSessionedString(dbName)); ExceptionUtil.throwsIfThisError(state, UndefinedDatabaseException.class); ensureOk(state); this.baseDatabase = dbName; } catch (ServiceException e) { throw new RuntimeException(e); } }
public void selectDatabase(final String dbName) throws UndefinedDatabaseException { try { final BlockingInterface stub = getTMStub(); final ReturnState state = stub.selectDatabase(null, getSessionedString(dbName)); ExceptionUtil.throwsIfThisError(state, UndefinedDatabaseException.class); ensureOk(state); this.baseDatabase = dbName; } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public void createDatabase(final String databaseName) throws DuplicateDatabaseException { try { final BlockingInterface stub = conn.getTMStub(); final ReturnState state = stub.createDatabase(null, conn.getSessionedString(databaseName)); throwsIfThisError(state, DuplicateDatabaseException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public void createDatabase(final String databaseName) throws DuplicateDatabaseException { try { final BlockingInterface stub = conn.getTMStub(); final ReturnState state = stub.createDatabase(null, conn.getSessionedString(databaseName)); throwsIfThisError(state, DuplicateDatabaseException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public TablespaceProto getTablespace(final String tablespaceName) throws UndefinedTablespaceException { try { final BlockingInterface stub = getStub(); final GetTablespaceResponse response = stub.getTablespace(null, ProtoUtil.convertString(tablespaceName)); throwsIfThisError(response.getState(), UndefinedTablespaceException.class); ensureOk(response.getState()); return response.getTablespace(); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public TablespaceProto getTablespace(final String tablespaceName) throws UndefinedTablespaceException { try { final BlockingInterface stub = getStub(); final GetTablespaceResponse response = stub.getTablespace(null, ProtoUtil.convertString(tablespaceName)); throwsIfThisError(response.getState(), UndefinedTablespaceException.class); ensureOk(response.getState()); return response.getTablespace(); } catch (ServiceException e) { throw new RuntimeException(e); } }
public QueryInfoProto getQueryInfo(final QueryId queryId) throws QueryNotFoundException { final BlockingInterface stub = conn.getTMStub(); final QueryIdRequest request = buildQueryIdRequest(queryId); GetQueryInfoResponse res; try { res = stub.getQueryInfo(null, request); } catch (ServiceException e) { throw new RuntimeException(e); } throwsIfThisError(res.getState(), QueryNotFoundException.class); ensureOk(res.getState()); return res.getQueryInfo(); }
public QueryInfoProto getQueryInfo(final QueryId queryId) throws QueryNotFoundException { final BlockingInterface stub = conn.getTMStub(); final QueryIdRequest request = buildQueryIdRequest(queryId); GetQueryInfoResponse res; try { res = stub.getQueryInfo(null, request); } catch (ServiceException e) { throw new RuntimeException(e); } throwsIfThisError(res.getState(), QueryNotFoundException.class); ensureOk(res.getState()); return res.getQueryInfo(); }