BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.db.jdbc
Class Schema

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

public final class Schema
extends java.lang.Object
implements WLSerializable

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.
Copyright © 2000 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 readObject(WLObjectInput sis)
          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 writeObject(WLObjectOutput sos)
          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:

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


readObject

public void readObject(WLObjectInput sis)
                throws java.io.IOException,
                       java.lang.ClassNotFoundException
Private - used for serialization
Specified by:
readObject in interface WLSerializable

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

writeObject

public void writeObject(WLObjectOutput sos)
                 throws java.io.IOException
Private - used for serialization
Specified by:
writeObject in interface WLSerializable


Documentation is available at
http://www.weblogic.com/docs51