org.exolab.jms.tools.db
Class SchemaBrowser

java.lang.Object
  |
  +--org.exolab.jms.tools.db.SchemaBrowser

public class SchemaBrowser
extends java.lang.Object

This class provides methods for examining a database schema

Version:
$Revision: 1.5 $ $Date: 2003/08/07 13:33:11 $
Author:
Tim Anderson

Constructor Summary
SchemaBrowser(java.sql.Connection connection)
          Construct a new SchemaBrowser
 
Method Summary
 org.exolab.jms.tools.db.Table getTable(java.lang.String name)
          Returns the schema for the specified table
 boolean getTableExists(java.lang.String table)
          Returns true if a table exists
 Type getType(org.exolab.jms.tools.db.Attribute attribute)
          Returns the Type for an Attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaBrowser

public SchemaBrowser(java.sql.Connection connection)
              throws PersistenceException
Construct a new SchemaBrowser
Parameters:
connection - the JDBC connection
Throws:
PersistenceException - if database meta-data can't be obtained
Method Detail

getTable

public org.exolab.jms.tools.db.Table getTable(java.lang.String name)
                                       throws PersistenceException
Returns the schema for the specified table
Parameters:
name - the table name
Returns:
the schema for the table identified by name
Throws:
PersistenceException - if the named table doesn't exist, or the schema cannot be obtained

getType

public Type getType(org.exolab.jms.tools.db.Attribute attribute)
             throws PersistenceException
Returns the Type for an Attribute
Parameters:
attribute - the attribute
Returns:
the type
Throws:
PersistenceException - if Attribute.getType() is invalid, or the RDBMS doesn't support the type

getTableExists

public boolean getTableExists(java.lang.String table)
                       throws PersistenceException
Returns true if a table exists
Parameters:
table - the name of the table


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.