Expresso 5-5-0

com.jcorporate.expresso.services.test
Class SchemaCreator

java.lang.Object
  extended bycom.jcorporate.expresso.services.test.SchemaCreator

public class SchemaCreator
extends Object

Given a series of schema class names, this class will perform a "dbcreate" The big difference between this and other versions is that this will work on a blank database.

Version:
$Revision: 1.15 $ $Date: 2004/03/01 16:42:57 $
Author:
Michael Rimov

Constructor Summary
SchemaCreator()
          Default Constructor
 
Method Summary
static boolean ensureSchemaExists(Schema oneSchema)
          Deprecated. use ensureSchemaExists(Schema,InstallLog) instead
static boolean ensureSchemaExists(Schema oneSchema, InstallLog installLog)
           
 String getDataContext()
           
static boolean schemaExists(Schema oneSchema)
          Iterates through all the tables.
 void setDataContext(String newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaCreator

public SchemaCreator()
Default Constructor

Method Detail

getDataContext

public String getDataContext()

setDataContext

public void setDataContext(String newValue)

schemaExists

public static boolean schemaExists(Schema oneSchema)
                            throws DBException
Iterates through all the tables. If they all exist, then we assume the schema is properly set up.

Parameters:
oneSchema - an instantiated Schema object to check to see if it is installed or not.
Returns:
false if there is an error on getting DBobject.count() on the database table.
Throws:
DBException - upon database communication error

ensureSchemaExists

public static boolean ensureSchemaExists(Schema oneSchema,
                                         InstallLog installLog)
                                  throws DBException
Parameters:
oneSchema -
installLog -
Returns:
Throws:
DBException

ensureSchemaExists

public static boolean ensureSchemaExists(Schema oneSchema)
                                  throws DBException
Deprecated. use ensureSchemaExists(Schema,InstallLog) instead

Makes sure that the schemas set by setSchemaList exist. If they do not, then create them.

Parameters:
oneSchema - the schema to make sure is installed in the system
Returns:
true if the schema already existed.
Throws:
DBException - if something went wrong with the database creation.

Expresso 5-5-0

Please see www.jcorporate.com for information about new Expresso releases.