|
|||||||||
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(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 Session
listener
- The listener to be added.public void addSavepointListener(SavepointListener listener)
addSavepointListener
in interface Session
listener
- The listener to be added.public java.lang.Object getAttribute(java.lang.String attributeName)
Session
getAttribute
in interface Session
attributeName
- The name of the attribute
public ObjectPool getObjectPool(java.lang.Class cls)
Session
PooledObject
.
getObjectPool
in interface Session
public java.lang.String getUserName()
getUserName
in interface Session
public java.lang.String getSessionUserName()
getSessionUserName
in interface Session
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
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(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 |