: Class Row

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

## com.mortbay.JDBC
Class Row

    java.lang.Object
      |
      +--com.mortbay.JDBC.Row

public class Row
extends java.lang.Object

Wrapper for a JDBC table row

Holds data for a JDBC table row

#### Notes

Performs conversion for DATETIME and ENUM column types as the columns are loaded and/or updated.

#### Usage

     See TestHarness

Version:
  $Id: Row.java,v 2.3 1999/09/22 15:08:40 gregw Exp $
Author:
  Greg Wilkins
See Also:
  `Class.ThisShouldHaveBeenChanged`

Method Summary
`java.lang.Object[]` | `get(ColumnGroup columns)` Get values by columnGroup
`java.lang.Object` | `get(int i)` Get value by column index
`java.lang.Object` | `get(java.lang.String column)` Get value by column name
`Database` | `getDatabase()`
`Table` | `getTable()`
`void` | `set(ColumnGroup columns, java.lang.Object[] newValues)` Set value by column Group
`void` | `set(int i, java.lang.Object value)` Set value by column index
`void` | `set(java.lang.Object[] newValues)` Set value for all columns
`void` | `set(java.lang.String column, java.lang.Object value)` Set value by column name
`void` | `setNew()` Set the internal state of the row to that of a new row Used when adding many similar rows to a table without a primary key
`java.lang.String` | `toString()` Rough dump of the Row as a String
`void` | `update()` Commit the row to the database

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

Method Detail

### get

    public java.lang.Object get(int i)

  Get value by column index

### get

    public java.lang.Object get(java.lang.String column)

  Get value by column name

### get

    public java.lang.Object[] get(ColumnGroup columns)

  Get values by columnGroup

### set

    public void set(int i,
                    java.lang.Object value)

  Set value by column index

### set

    public void set(java.lang.String column,
                    java.lang.Object value)

  Set value by column name

### set

    public void set(java.lang.Object[] newValues)

  Set value for all columns

### set

    public void set(ColumnGroup columns,
                    java.lang.Object[] newValues)

  Set value by column Group

### update

    public void update()
                throws java.sql.SQLException

  Commit the row to the database

### setNew

    public void setNew()

  Set the internal state of the row to that of a new row Used when adding many similar rows to a table without a primary key

### getTable

    public Table getTable()

  Returns:
    The table for this row

### getDatabase

    public Database getDatabase()

  Returns:
    The database for this row

### toString

    public java.lang.String toString()

  Rough dump of the Row as a String
  Overrides:
    toString in class java.lang.Object

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