| java.lang.Object com.jcorporate.expresso.services.test.SchemaManager
SchemaManager | public class SchemaManager (Code) | | This class reference counts references to various Schema objects.
When a reference count drops to zero, the schema is deleted. [If it's not
marked read only] If it is marked readonly, then the schema is created,
but not deleted. [Makes for much faster checking when running unit tests
on, say, a single controller]
author: Michael Rimov version: $Revision: 1.12 $ $Date: 2004/11/17 20:48:22 $ |
SchemaManager | public SchemaManager()(Code) | | |
addReadOnlyReference | public static synchronized void addReadOnlyReference(Schema s)(Code) | | Adds a schema reference that is not removed when the count goes to zero
because it is a read only schema. You can undo this 'read-onliness' by
calling forceSchemaDelete() which will remove the read only flags for
this schema. Note that if any other reference is added for this schema,
then if it's a non-readonly reference, than the schema will be deleted
as usual.
Parameters: s - the Schema to add |
addReference | public static synchronized void addReference(Schema s)(Code) | | Add a reference to a schema. Create the schema if no previous reference
Parameters: s - The Schema to reference |
addReference | public static synchronized void addReference(Schema s, boolean forceNoCreate)(Code) | | Add a reference to a schema. Create the schema if no previous reference
Parameters: s - The Schema to reference Parameters: forceNoCreate - Set to true if you just want a reference added, but noschema created. This is used if DBToolTests are being run in the testsuite. |
forceAllSchemaDelete | public static synchronized void forceAllSchemaDelete()(Code) | | |
forceSchemaDelete | public static synchronized void forceSchemaDelete(Schema s)(Code) | | Forces the schema deletion even if the schema is marked "read only"
Parameters: s - the schema to force a delete |
removeReference | public static synchronized void removeReference(Schema s)(Code) | | Reduces the reference count to Schema s. Deletes the schema if the
reference count is reduced to zero.
Parameters: s - the Schema to remove a reference. |
|
|