|
||||||||||
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. |
void |
executeAsSessionUser(Connection conn,
String statement)
Execute a statement as a session user rather then the effective user. |
Object |
getAttribute(String attributeName)
Obtain an attribute from the current session. |
ObjectPool |
getObjectPool(Class cls)
Return an object pool for the given class. |
String |
getSessionUserName()
Return the session user. |
String |
getUserName()
Return the current user. |
void |
removeAttribute(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(String attributeName,
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 Session
listener
- The listener to be added.public void addSavepointListener(SavepointListener listener)
addSavepointListener
in interface Session
listener
- The listener to be added.public Object getAttribute(String attributeName)
Session
getAttribute
in interface Session
attributeName
- The name of the attribute
public ObjectPool getObjectPool(Class cls)
Session
PooledObject
.
getObjectPool
in interface Session
public String getUserName()
getUserName
in interface Session
public String getSessionUserName()
getSessionUserName
in interface Session
public void removeAttribute(String attributeName)
Session
removeAttribute
in interface Session
attributeName
- The name of the attribute.public void setAttribute(String attributeName, Object value)
Session
setAttribute
in interface Session
public void removeTransactionListener(TransactionListener listener)
removeTransactionListener
in interface Session
listener
- The listener to be removed.public void removeSavepointListener(SavepointListener listener)
removeSavepointListener
in interface Session
listener
- The listener to be removed.public void executeAsSessionUser(Connection conn, String statement) throws SQLException
Session
SECURITY DEFINER
wants to give up the definer
rights.
executeAsSessionUser
in interface Session
conn
- The connection used for the executionstatement
- The statement to execute
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 |