|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--oracle.toplink.publicinterface.Session
|
+--oracle.toplink.publicinterface.DatabaseSession
|
+--oracle.toplink.sessionbroker.SessionBroker
Purpose: Provide a single view to a TopLink session that transparently accesses multple databases.
Responsibilities:
| Fields inherited from class oracle.toplink.publicinterface.DatabaseSession |
deploymentLogin, projectClassName, projectPath |
| Fields inherited from class oracle.toplink.publicinterface.Session |
isInBroker, Logging |
| Constructor Summary |
SessionBroker()
PUBLIC: Create and return a session broker. |
| Method Summary |
| Type | Method |
|---|---|
SessionBroker |
acquireClientSessionBroker()
PUBLIC: Return a session broker that behaves as a client session broker. |
UnitOfWork |
acquireUnitOfWork()
PUBLIC: Return a unit of work for this session broker. |
void |
addDescriptor(Descriptor descriptor)
PUBLIC: You cannot add a descriptor to a session broker, you must add it to its session. |
void |
addDescriptors(Project project)
PUBLIC: You cannot add a project to a session broker, you must add it to its session. |
void |
addDescriptors(java.util.Vector descriptors)
PUBLIC: You cannot add descriptors to a session broker, you must add them to its session. |
boolean |
containsQuery(java.lang.String queryName)
PUBLIC: Return true if the pre-defined query is defined on the session. |
DatabaseQuery |
getQuery(java.lang.String name)
PUBLIC: Return the query from the session pre-defined queries with the given name. |
java.util.Vector |
getSessionNames()
Return the list of sessions associated with this SessionBroker |
void |
initializeAllIdentityMaps()
PUBLIC:: Reset the entire object cache. |
void |
initializeIdentityMaps()
PUBLIC:: Reset the entire local object caches. |
boolean |
isClientSessionBroker()
PUBLIC: Return if this session is a client session broker. |
boolean |
isConnected()
PUBLIC: Return if all sessions are still connected to the database. |
boolean |
isServerSessionBroker()
PUBLIC: Return if this session is a server session broker. |
void |
login()
PUBLIC: Connect to the database using the predefined login. |
void |
login(java.lang.String userName,
java.lang.String password)
PUBLIC: Connect to the database using the predefined login. |
void |
logout()
PUBLIC: Disconnect from all databases. |
void |
registerSession(java.lang.String name,
Session session)
PUBLIC: Register the session under its name. |
void |
registerSession(java.lang.String name,
Session session)
PUBLIC: Register the session under its name. |
void |
releaseClientSessionBroker()
PUBLIC: Called on a client Session Broker. |
void |
setIntegrityChecker(IntegrityChecker integrityChecker)
PUBLIC: set the integrityChecker. |
void |
setLog(java.io.Writer log)
PUBLIC: Set the writer to which an accessor writes logged messages. |
void |
setProfiler(SessionProfiler profiler)
PUBLIC: Set the profiler for the session. |
void |
setSessionNames(java.util.Vector sessionNames)
Set the list of session names associated with this SessionBroker |
void |
setShouldLogMessages(boolean shouldLog)
PUBLIC: Log all messages including executed SQL commands to the default output. |
| Methods inherited from class oracle.toplink.publicinterface.DatabaseSession |
None |
| Methods inherited from class oracle.toplink.publicinterface.Session |
None |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.toplink.sessions.DatabaseSession |
beginTransaction, commitTransaction, deleteAllObjects,
deleteAllObjects, deleteObject, insertObject,
isInTransaction, refreshAndLockObject, refreshAndLockObject, rollbackTransaction, setExternalTransactionController,
setLogin, updateObject, writeObject |
| Constructor Detail |
public SessionBroker()
| Method Detail |
public SessionBroker acquireClientSessionBroker()
public java.util.Vector getSessionNames()
public void setSessionNames(java.util.Vector sessionNames)
java.util.Vector - public UnitOfWork acquireUnitOfWork()
acquireUnitOfWork in class Sessionpublic void addDescriptor(Descriptor descriptor)
addDescriptor in class DatabaseSessionoracle.toplink.publicinterface.DatabaseSession
public void addDescriptors(java.util.Vector descriptors)
throws ValidationException
addDescriptors in class DatabaseSession
public void addDescriptors(Project project)
throws ValidationException
addDescriptors in class DatabaseSessionpublic boolean containsQuery(java.lang.String queryName)
containsQuery in class Sessionpublic DatabaseQuery getQuery(java.lang.String name)
getQuery in class Sessionpublic void initializeAllIdentityMaps()
initializeAllIdentityMaps in class Sessionpublic void initializeIdentityMaps()
initializeIdentityMaps in class Sessionpublic boolean isClientSessionBroker()
public boolean isConnected()
isConnected in class Sessionpublic boolean isServerSessionBroker()
public void login()
throws DatabaseException
login in class DatabaseSessionoracle.toplink.publicinterface.DatabaseSession
public void login(java.lang.String userName,
java.lang.String password)
throws DatabaseException
login in class DatabaseSession
public void logout()
throws DatabaseException
logout in class DatabaseSessionTopLinkException - if a transaction is active, you must rollback any active transaction before logout.DatabaseException
- the database will also raise an error if their is an active transaction,
or a general error occurs.
public void registerSession(java.lang.String name,
Session session)
public void registerSession(java.lang.String name,
Session session)
public void releaseClientSessionBroker()
public void setIntegrityChecker(IntegrityChecker integrityChecker)
setIntegrityChecker in class Sessionpublic void setLog(java.io.Writer log)
setLog in class SessionSession.logMessages()public void setProfiler(SessionProfiler profiler)
setProfiler in class Sessionpublic void setShouldLogMessages(boolean shouldLog)
setShouldLogMessages in class Sessionoracle.toplink.publicinterface.Session
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||