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.2 $ $Date: 2005/09/04 07:16:22 $
Author:
Tim Anderson

Constructor Summary
SchemaBrowser(java.sql.Connection connection)
          Construct a new SchemaBrowser.
 
Method Summary
 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(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 org.exolab.jms.persistence.PersistenceException
Construct a new SchemaBrowser.
Parameters:
connection - the JDBC connection
Throws:
org.exolab.jms.persistence.PersistenceException - if database meta-data can't be obtained
Method Detail

getTable

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

getType

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

getTableExists

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


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