com.mizar.faces.javax.session
Class SessionLogs

java.lang.Object
  extended by com.mizar.persistence.jpa.facade.JPAFacade
      extended by com.mizar.faces.javax.session.SessionLogs

public class SessionLogs
extends JPAFacade


Field Summary
 
Fields inherited from class com.mizar.persistence.jpa.facade.JPAFacade
em, emf, model, persistenceUnitName, schemaName, sequencesValidated, silent, verbose
 
Constructor Summary
SessionLogs()
          This class should ONLY be constructed through a faces-config.xml file Its behavior depends on it being a JSF Application Scoped Bean
 
Method Summary
static void addSessionLog(java.lang.Boolean admin)
           
static void addSessionLog(SessionLogRecord sessionLogRecord)
          This is a NPE safe method, if SessionLogs is not instantiated no error will occur
static SessionLogs getInstance()
          This method is called getInstance instead of getCurrentInstance to emphasis that it is an APPLICATOIN scoped bean
static java.lang.String getKillPermission()
           
 java.lang.String getKillPrivilege()
           
static java.lang.String getLockPermission()
           
 java.lang.String getLockPrivilege()
           
static java.lang.String getReadPermission()
           
 java.lang.String getReadPrivilege()
           
static java.util.Map<java.lang.String,SessionLogRecord> getSessionLogs()
          This is a NPE safe method, if ApplcationLogTable is not instantiated no error will occur
static void incrementMvRequests(SessionLogRecord sessionLogRecord)
           
static void incrementMvRequests(java.lang.String sessionId)
           
static void incrementRowsFetched(SessionLogRecord sessionLogRecord, long rowsFetched)
           
static void incrementRowsFetched(java.lang.String sessionId, long rowsFetched)
           
static void incrementSqlRequests(SessionLogRecord sessionLogRecord)
           
static void incrementSqlRequests(java.lang.String sessionId)
           
static void killSession(SessionLogRecord sessionLogRecord)
           
static void killSession(java.lang.String sessionId)
           
static void logoutSession(SessionLogRecord sessionLogRecord)
           
static void logoutSession(java.lang.String sessionId)
           
 SessionLogRecord mergeRecord(SessionLogRecord sessionLogRecord)
           
static void mergeSessionLog(SessionLogRecord sessionLogRecord)
           
 SessionLogRecord persistRecord(SessionLogRecord sessionLogRecord)
           
static void removeSessionLog(SessionLogRecord sessionLogRecord)
          This is a NPE safe method, if ApplcationLogTable is not instantiated no error will occur
static void removeSessionLog(java.lang.String sessionId)
           
 java.util.Map<java.lang.String,SessionLogRecord> sessionLogsGet()
           
 void setKillPrivilege(java.lang.String killPrivilege)
          This should normally be set only by faces-config.xml
 void setLockPrivilege(java.lang.String lockPrivilege)
          This should normally be set only by faces-config.xml
 void setReadPrivilege(java.lang.String readPrivilege)
          This should normally be set only by faces-config.xml
 
Methods inherited from class com.mizar.persistence.jpa.facade.JPAFacade
closeEm, closeEm, closeEmf, executeDDL, executeNativeUpdate, executeNativeUpdate, executeUpdate, getClosableConnectionAccessor, getConnection, getConnection, getEm, getEm, getEmf, getEmf, getLogger, getPassword, getPassword, getPersistenceUnitName, getSchemaName, getSequencesValidated, getSid, getSilent, getTableName, getToleratedErrorCodes, getUrl, getUser, getVerbose, mergeBean, persist, persistBean, printAnyBean, queryTester, queryTester, refreshBean, remove, removeBean, removeBean, setEmf, setPersistenceUnitName, setSilent, setToleratedErrorCodes, setVerbose, validateSequences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionLogs

public SessionLogs()
This class should ONLY be constructed through a faces-config.xml file Its behavior depends on it being a JSF Application Scoped Bean

Method Detail

getInstance

public static SessionLogs getInstance()
This method is called getInstance instead of getCurrentInstance to emphasis that it is an APPLICATOIN scoped bean

Returns:
the instance of SessionLogs, if it has been created as a Faces Scoped Bean and null if not.

addSessionLog

public static void addSessionLog(SessionLogRecord sessionLogRecord)
This is a NPE safe method, if SessionLogs is not instantiated no error will occur

Parameters:
sessionLogRecord -

persistRecord

public SessionLogRecord persistRecord(SessionLogRecord sessionLogRecord)

mergeSessionLog

public static void mergeSessionLog(SessionLogRecord sessionLogRecord)

mergeRecord

public SessionLogRecord mergeRecord(SessionLogRecord sessionLogRecord)

addSessionLog

public static void addSessionLog(java.lang.Boolean admin)

removeSessionLog

public static void removeSessionLog(SessionLogRecord sessionLogRecord)
This is a NPE safe method, if ApplcationLogTable is not instantiated no error will occur

Parameters:
sessionLogRecord -

removeSessionLog

public static void removeSessionLog(java.lang.String sessionId)

killSession

public static void killSession(SessionLogRecord sessionLogRecord)

killSession

public static void killSession(java.lang.String sessionId)

logoutSession

public static void logoutSession(SessionLogRecord sessionLogRecord)

logoutSession

public static void logoutSession(java.lang.String sessionId)

incrementMvRequests

public static void incrementMvRequests(SessionLogRecord sessionLogRecord)

incrementMvRequests

public static void incrementMvRequests(java.lang.String sessionId)

incrementSqlRequests

public static void incrementSqlRequests(SessionLogRecord sessionLogRecord)

incrementSqlRequests

public static void incrementSqlRequests(java.lang.String sessionId)

incrementRowsFetched

public static void incrementRowsFetched(SessionLogRecord sessionLogRecord,
                                        long rowsFetched)

incrementRowsFetched

public static void incrementRowsFetched(java.lang.String sessionId,
                                        long rowsFetched)

getSessionLogs

public static java.util.Map<java.lang.String,SessionLogRecord> getSessionLogs()
This is a NPE safe method, if ApplcationLogTable is not instantiated no error will occur

Returns:
the sessionLog Map is SessionLogs is instantiated otherwise null

sessionLogsGet

public java.util.Map<java.lang.String,SessionLogRecord> sessionLogsGet()
Returns:
the sessionLog Map

setReadPrivilege

public void setReadPrivilege(java.lang.String readPrivilege)
This should normally be set only by faces-config.xml

Parameters:
readPrivilege - the privilege required by userList to read ApplicationLog or SessionLog properties

getReadPermission

public static java.lang.String getReadPermission()

getReadPrivilege

public java.lang.String getReadPrivilege()

setKillPrivilege

public void setKillPrivilege(java.lang.String killPrivilege)
This should normally be set only by faces-config.xml

Parameters:
killPrivilege - the privilege required by userList before they can KILL a session

getKillPermission

public static java.lang.String getKillPermission()

getKillPrivilege

public java.lang.String getKillPrivilege()

setLockPrivilege

public void setLockPrivilege(java.lang.String lockPrivilege)
This should normally be set only by faces-config.xml

Parameters:
lockPrivilege - the privilege required by userList before they can LOCK out new userList;

getLockPermission

public static java.lang.String getLockPermission()

getLockPrivilege

public java.lang.String getLockPrivilege()