|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.postgresql.pljava.internal.Session
An instance of this interface reflects the current session. The attribute store is transactional.
Constructor Summary | |
Session()
|
Method Summary | |
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. |
java.lang.String |
getSessionUserName()
Return the session user. |
TransactionListener[] |
getTransactionListeners()
Returns the list of listeners that will receive transactional events. |
java.lang.String |
getUserName()
Return the current user. |
void |
onEOXact(boolean isCommit)
Callback received from the backend when a transaction has ended. |
void |
removeAttribute(java.lang.String attributeName)
Remove an attribute previously stored in the session. |
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)
public java.lang.Object getAttribute(java.lang.String attributeName)
Session
getAttribute
in interface Session
attributeName
- The name of the attribute
public TransactionListener[] getTransactionListeners()
public java.lang.String getUserName()
getUserName
in interface Session
public java.lang.String getSessionUserName()
getSessionUserName
in interface Session
public void onEOXact(boolean isCommit)
EOXactListener
onEOXact
in interface EOXactListener
isCommit
- Set to true
if the commit was a success
and false
if the transaction aborted.public void removeAttribute(java.lang.String attributeName)
Session
removeAttribute
in interface Session
attributeName
- The name of the attribute.public void setAttribute(java.lang.String attributeName, java.lang.Object value)
Session
setAttribute
in interface Session
attributeName
- value
- public void removeTransactionListener(TransactionListener listener)
public boolean executeAsSessionUser(java.sql.Connection conn, java.lang.String statement) throws java.sql.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
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 |