FileDocCategorySizeDatePackage
AbstractExecutable.javaAPI DocHibernate 3.2.5957Tue Dec 12 16:22:26 GMT 2006org.hibernate.test.instrument.cases

AbstractExecutable

public abstract class AbstractExecutable extends Object implements Executable
author
Steve Ebersole

Fields Summary
private org.hibernate.SessionFactory
factory
Constructors Summary
Methods Summary
protected voidcleanup()

	
public final voidcomplete()

		try {
			cleanup();
		}
		finally {
			factory.close();
		}
	
protected org.hibernate.SessionFactorygetFactory()

		return factory;
	
protected java.lang.String[]getResources()

		return new String[] { "org/hibernate/test/instrument/domain/Documents.hbm.xml" };
	
public final voidprepare()

		Configuration cfg = new Configuration().setProperty( Environment.HBM2DDL_AUTO, "create-drop" );
		String[] resources = getResources();
		for ( int i = 0; i < resources.length; i++ ) {
			cfg.addResource( resources[i] );
		}
		factory = cfg.buildSessionFactory();