Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.db.jdbc
Class Schema

    java.lang.Object
      |
      +--weblogic.db.jdbc.Schema

public final class Schema
extends java.lang.Object
implements java.io.Externalizable

A Schema contains metadata about the attributes associated with a DataSet.

For implementation and usage see the Developers Guide.

Author:
  Copyright (c) 1995-1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-1999 by BEA Systems, Inc. All Rights Reserved.
See Also:
  `DataSet`, Serialized Form

Constructor Summary
`Schema()` Private - used for serialization

Method Summary
`java.lang.String` | `attributes()`
`Column` | `column(int pos)` Returns the Column object at the specified index position in a Schema.
`Column` | `column(java.lang.String pos)` Returns the Column object of the specified name from a Schema.
`void` | `destroy()` Private - used for serialization
`int` | `index(java.lang.String colname)` Returns the 1-based index position of the specified Column name in a Schema.
`void` | `initialize()` Private - used for serialization
`int` | `numberOfColumns()` Returns the number of columns in a Schema object.
`void` | `readExternal(java.io.ObjectInput in)` Private - used for serialization
`static Schema` | `schema(java.sql.Connection conn, java.lang.String tablename)` Returns the Schema for the specified database table.
`static Schema` | `schema(java.sql.Connection conn, java.lang.String tablename, java.lang.String attributes)` Returns the Schema for the specified database table and fields.
`java.lang.String` | `tableName()`
`java.lang.String` | `toString()` Displays the column attributes of a Schema in a newline-delimited list, with one attribute per line.
`void` | `writeExternal(java.io.ObjectOutput out)` Private - used for serialization

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

Constructor Detail

### Schema

    public Schema()

  Private - used for serialization

Method Detail

### schema

    public static Schema schema(java.sql.Connection conn,
                                java.lang.String tablename)
                         throws java.sql.SQLException,
                                DataSetException

  Returns the Schema for the specified database table.

  Parameters:
    `conn` - Connection object
    `tablename` - Name of database table
  Returns:
    Schema object
  Throws:
    DataSetException - if there is a DataSet error
    java.sql.SQLException - if there is a SQL error

### schema

    public static Schema schema(java.sql.Connection conn,
                                java.lang.String tablename,
                                java.lang.String attributes)
                         throws java.sql.SQLException,
                                DataSetException

  Returns the Schema for the specified database table and fields.

  Parameters:
    `conn` - Connection object
    `tablename` - Name of database table
    `attributes` - Attributes of table
  Returns:
    Schema object
  Throws:
    DataSetException - if there is a DataSet error
    java.sql.SQLException - if there is a SQL error

### attributes

    public java.lang.String attributes()

### tableName

    public java.lang.String tableName()

### numberOfColumns

    public int numberOfColumns()

  Returns the number of columns in a Schema object.

  Returns:
    Number of columns

### index

    public int index(java.lang.String colname)
              throws DataSetException

  Returns the 1-based index position of the specified Column name in a Schema.

  Parameters:
    `colname` - Name of the column
  Returns:
    Index position of the column
  Throws:
    DataSetException - if the column name is invalid

### column

    public Column column(java.lang.String pos)
                  throws DataSetException

  Returns the Column object of the specified name from a Schema.

  Parameters:
    `pos` - Name of column
  Returns:
    Column object
  Throws:
    DataSetException - if the column name is invalid

### column

    public Column column(int pos)
                  throws DataSetException

  Returns the Column object at the specified index position in a Schema. The first column is referenced with an index of 1.

  Parameters:
    `pos` - Index into the Schema (1-based)
  Returns:
    Column object
  Throws:
    DataSetException - if the column index is invalid or out of bounds

### toString

    public java.lang.String toString()

  Displays the column attributes of a Schema in a newline-delimited list, with one attribute per line. The details of the attribute are shown as follows:
  - Name
  - Type
  - Length
  - Precision
  - Scale
  - Null allowed

  Returns:
    String object
  Overrides:
    toString in class java.lang.Object

### initialize

    public void initialize()

  Private - used for serialization

### destroy

    public void destroy()

  Private - used for serialization

### readExternal

    public void readExternal(java.io.ObjectInput in)
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException

  Private - used for serialization
  Specified by:
    readExternal in interface java.io.Externalizable

  Throws:
    java.lang.ClassNotFoundException - if there is an error

### writeExternal

    public void writeExternal(java.io.ObjectOutput out)
                       throws java.io.IOException

  Private - used for serialization
  Specified by:
    writeExternal in interface java.io.Externalizable

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference