Relation
Date: 2010-07-30

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.postgresql.pljava.internal
Class Relation

    java.lang.Object
      org.postgresql.pljava.internal.JavaWrapper
          org.postgresql.pljava.internal.Relation

    public class Relation

extends JavaWrapper

The `Relation` correspons to the internal PostgreSQL `Relation`.

Method Summary
`protected void` | `_free(long pointer)` Calls the C function pfree() with the given pointer as an argument.
`java.lang.String` | `getName()` Returns the name of this `Relation`.
`java.lang.String` | `getSchema()` Returns the schema name of this `Relation`.
`TupleDesc` | `getTupleDesc()` Returns a descriptor that describes tuples in this `Relation`.
`Tuple` | `modifyTuple(Tuple original, int[] fieldNumbers, java.lang.Object[] values)` Creates a new `Tuple` by substituting new values for selected columns copying the columns of the original `Tuple` at other positions.

Methods inherited from class org.postgresql.pljava.internal.JavaWrapper
`finalize, getNativePointer`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getName

    public java.lang.String getName()
                             throws java.sql.SQLException

  Returns the name of this `Relation`.

  Throws:
    `java.sql.SQLException`

### getSchema

    public java.lang.String getSchema()
                               throws java.sql.SQLException

  Returns the schema name of this `Relation`.

  Throws:
    `java.sql.SQLException`

### getTupleDesc

    public TupleDesc getTupleDesc()
                           throws java.sql.SQLException

  Returns a descriptor that describes tuples in this `Relation`.

  Throws:
    `java.sql.SQLException`

### modifyTuple

    public Tuple modifyTuple(Tuple original,
                             int[] fieldNumbers,
                             java.lang.Object[] values)
                      throws java.sql.SQLException

  Creates a new `Tuple` by substituting new values for selected columns copying the columns of the original `Tuple` at other positions. The original `Tuple` is not modified.

  Parameters:
    `original` - The tuple that serves as the source.
    `fieldNumbers` - An array of one based indexes denoting the positions that are to receive modified values.
    `values` - The array of new values. Each value in this array corresponds to an index in the `fieldNumbers` array.
  Returns:
    A copy of the original with modifications.
  Throws:
    `java.sql.SQLException` - if indexes are out of range or the values illegal.

### _free

    protected void _free(long pointer)

  Description copied from class: `JavaWrapper`
  Calls the C function pfree() with the given pointer as an argument. Subclasses may override this method if special handling is needed when freeing up the object.

  Overrides:
    `_free` in class `JavaWrapper`
  Parameters:
    `pointer` - The pointer to free.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \ Distributed under the terms shown in COPYRIGHT