public class PluginSessionFactory extends AbstractPluginFactory
IConfigurationProvider, i.e.
type='myclass.SessionConfigurationImpl';Configuration, i.e.
factory="myclass.Any" method="getConfig".
| Modifier and Type | Field and Description |
|---|---|
protected String |
configuration
The configuration name.
|
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.
|
factory, method, typeeval, valuescopenameFEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_NORMALIZER, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAITparameters| Constructor and Description |
|---|
PluginSessionFactory() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getActionType, getFactory, getMethod, getType, setFactory, setMethod, setTypegetValue, getValue, isEval, setEval, setValuegetScope, saveGlobal, saveLocal, saveStrict, setScopegetName, setNamecopy, doEnd, getCondition, getConditionModel, getNormalized, getNormalized, getNormalizer, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, setCondition, setConditionModel, setNormalized, setNormalizer, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel, toStringgetParameters, setParametersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParameters, setParameterspublic static final String SESSION_FACTORY
public static final String FEATURE_CONFIGURATION
protected String configuration
public static final String FEATURE_TYPE
public static final String FEATURE_FACTORY
public static final String FEATURE_METHOD
public String getConfiguration()
public void setConfiguration(String configuration)
configuration - The configuration.public void initialize(IContext context) throws PluginException
initialize in interface IPlugininitialize in class AbstractPluginPluginExceptionpublic 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.Copyright © 2017. All rights reserved.