| java.lang.Object org.josso.gateway.session.service.store.AbstractSessionStore org.josso.gateway.session.service.store.db.DbSessionStore
All known Subclasses: org.josso.gateway.session.service.store.db.DataSourceSessionStore, org.josso.gateway.session.service.store.db.JdbcSessionStore,
DbSessionStore | abstract public class DbSessionStore extends AbstractSessionStore (Code) | | An abstraction of a SessionStore backed by a database.
Additional component properties include:
- sizeQuery = The SQL Query used to add a new session to the store.
- keysQuery = The SQL Query used to retrieve all session ids. The first column for each row in the result set must be the session id.
- loadAllQuery = The SQL Query used to load all sessions from the store.
- loadQuery = The SQL Query used to load one session from the store based on its id.
- loadByUserNameQuery = The SQL Query used to load all sessions associated to a given user.
- loadByLastAccesstimeQuery = The SQL Query used to load all sessions last accessed before the given date.
- loadByValidQuery = The SQL Query used to load all sessions whose valid property is equals to the gvien argument.
- deleteDml = The SQL Query used to remove a session from the store.
- deletAllDml = The SQL Query used to remove ALL sessions from the store.
- insertDml = The SQL Query used to add a new session to the store.
The columns in the result set for all load methods must be in the following order :
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
lastAccessTime and creationTime are treated as a longs, not dates.
author: Jeff Gutierrez (code@gutierrez.ph) ca |
createFromResultSet | protected BaseSession createFromResultSet(ResultSet rs) throws SQLException(Code) | | This method builds a session instance based on a result set.
Expected columns, in order:
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
Parameters: rs - throws: SQLException - |
delete | protected void delete(Connection conn, String sessionId) throws SQLException(Code) | | This removes a session, using the value of the removeDml property as prepared statement.
Parameters: conn - Parameters: sessionId - throws: SQLException - |
getLoadByLastAccessTimeQuery | public String getLoadByLastAccessTimeQuery()(Code) | | |
getLoadByUserNameQuery | public String getLoadByUserNameQuery()(Code) | | |
getLoadByValidQuery | public String getLoadByValidQuery()(Code) | | |
loadByLastAccessTime | public BaseSession[] loadByLastAccessTime(Date date) throws SSOSessionException(Code) | | Loads all sessions last accessed before the given date.
The date is converted to java.sql.Date when setting up the prepared statement.
The columns in the result set must be in the following order :
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
See Also: DbSessionStore.setLoadByLastAccessTimeQuery(String) |
save | public void save(BaseSession session) throws SSOSessionException(Code) | | Stores a session in the DB. This method opens a transaccion, removes the old session if present, the creates
it again using the configured savenDml Query and commits the transaction.
Session attributes will be passed to the prepared statemetn in the following order :
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
See Also: DbSessionStore.setInsertDml(String) Parameters: session - throws: SSOSessionException - |
setDeleteAllDml | public void setDeleteAllDml(String query)(Code) | | The SQL Query used to remove ALL sessions from the store.
|
setDeleteDml | public void setDeleteDml(String query)(Code) | | The SQL Query used to remove a session from the store.
|
setInsertDml | public void setInsertDml(String query)(Code) | | The SQL Query used to add a new session to the store.
Parameters: query - |
setKeysQuery | public void setKeysQuery(String query)(Code) | | The SQL Query used to retrieve all session ids.
The first column for each row in the result set must be the session id.
|
setLoadAllQuery | public void setLoadAllQuery(String query)(Code) | | The SQL Query used to load all sessions from the store.
The columns in the result set must be in the following order :
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
Parameters: query - |
setLoadByLastAccessTimeQuery | public void setLoadByLastAccessTimeQuery(String query)(Code) | | The SQL Query used to load all sessions last accessed before the given date.
The columns in the result set must be in the following order :
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
|
setLoadByUserNameQuery | public void setLoadByUserNameQuery(String query)(Code) | | The SQL Query used to load all sessions associated to a given user.
The columns in the result set must be in the following order :
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
Parameters: query - |
setLoadByValidQuery | public void setLoadByValidQuery(String query)(Code) | | The SQL Query used to load all sessions whose valid property is equals to the given valid.
The columns in the result set must be in the following order :
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
|
setLoadQuery | public void setLoadQuery(String query)(Code) | | The SQL Query used to load one session from the store based on its id.
The columns in the result set must be in the following order :
sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid
example : SELECT sessionId, userName, creationTime, lastAccessTime, accessCount, maxInactiveInterval, valid FROM JOSSO_SESSION WHERE sessionId = ?
Parameters: query - |
setSizeQuery | public void setSizeQuery(String query)(Code) | | The SQL query used to retrieve the number of sessions in the store.
The first column of the first row in the result set must be the number of sessions.
|
|
|