public abstract class SessionManager extends Object
JGrapeService
implementors.| Modifier and Type | Field and Description |
|---|---|
static String |
LOG_CONTROL
Client context parameter for log control
|
| Constructor and Description |
|---|
SessionManager() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doLog() |
static String |
getDatabaseContextName(ClientContext ctx,
String appName)
Returns the proper database context name according to the given
client context.
|
static String |
getDatabaseMappingName(ObjectSelection objectSelection)
Returns the proper database mapping name according to the given
objectSelection
|
static String |
getLogfileDateFormat() |
static Session |
getSession(ClientContext ctx,
String dbMapping)
Convenience method, returns a session for the given client context and
database mapping.
|
static Session |
getSession(ObjectSelection objectSelection,
ClientContext ctx)
Convenience method, returns a session for the given object selection and
client context.
|
static SessionFactory |
getSessionFactory() |
protected void |
logControl(boolean on)
Turn service logging on or off.
|
protected void |
logParams(JGrapeParamWrapper logObject)
Log the JGrapeService parameters.
|
static void |
setLogfileDateFormat(String logfileDateFormat)
Set the format currently used for timestamping log files.
|
public static final String LOG_CONTROL
public static SessionFactory getSessionFactory()
public static Session getSession(ObjectSelection objectSelection, ClientContext ctx)
objectSelection - - the object selection.ctx - - the client context.public static Session getSession(ClientContext ctx, String dbMapping)
ctx - - the client context.dbMapping - - the database mapping.public static String getDatabaseContextName(ClientContext ctx, String appName)
ctx - - the client contextappName - - the name of the service applicationnull if no database context is found.public static String getDatabaseMappingName(ObjectSelection objectSelection)
objectSelection - - the object selection in question.protected void logParams(JGrapeParamWrapper logObject)
logObject - - the JGrapeService parameters to be logged.protected void logControl(boolean on)
on - - true=on, false=offprotected boolean doLog()
public static String getLogfileDateFormat()
public static void setLogfileDateFormat(String logfileDateFormat)
logfileDateFormat - - the new format to use.Copyright © 2006–2018 Esito AS. All rights reserved.