org.exolab.jms.tools.db
Class SchemaHelper

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

public class SchemaHelper
extends java.lang.Object

Schema utility class.

Version:
$Revision: 1.2 $ $Date: 2005/06/10 04:32:23 $
Author:
Tim Anderson

Constructor Summary
SchemaHelper()
           
 
Method Summary
static Attribute getAttribute(Table table, java.lang.String name)
           
static Database getSchema()
           
static Database getSchema(java.lang.String path)
           
static Database getSchemaFromResource(java.lang.String path)
           
static java.lang.String getSchemaVersion(java.sql.Connection connection)
          Get the schema version
static Table getTable(Database schema, java.lang.String name)
           
static void setVersion(java.sql.Connection connection, java.lang.String version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaHelper

public SchemaHelper()
Method Detail

getSchemaVersion

public static java.lang.String getSchemaVersion(java.sql.Connection connection)
                                         throws org.exolab.jms.persistence.PersistenceException
Get the schema version
Parameters:
connection - the connection to use
Returns:
the schema version, or null, if no version has been initialised
Throws:
org.exolab.jms.persistence.PersistenceException - for any related persistence exception

setVersion

public static void setVersion(java.sql.Connection connection,
                              java.lang.String version)
                       throws org.exolab.jms.persistence.PersistenceException

getTable

public static Table getTable(Database schema,
                             java.lang.String name)

getAttribute

public static Attribute getAttribute(Table table,
                                     java.lang.String name)

getSchema

public static Database getSchema()
                          throws org.exolab.jms.persistence.PersistenceException

getSchemaFromResource

public static Database getSchemaFromResource(java.lang.String path)
                                      throws org.exolab.jms.persistence.PersistenceException

getSchema

public static Database getSchema(java.lang.String path)
                          throws org.exolab.jms.persistence.PersistenceException


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