/** * @param variable {@inheritDoc}; note that because the unconstrained * {@link Answer} has no columns, there's no valid value for this * @return never * @throws TuplesException always, because there is no valid * <var>variable</var> parameter */ public int getColumnIndex(Variable variable) throws TuplesException { throw new TuplesException("No column " + variable); }
buff.append(tuples.getRowUpperBound()).append("]"); } catch (TuplesException et) { buff.append(et.toString()).append("]");
public int getNumberOfVariables() { try { notClosed(); return transaction.execute(new AnswerOperation() { public void execute() { returnInt(answer.getNumberOfVariables()); } }).getInt(); } catch (TuplesException et) { throw new IllegalStateException(et.getMessage(), et); } }
public Variable[] getVariables() { try { notClosed(); return (Variable[])(transaction.execute(new AnswerOperation() { public void execute() { returnObject(answer.getVariables()); } }).getObject()); } catch (TuplesException et) { throw new IllegalStateException(et.getMessage(), et); } }
private void notClosed() throws TuplesException { if (transaction == null) { throw new TuplesException("TransactionalAnswer closed"); } else if (answer == null) { throw new TuplesException("TransactionAnswer not closed, but Answer null"); } } }
throw new RuntimeException(ex.toString(), ex);
/** * @param columnName a column name; note that because the unconstrained * {@link Answer} has no columns, there's no valid value for this * @return never * @throws TuplesException always, because there is no valid * <var>column</var> parameter */ public Object getObject(String columnName) throws TuplesException { throw new TuplesException("No column named " + columnName); }
throw new RuntimeException(ex.toString(), ex);
/** * Unconstrained has no columns that can be unbound. * * @throws TuplesException always, because there's no possible valid value * for the <var>column</var> parameter */ public boolean isColumnEverUnbound(int column) throws TuplesException { throw new TuplesException("No such column " + column); }
public boolean isColumnEverUnbound(int column) throws TuplesException { try { return columnEverUnbound[column]; } catch (ArrayIndexOutOfBoundsException e) { throw new TuplesException("No such column " + column, e); } }
/** * @param column a column value; note that because the unconstrained * {@link Answer} has no columns, there's no valid value for this * @return never * @throws TuplesException always, because there is no valid * <var>column</var> parameter */ public Object getObject(int column) throws TuplesException { throw new TuplesException("No column " + column); }
/** * Free the {@link #variables} and {@link #values} arrays. */ public void close() throws TuplesException { if (variables == null) { throw new TuplesException("Attempt to close already closed ArrayAnswer."); } variables = null; values = null; }
public boolean isColumnEverUnbound(int column) throws TuplesException { if (column < 0 || column >= columnIndex.length) { throw new TuplesException("No such column: " + column); } return false; }
/** * Gets the ColumnValue attribute of the TestTuples object * * @param column PARAMETER TO DO * @return The ColumnValue value * @throws TuplesException EXCEPTION TO DO */ public long getColumnValue(int column) throws TuplesException { throw new TuplesException("No column "+column); }
/** * Gets the ColumnValue attribute of the AbstractTuples object * * @param column PARAMETER TO DO * @return The ColumnValue value * @throws TuplesException EXCEPTION TO DO */ public long getColumnValue(int column) throws TuplesException { // Make sure we're asking for column zero (the only column, in this case) if (column != 0) { throw new TuplesException("No column " + column); } return value; }
public long getColumnValue(int column) throws TuplesException { assert column >= 0; if (tuples == null) { throw new TuplesException("getColumnValue called before beforeFirst()"); } return ((long[]) tuples.get(currentTuple))[column]; }
public void beforeFirst(long[] prefix, int suffixTruncation) throws TuplesException { if (prefix == null) { throw new IllegalArgumentException("Null \"prefix\" parameter"); } if (suffixTruncation != 0) { throw new TuplesException("Suffix truncation not implemented"); } assert operands != null; assert operandBinding != null; isBeforeFirst = true; isAfterLast = false; this.prefix = prefix; }
/** * METHOD TO DO * * @throws TuplesException EXCEPTION TO DO */ public void beforeFirst() throws TuplesException { try { resultSet.beforeFirst(); } catch (SQLException e) { throw new TuplesException("Couldn't rewind solution", e); } }
public void beforeFirst(long[] prefix, int suffixTruncation) throws TuplesException { if (prefix == null) { throw new IllegalArgumentException("Null \"prefix\" parameter"); } if (suffixTruncation != 0) { throw new TuplesException("Suffix truncation not implemented"); } assert operands != null; assert operandBinding != null; isBeforeFirst = true; isAfterLast = false; this.prefix = prefix; } }