|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.specrunner.parameters.core.ParameterHolder
org.specrunner.plugins.core.AbstractPlugin
org.specrunner.plugins.core.AbstractPluginNamed
org.specrunner.plugins.core.AbstractPluginScoped
org.specrunner.plugins.core.AbstractPluginValue
org.specrunner.hibernate.AbstractPluginFactory
org.specrunner.hibernate.PluginSessionFactory
public class PluginSessionFactory
Creates/recovers a SessionFactory instance and add it to the plugin global context, it can be done using three strategies:
IConfigurationProvider, i.e.
type='myclass.SessionConfigurationImpl';Configuration, i.e.
factory="myclass.Any" method="getConfig".
| Field Summary | |
|---|---|
static String |
FEATURE_CONFIGURATION
Feature to set configuration. |
static String |
FEATURE_FACTORY
Feature to set session factory factory. |
static String |
FEATURE_METHOD
Set feature factory method name. |
static String |
FEATURE_TYPE
The session factory provider name. |
static String |
SESSION_FACTORY
Default session factory name. |
| Fields inherited from class org.specrunner.hibernate.AbstractPluginFactory |
|---|
factory, method, type |
| Fields inherited from class org.specrunner.plugins.core.AbstractPlugin |
|---|
FEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAIT |
| Constructor Summary | |
|---|---|
PluginSessionFactory()
|
|
| Method Summary | |
|---|---|
protected org.hibernate.service.ServiceRegistry |
createServiceRegistry(org.hibernate.cfg.Configuration cfg)
Create session service registry. |
ENext |
doStart(IContext context,
IResultSet result)
|
String |
getConfiguration()
Gets the configuration. |
static org.hibernate.SessionFactory |
getSessionFactory(IContext context,
String name)
Get the session factory associated to a given name in test context. |
void |
initialize(IContext context)
|
void |
setConfiguration(String configuration)
Sets the configuration. |
protected void |
setListeners(org.hibernate.SessionFactory sessionFactory)
Add listeners to a session factory. |
| Methods inherited from class org.specrunner.hibernate.AbstractPluginFactory |
|---|
getActionType, getFactory, getMethod, getType, setFactory, setMethod, setType |
| Methods inherited from class org.specrunner.plugins.core.AbstractPluginValue |
|---|
getValue, getValue, isEval, setEval, setValue |
| Methods inherited from class org.specrunner.plugins.core.AbstractPluginScoped |
|---|
getScope, saveGlobal, saveLocal, saveStrict, setScope |
| Methods inherited from class org.specrunner.plugins.core.AbstractPluginNamed |
|---|
getName, setName |
| Methods inherited from class org.specrunner.plugins.core.AbstractPlugin |
|---|
copy, doEnd, getCondition, getConditionModel, getNormalized, getNormalized, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, setCondition, setConditionModel, setNormalized, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel, toString |
| Methods inherited from class org.specrunner.parameters.core.ParameterHolder |
|---|
getParameters, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.specrunner.parameters.IParameterHolder |
|---|
getParameters, setParameters |
| Field Detail |
|---|
public static final String SESSION_FACTORY
public static final String FEATURE_CONFIGURATION
public static final String FEATURE_TYPE
public static final String FEATURE_FACTORY
public static final String FEATURE_METHOD
| Constructor Detail |
|---|
public PluginSessionFactory()
| Method Detail |
|---|
public String getConfiguration()
public void setConfiguration(String configuration)
configuration - The configuration.
public void initialize(IContext context)
throws PluginException
initialize in interface IPlugininitialize in class AbstractPluginPluginException
public ENext doStart(IContext context,
IResultSet result)
throws PluginException
doStart in interface IPlugindoStart in class AbstractPluginPluginExceptionprotected org.hibernate.service.ServiceRegistry createServiceRegistry(org.hibernate.cfg.Configuration cfg)
cfg - A configuration.
protected void setListeners(org.hibernate.SessionFactory sessionFactory)
sessionFactory - A session factory.
public static org.hibernate.SessionFactory getSessionFactory(IContext context,
String name)
throws PluginException
context - The context.name - The name.
PluginException - On session factory lookup errors.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||