public class WebSessionFactory extends HibernateFactory
Modifier and Type | Method and Description |
---|---|
static WebSession |
createSession()
Create a new Session from scratch
|
protected org.apache.log4j.Logger |
getLogger()
Get the Logger for the derived class so log messages
show up on the correct class
|
static WebSession |
lookupById(java.lang.Long id)
Lookup a Session by their id
|
static void |
purgeUserSessions(User user)
Removes all the sessions of a user.
|
static int |
remove(WebSession webSession)
Remove a Session from the DB
|
static void |
save(WebSession webSession)
Insert or Update a Session.
|
addConfigurator, blobToByteArray, byteArrayToBlob, closeSession, closeSessionFactory, commitTransaction, createSessionFactory, createSessionFactory, executeCallableMode, executeSelectMode, getBlobContents, getByteArrayContents, getObject, getSession, initialize, inTransaction, isClosed, isInitialized, listObjectsByNamedQuery, listObjectsByNamedQuery, listObjectsByNamedQuery, lockObject, lookupObjectByNamedQuery, lookupObjectByNamedQuery, reload, removeObject, rollbackTransaction, saveObject, saveObject, stringToByteArray
protected org.apache.log4j.Logger getLogger()
getLogger
in class HibernateFactory
public static WebSession createSession()
public static WebSession lookupById(java.lang.Long id)
id
- the id to search forpublic static void save(WebSession webSession)
webSession
- WebSession to be stored in database.public static int remove(WebSession webSession)
webSession
- WebSession to be removed from database.public static void purgeUserSessions(User user)
user
- the user whose sessions are to be purged.