|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.postgresql.pljava.internal.Session
public class Session
An instance of this interface reflects the current session. The attribute store is transactional.
| Constructor Summary | |
|---|---|
Session()
|
|
| Method Summary | |
|---|---|
void |
addSavepointListener(SavepointListener listener)
Adds the specified listener to the list of listeners that will receive savepoint events. |
void |
addTransactionListener(TransactionListener listener)
Adds the specified listener to the list of listeners that will receive transactional events. |
boolean |
executeAsSessionUser(java.sql.Connection conn,
java.lang.String statement)
Execute a statement as a session user rather then the effective user. |
java.lang.Object |
getAttribute(java.lang.String attributeName)
Obtain an attribute from the current session. |
ObjectPool |
getObjectPool(java.lang.Class cls)
Return an object pool for the given class. |
java.lang.String |
getSessionUserName()
Return the session user. |
java.lang.String |
getUserName()
Return the current user. |
void |
removeAttribute(java.lang.String attributeName)
Remove an attribute previously stored in the session. |
void |
removeSavepointListener(SavepointListener listener)
Removes the specified listener from the list of listeners that will receive savepoint events. |
void |
removeTransactionListener(TransactionListener listener)
Removes the specified listener from the list of listeners that will receive transactional events. |
void |
setAttribute(java.lang.String attributeName,
java.lang.Object value)
Set an attribute to a value in the current session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Session()
| Method Detail |
|---|
public void addTransactionListener(TransactionListener listener)
addTransactionListener in interface Sessionlistener - The listener to be added.public void addSavepointListener(SavepointListener listener)
addSavepointListener in interface Sessionlistener - The listener to be added.public java.lang.Object getAttribute(java.lang.String attributeName)
Session
getAttribute in interface SessionattributeName - The name of the attribute
public ObjectPool getObjectPool(java.lang.Class cls)
SessionPooledObject.
getObjectPool in interface Sessionpublic java.lang.String getUserName()
getUserName in interface Sessionpublic java.lang.String getSessionUserName()
getSessionUserName in interface Sessionpublic void removeAttribute(java.lang.String attributeName)
Session
removeAttribute in interface SessionattributeName - The name of the attribute.
public void setAttribute(java.lang.String attributeName,
java.lang.Object value)
Session
setAttribute in interface Sessionpublic void removeTransactionListener(TransactionListener listener)
removeTransactionListener in interface Sessionlistener - The listener to be removed.public void removeSavepointListener(SavepointListener listener)
removeSavepointListener in interface Sessionlistener - The listener to be removed.
public boolean executeAsSessionUser(java.sql.Connection conn,
java.lang.String statement)
throws java.sql.SQLException
SessionSECURITY DEFINER wants to give up the definer
rights.
executeAsSessionUser in interface Sessionconn - The connection used for the executionstatement - The statement to execute
java.sql.SQLException - if something goes wrong when executing.Statement.execute(java.lang.String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||