Skip navigation links

Oracle TopLink Java API Reference
10g Release 3 (10.1.3.1)

B28219-01


oracle.toplink.publicinterface
Class Session

java.lang.Object
  extended byoracle.toplink.publicinterface.Session

All Implemented Interfaces:
java.lang.Cloneable, CommandProcessor, java.io.Serializable, Session

Deprecated. since OracleAS TopLink 10g (10.1.3). This class is replaced by Session, and oracle.toplink.internal.sessions.AbstractSession

public abstract class Session
extends java.lang.Object
implements Session, CommandProcessor, java.io.Serializable, java.lang.Cloneable

Implementation of oracle.toplink.sessions.Session The public interface should be used.

See Also:

Purpose: Define the interface and common protocol of a TopLink compliant session.

Description: The session is the primary interface into TopLink, the application should do all of its reading and writing of objects through the session. The session also manages transactions and units of work. Normally the session is passed and used by the application controler objects. Controler objects normally sit behind the GUI and perform the buiness processes required for the application, they should perform all explict database access and database access should be avoided from the domain object model. Do not use a globally accessable session instance, doing so does not allow for multiple sessions. Multiple sessions may required when performing things like data migration or multiple database access, as well the unit of work feature requires the usage of multiple session instances. Although session is abstract, any users of its subclasses should only cast the variables to Session to allow usage of any of its subclasses.

Responsibilities:

, DatabaseSession, Serialized Form

Field Summary

 

Fields inherited from interface oracle.toplink.remotecommand.CommandProcessor
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING

 

Constructor Summary
Session(Login login)
          Deprecated. PUBLIC: Create and return a new session.
Session(Project project)
          Deprecated. PUBLIC: Create and return a new session.

 

Method Summary
 UnitOfWork acquireUnitOfWork()
          Deprecated. PUBLIC: Return a unit of work for this session.
 void addAlias(java.lang.String alias, Descriptor descriptor)
          Deprecated. PUBLIC: Add an alias for the descriptor
 void addQuery(java.lang.String name, DatabaseQuery query)
          Deprecated. PUBLIC: Add the query to the session queries with the given name.
 void beginTransaction()
          Deprecated. PUBLIC: Begin a transaction on the database.
 void clearIntegrityChecker()
          Deprecated. PUBLIC: clear the integrityChecker.
 void clearProfile()
          Deprecated. PUBLIC: Clear the profiler, this will end the current profile opperation.
 void commitTransaction()
          Deprecated. PUBLIC: Commit the active database transaction.
 boolean compareObjectsDontMatch(java.lang.Object firstObject, java.lang.Object secondObject)
          Deprecated. TESTING: Return true if the object do not match.
 void config(java.lang.String message, java.lang.String category)
          Deprecated. PUBLIC: This method is called when a config level message needs to be logged.
 boolean containsObjectInIdentityMap(java.lang.Object domainObject)
          Deprecated.  
 boolean containsObjectInIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass)
          Deprecated.  
 boolean containsQuery(java.lang.String queryName)
          Deprecated. PUBLIC: Return true if the pre-defined query is defined on the session.
 java.lang.Object copyObject(java.lang.Object original)
          Deprecated. PUBLIC: Return a complete copy of the object.
 java.lang.Object copyObject(java.lang.Object original, ObjectCopyingPolicy policy)
          Deprecated. PUBLIC: Return a complete copy of the object.
 void deleteAllObjects(java.util.Collection domainObjects)
          Deprecated. PUBLIC: delete all of the objects and all of their privately owned parts in the database.
 void deleteAllObjects(java.util.Vector domainObjects)
          Deprecated. PUBLIC: delete all of the objects and all of their privately owned parts in the database.
 java.lang.Object deleteObject(java.lang.Object domainObject)
          Deprecated. PUBLIC: Delete the object and all of its privately owned parts from the database.
 boolean doesObjectExist(java.lang.Object object)
          Deprecated. PUBLIC: Return if the object exists on the database or not.
 void dontLogMessages()
          Deprecated. PUBLIC: Turn off logging
 int executeNonSelectingCall(Call call)
          Deprecated. PUBLIC: Execute the call on the database.
 void executeNonSelectingSQL(java.lang.String sqlString)
          Deprecated. PUBLIC: Execute the sql on the database.
 java.lang.Object executeQuery(DatabaseQuery query)
          Deprecated. PUBLIC: Execute the database query.
 java.lang.Object executeQuery(DatabaseQuery query, java.util.Vector argumentValues)
          Deprecated. PUBLIC: Return the results from exeucting the database query.
 java.lang.Object executeQuery(java.lang.String queryName)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass, java.lang.Object arg1)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass, java.lang.Object arg1, java.lang.Object arg2)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass, java.util.Vector argumentValues)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Object arg1)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Object arg1, java.lang.Object arg2)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.util.Vector argumentValues)
          Deprecated. PUBLIC: Execute the pre-defined query by name and return the result.
 java.util.Vector executeSelectingCall(Call call)
          Deprecated. PUBLIC: Execute the call on the database and return the result.
 java.util.Vector executeSQL(java.lang.String sqlString)
          Deprecated. PUBLIC: Execute the sql on the database and return the result.
 void fine(java.lang.String message, java.lang.String category)
          Deprecated. PUBLIC: This method is called when a fine level message needs to be logged.
 void finer(java.lang.String message, java.lang.String category)
          Deprecated. PUBLIC: This method is called when a finer level message needs to be logged.
 void finest(java.lang.String message, java.lang.String category)
          Deprecated. PUBLIC: This method is called when a finest level message needs to be logged.
 Session getActiveSession()
          Deprecated. PUBLIC: Return the active session for the current active external (JTS) transaction.
 UnitOfWork getActiveUnitOfWork()
          Deprecated. PUBLIC: Return the active unit of work for the current active external (JTS) transaction.
 java.util.Vector getAllFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, DatabaseRow translationRow)
          Deprecated.  
 java.util.Vector getAllFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, DatabaseRow translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy)
          Deprecated.  
 java.util.Vector getAllFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, DatabaseRow translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean shouldReturnInvalidatedObjects)
          Deprecated.  
 java.util.Vector getAllQueries()
          Deprecated. PUBLIC: Return the pre-defined queries in this session.
 AsOfClause getAsOfClause()
          Deprecated. ADVANCED: Answers the past time this session is as of.
 CacheSynchronizationManager getCacheSynchronizationManager()
          Deprecated. ADVANCED: Returns the Synchronization Policy for this session.
 ClassDescriptor getClassDescriptor(java.lang.Class theClass)
          Deprecated. ADVANCED: Return the descriptor specified for the class.
 ClassDescriptor getClassDescriptor(java.lang.Object domainObject)
          Deprecated. ADVANCED: Return the descriptor specified for the object's class.
 ClassDescriptor getClassDescriptorForAlias(java.lang.String alias)
          Deprecated. PUBLIC: Return the descriptor for the alias.
 CommandManager getCommandManager()
          Deprecated. PUBLIC: Return the CommandManager that allows this session to act as a CommandProcessor and receive or propagate commands from/to the TopLink cluster.
 Login getDatasourceLogin()
          Deprecated. PUBLIC: Return the login, the login holds any database connection information given.
 Descriptor getDescriptor(java.lang.Class theClass)
          Deprecated. ADVANCED: Return the descriptor specified for the class.
 Descriptor getDescriptor(java.lang.Object domainObject)
          Deprecated. ADVANCED: Return the descriptor specified for the object's class.
 Descriptor getDescriptorForAlias(java.lang.String alias)
          Deprecated. PUBLIC: Return the descriptor for the alias
 java.util.Map getDescriptors()
          Deprecated. ADVANCED: Return all registered descriptors.
 SessionEventManager getEventManager()
          Deprecated. PUBLIC: Return the event manager.
 ExceptionHandler getExceptionHandler()
          Deprecated. PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.
 ExternalTransactionController getExternalTransactionController()
          Deprecated. PUBLIC: Used for JTS integration.
 java.lang.Object getFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, DatabaseRow translationRow)
          Deprecated. Since 4.0.1
 java.lang.Object getFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, DatabaseRow translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy)
          Deprecated.  
 java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
          Deprecated.  
 java.lang.Object getFromIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass)
          Deprecated.  
 java.lang.Object getFromIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass, boolean shouldReturnInvalidatedObjects)
          Deprecated.  
 IdentityMapAccessor getIdentityMapAccessor()
          Deprecated. PUBLIC: The IdentityMapAccessor is the preferred way of accessing IdentityMap funcitons This will return an object which implements an interface which exposes all public IdentityMap functions.
 IntegrityChecker getIntegrityChecker()
          Deprecated. PUBLIC: Returns the integrityChecker.IntegrityChecker holds all the Descriptor Exceptions.
 java.io.Writer getLog()
          Deprecated. PUBLIC: Return the writer to which an accessor writes logged messages and SQL.
 DatabaseLogin getLogin()
          Deprecated. OBSOLETE: Return the login, the login holds any database connection information given.
 int getLogLevel()
          Deprecated. PUBLIC: Return the log level
 int getLogLevel(java.lang.String category)
          Deprecated. PUBLIC: Return the log level
 java.lang.String getName()
          Deprecated. PUBLIC: Return the name of the session.
 java.lang.Number getNextSequenceNumberValue(java.lang.Class domainClass)
          Deprecated. ADVANCED: Return the sequnce number from the database
 SessionProfiler getProfiler()
          Deprecated. PUBLIC: Return the profiler.
 Project getProject()
          Deprecated. PUBLIC: Return the project, the project holds configuartion information including the descriptors.
 java.util.Map getProperties()
          Deprecated. ADVANCED: Allow for user defined properties.
 java.lang.Object getProperty(java.lang.String name)
          Deprecated. ADVANCED: Returns the user defined property.
 java.util.Map getQueries()
          Deprecated. ADVANCED: Return all pre-defined queries.
 DatabaseQuery getQuery(java.lang.String name)
          Deprecated. PUBLIC: Return the query from the session pre-defined queries with the given name.
 DatabaseQuery getQuery(java.lang.String name, java.util.Vector arguments)
          Deprecated. PUBLIC: Return the query from the session pre-defined queries with the given name and argument types.
 SessionLog getSessionLog()
          Deprecated. PUBLIC: Return the session log to which an accessor logs messages and SQL.
 java.lang.Object getWriteLockValue(java.lang.Object domainObject)
          Deprecated.  
 java.lang.Object getWriteLockValue(java.util.Vector primaryKey, java.lang.Class theClass)
          Deprecated.  
 java.lang.Object handleException(java.lang.RuntimeException exception)
          Deprecated. PUBLIC: Allow any WARNING level exceptions that occur within TopLink to be logged and handled by the exception handler.
 java.lang.Object handleSevere(java.lang.RuntimeException exception)
          Deprecated. PUBLIC: Allow any SEVERE level exceptions that occur within TopLink to be logged and handled by the exception handler.
 boolean hasCacheSynchronizationManager()
          Deprecated. ADVANCED: Return true if a cache synchronisation manager exists.
 boolean hasDescriptor(java.lang.Class theClass)
          Deprecated. ADVANCED: Return true if a descriptor exists for the given class.
 boolean hasExceptionHandler()
          Deprecated. PUBLIC: Return if an exception handler is present.
 boolean hasExternalTransactionController()
          Deprecated. PUBLIC: Used for JTA integration.
 void info(java.lang.String message, java.lang.String category)
          Deprecated. PUBLIC: This method is called when a info level message needs to be logged.
 void initializeAllIdentityMaps()
          Deprecated.  
 void initializeIdentityMap(java.lang.Class theClass)
          Deprecated.  
 void initializeIdentityMaps()
          Deprecated.  
 java.lang.Object insertObject(java.lang.Object domainObject)
          Deprecated. PUBLIC: Insert the object and all of its privately owned parts into the database.
 boolean isClassReadOnly(java.lang.Class theClass)
          Deprecated. PUBLIC: Return if the class is defined as read-only.
 boolean isClientSession()
          Deprecated. PUBLIC: Return if this session is a client session.
 boolean isConnected()
          Deprecated. PUBLIC: Return if this session is connected to the database.
 boolean isDatabaseSession()
          Deprecated. PUBLIC: Return if this session is a database session.
 boolean isDistributedSession()
          Deprecated. PUBLIC: Return if this session is a distributed session.
 boolean isInProfile()
          Deprecated. PUBLIC: Return if a profiler is being used.
 boolean isInTransaction()
          Deprecated. PUBLIC: Return if the session is currently in the progress of a database transaction.
 boolean isRemoteSession()
          Deprecated. PUBLIC: Return if this session is remote.
 boolean isRemoteUnitOfWork()
          Deprecated. PUBLIC: Return if this session is a unit of work.
 boolean isServerSession()
          Deprecated. PUBLIC: Return if this session is a server session.
 boolean isSessionBroker()
          Deprecated. PUBLIC: Return if this session is a session broker.
 boolean isUnitOfWork()
          Deprecated. PUBLIC: Return if this session is a unit of work.
 java.util.Vector keyFromObject(java.lang.Object domainObject)
          Deprecated. ADVANCED: Extract and return the primary key from the object.
 void log(int level, java.lang.String message, java.lang.Object[] params, Accessor accessor)
          Deprecated. PUBLIC: Log a message with level, parameters and accessor that needs to be translated.
 void log(int level, java.lang.String message, java.lang.Object[] params, Accessor accessor, boolean shouldTranslate)
          Deprecated. PUBLIC: Log a message with level, parameters and accessor.
 void log(int level, java.lang.String category, java.lang.String message)
          Deprecated. PUBLIC: Log a message with level and category that needs to be translated.
 void log(int level, java.lang.String category, java.lang.String message, java.lang.Object param)
          Deprecated. PUBLIC: Log a message with level, category and a parameter that needs to be translated.
 void log(int level, java.lang.String category, java.lang.String message, java.lang.Object[] params)
          Deprecated. PUBLIC: Log a message with level, category and an array of parameters that needs to be translated.
 void log(int level, java.lang.String category, java.lang.String message, java.lang.Object[] params, Accessor accessor)
          Deprecated. PUBLIC: Log a message with level, category, parameters and accessor that needs to be translated.
 void log(int level, java.lang.String category, java.lang.String message, java.lang.Object[] params, Accessor accessor, boolean shouldTranslate)
          Deprecated. PUBLIC: Log a message with level, category, parameters and accessor.
 void log(int level, java.lang.String category, java.lang.String message, java.lang.Object param1, java.lang.Object param2)
          Deprecated. PUBLIC: Log a message with level, category and two parameters that needs to be translated.
 void log(int level, java.lang.String category, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)
          Deprecated. PUBLIC: Log a message with level, category and three parameters that needs to be translated.
 void log(SessionLogEntry entry)
          Deprecated. PUBLIC: Log the log entry.
 void log(SessionLogEntry entry)
          Deprecated. Replaced by log(oracle.toplink.logging.SessionLogEntry)
 void logDebug(java.lang.String message)
          Deprecated. Replaced by log(int level, String message, Object[] params, Accessor accessor, boolean shouldTranslate)
 void logDebug(java.lang.String message, java.lang.Object[] arguments)
          Deprecated. Replaced by log(int level, String category, String message, Object[] params)
 void logException(java.lang.Exception exception)
          Deprecated. Replaced by logThrowable(int level, String category, Throwable throwable)
 void logMessage(java.lang.String message)
          Deprecated. Log a untranslated message to the TopLink log at FINER level.
 void logMessage(java.lang.String message, java.lang.Object[] arguments)
          Deprecated. Replaced by log(int level, String category, String message, Object[] params)
 void logMessages()
          Deprecated. Replaced by setLogLevel(int level);
 void logThrowable(int level, java.lang.String category, java.lang.Throwable throwable)
          Deprecated. PUBLIC: Log a throwable with level and category.
 void printIdentityMap(java.lang.Class businessClass)
          Deprecated.  
 void printIdentityMaps()
          Deprecated.  
 java.lang.Object putInIdentityMap(java.lang.Object domainObject)
          Deprecated.  
 java.lang.Object putInIdentityMap(java.lang.Object domainObject, java.util.Vector key)
          Deprecated.  
 java.lang.Object putInIdentityMap(java.lang.Object domainObject, java.util.Vector key, java.lang.Object writeLockValue)
          Deprecated.  
 java.lang.Object putInIdentityMap(java.lang.Object domainObject, java.util.Vector key, java.lang.Object writeLockValue, long readTime)
          Deprecated.  
 java.util.Vector readAllObjects(java.lang.Class domainClass)
          Deprecated. PUBLIC: Read all of the instances of the class from the database.
 java.util.Vector readAllObjects(java.lang.Class referenceClass, Call aCall)
          Deprecated. PUBLIC: Read all the instances of the class from the database returned through execution the Call string.
 java.util.Vector readAllObjects(java.lang.Class domainClass, Expression expression)
          Deprecated. PUBLIC: Read all of the instances of the class from the database matching the given expression.
 java.util.Vector readAllObjects(java.lang.Class domainClass, java.lang.String sqlString)
          Deprecated. PUBLIC: Read all of the instances of the class from the database return through execution the SQL string.
 java.lang.Object readObject(java.lang.Class domainClass)
          Deprecated. PUBLIC: Read the first instance of the class from the database.
 java.lang.Object readObject(java.lang.Class domainClass, Call aCall)
          Deprecated. PUBLIC: Read the first instance of the class from the database returned through execution the Call string.
 java.lang.Object readObject(java.lang.Class domainClass, Expression expression)
          Deprecated. PUBLIC: Read the first instance of the class from the database matching the given expression.
 java.lang.Object readObject(java.lang.Class domainClass, java.lang.String sqlString)
          Deprecated. PUBLIC: Read the first instance of the class from the database return through execution the SQL string.
 java.lang.Object readObject(java.lang.Object object)
          Deprecated. PUBLIC: Use the example object to consruct a read object query by the objects primary key.
 java.lang.Object refreshAndLockObject(java.lang.Object object)
          Deprecated. PUBLIC: Refresh the attributes of the object and of all of its private parts from the database.
 java.lang.Object refreshAndLockObject(java.lang.Object object, short lockMode)
          Deprecated. PUBLIC: Refresh the attributes of the object and of all of its private parts from the database.
 java.lang.Object refreshObject(java.lang.Object object)
          Deprecated. PUBLIC: Refresh the attributes of the object and of all of its private parts from the database.
 void release()
          Deprecated. PUBLIC: Release the session.
 void removeFromIdentityMap(java.lang.Object domainObject)
          Deprecated.  
 void removeFromIdentityMap(java.util.Vector key, java.lang.Class theClass)
          Deprecated.  
 void removeProperty(java.lang.String property)
          Deprecated. PUBLIC: Remove the user defined property.
 void removeQuery(java.lang.String queryName)
          Deprecated. PUBLIC: Remove all queries with the given queryName regardless of the argument types.
 void removeQuery(java.lang.String queryName, java.util.Vector argumentTypes)
          Deprecated. PUBLIC: Remove the specific query with the given queryName and argumentTypes.
 void rollbackTransaction()
          Deprecated. PUBLIC: Rollback the active database transaction.
 void setCacheSynchronizationManager(CacheSynchronizationManager cacheSynchronizationManager)
          Deprecated. ADVANCED: Sets the cache synchronization manager for this session.
 void setCommandManager(CommandManager mgr)
          Deprecated. ADVANCED: Set the CommandManager that allows this session to act as a CommandProcessor and receive or propagate commands from/to the TopLink cluster.
 void setDatasourceLogin(Login login)
          Deprecated. PUBLIC: Set the login.
 void setExceptionHandler(ExceptionHandler exceptionHandler)
          Deprecated. PUBLIC: Set the exceptionHandler.
 void setExternalTransactionController(ExternalTransactionController externalTransactionController)
          Deprecated. Used for JTS integration internally by ServerPlatform.
 void setIntegrityChecker(IntegrityChecker integrityChecker)
          Deprecated. PUBLIC: set the integrityChecker.
 void setIsInProfile(boolean inProfile)
          Deprecated. PUBLIC: Allow for user deactive a profiler
 void setLog(java.io.Writer log)
          Deprecated. PUBLIC: Set the writer to which an accessor writes logged messages and SQL.
 void setLogin(DatabaseLogin login)
          Deprecated. PUBLIC: Set the login.
 void setLogin(Login login)
          Deprecated. PUBLIC: Set the login.
 void setLogLevel(int level)
          Deprecated. PUBLIC: Set the log level
 void setName(java.lang.String name)
          Deprecated. PUBLIC: Set the name of the session.
 void setProfiler(SessionProfiler profiler)
          Deprecated. PUBLIC: Set the profiler for the session.
 void setProperty(java.lang.String propertyName, java.lang.Object propertyValue)
          Deprecated. PUBLIC: Allow for user defined properties.
 void setSessionLog(SessionLog sessionLog)
          Deprecated. PUBLIC: Set the session log to which an accessor logs messages and SQL.
 void setSessionLog(SessionLog sessionLog)
          Deprecated.  
 void setShouldLogMessages(boolean shouldLogMessages)
          Deprecated.  
 void setShouldPropagateChanges(boolean choice)
          Deprecated. ADVANCED: Set whether changes should be propagated to other sessions or applications in a TopLink cluster through the Remote Command Manager mechanism.
 void setUseOldCommit(boolean oldCommit)
          Deprecated.  
 void severe(java.lang.String message, java.lang.String category)
          Deprecated. PUBLIC: This method is called when a severe level message needs to be logged.
 boolean shouldLog(int Level, java.lang.String category)
          Deprecated. PUBLIC: Check if a message of the given level would actually be logged.
 boolean shouldLogMessages()
          Deprecated. PUBLIC: Return if logging is enabled (false if log level is OFF)
 boolean shouldPropagateChanges()
          Deprecated. PUBLIC: Return whether changes should be propagated to other sessions or applications in a TopLink cluster through the Remote Command Manager mechanism.
 java.lang.String toString()
          Deprecated. Print the connection status with the session.
 java.lang.Object updateObject(java.lang.Object domainObject)
          Deprecated. PUBLIC: Update the object and all of its privately owned parts in the database.
 void updateWriteLockValue(java.lang.Object domainObject, java.lang.Object writeLockValue)
          Deprecated.  
 void updateWriteLockValue(java.util.Vector primaryKey, java.lang.Class theClass, java.lang.Object writeLockValue)
          Deprecated.  
 boolean usesExternalTransactionController()
          Deprecated.  
 boolean usesOldCommit()
          Deprecated. ADVANCED: Customers may experience errors with older code, that uses query events on commit, and 9.0.4 of TopLink.
 void validateCache()
          Deprecated. ADVANCED: This can be used to help debugging an object identity problem.
 boolean verifyDelete(java.lang.Object domainObject)
          Deprecated. TESTING: This is used by testing code to ensure that a deletion was successful.
 void warning(java.lang.String message, java.lang.String category)
          Deprecated. PUBLIC: This method is called when a warning level message needs to be logged.
 java.lang.Object writeObject(java.lang.Object domainObject)
          Deprecated. PUBLIC: Write the object and all of its privately owned parts in the database.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

Session

public Session(Login login)
Deprecated. 
PUBLIC: Create and return a new session. By giving the login information on creation this allows the session to initialize itself to the platform given in the login. This constructor does not return a connected session. To connect the session to the database login() must be sent to it. The login(userName, password) method may also be used to connect the session, this allows for the user name and password to be given at login but for the other database information to be provided when the session is created.

Session

public Session(Project project)
Deprecated. 
PUBLIC: Create and return a new session. This constructor does not return a connected session. To connect the session to the database login() must be sent to it. The login(userName, password) method may also be used to connect the session, this allows for the user name and password to be given at login but for the other database information to be provided when the session is created.

Method Detail

acquireUnitOfWork

public UnitOfWork acquireUnitOfWork()
Deprecated. 
PUBLIC: Return a unit of work for this session. The unit of work is an object level transaction that allows a group of changes to be applied as a unit.
Specified by:
acquireUnitOfWork in interface Session
See Also:
UnitOfWork

addAlias

public void addAlias(java.lang.String alias,
                     Descriptor descriptor)
Deprecated. 
PUBLIC: Add an alias for the descriptor

addQuery

public void addQuery(java.lang.String name,
                     DatabaseQuery query)
Deprecated. 
PUBLIC: Add the query to the session queries with the given name. This allows for common queries to be pre-defined, reused and executed by name.
Specified by:
addQuery in interface Session

beginTransaction

public void beginTransaction()
                      throws DatabaseException,
                             ConcurrencyException
Deprecated. 
PUBLIC: Begin a transaction on the database. This allows a group of database modification to be commited or rolledback as a unit. All writes/deletes will be sent to the database be will not be visible to other users until commit. Although databases do not allow nested transaction, TopLink supports nesting through only committing to the database on the outer commit.
Throws:
DatabaseException - if the database connection is lost or the begin is rejected.
ConcurrencyException - if this session's transaction is aquired by another thread and a timeout occurs.
See Also:
isInTransaction()

clearIntegrityChecker

public void clearIntegrityChecker()
Deprecated. 
PUBLIC: clear the integrityChecker. IntegrityChecker holds all the Descriptor Exceptions.
Specified by:
clearIntegrityChecker in interface Session

clearProfile

public void clearProfile()
Deprecated. 
PUBLIC: Clear the profiler, this will end the current profile opperation.
Specified by:
clearProfile in interface Session

commitTransaction

public void commitTransaction()
                       throws DatabaseException,
                              ConcurrencyException
Deprecated. 
PUBLIC: Commit the active database transaction. This allows a group of database modification to be commited or rolledback as a unit. All writes/deletes will be sent to the database be will not be visible to other users until commit. Although databases do not allow nested transaction, TopLink supports nesting through only committing to the database on the outer commit.
Throws:
DatabaseException - most databases validate changes as they are done, normally errors do not occur on commit unless the disk fails or the connection is lost.
ConcurrencyException - if this session is not within a transaction.

compareObjectsDontMatch

public boolean compareObjectsDontMatch(java.lang.Object firstObject,
                                       java.lang.Object secondObject)
Deprecated. 
TESTING: Return true if the object do not match. This checks the objects attributes and their private parts.

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.lang.Object domainObject)
Deprecated.  
ADVANCED: Return if their is an object for the primary key.
Specified by:
containsObjectInIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
Deprecated.  
ADVANCED: Return if their is an object for the primary key.
Specified by:
containsObjectInIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

containsQuery

public boolean containsQuery(java.lang.String queryName)
Deprecated. 
PUBLIC: Return true if the pre-defined query is defined on the session.
Specified by:
containsQuery in interface Session
See Also:
Session.getIdentityMapAccessor(), IdentityMapAccessor

copyObject

public java.lang.Object copyObject(java.lang.Object original)
Deprecated. 
PUBLIC: Return a complete copy of the object. This can be used to obtain a scatch copy of an object, or for templatizing an existing object into another new object. The object and all of its privately owned parts will be copied, the object's primary key will be reset to null.
Specified by:
copyObject in interface Session
See Also:
copyObject(Object, ObjectCopyingPolicy)

copyObject

public java.lang.Object copyObject(java.lang.Object original,
                                   ObjectCopyingPolicy policy)
Deprecated. 
PUBLIC: Return a complete copy of the object. This can be used to obtain a scatch copy of an object, or for templatizing an existing object into another new object. The object copying policy allow for the depth, and reseting of the primary key to null, to be specified.
Specified by:
copyObject in interface Session

deleteAllObjects

public void deleteAllObjects(java.util.Collection domainObjects)
                      throws DatabaseException,
                             OptimisticLockException
Deprecated. 
PUBLIC: delete all of the objects and all of their privately owned parts in the database. The allows for a group of objects to be deleted as a unit. The objects will be deleted through a single transactions.
Throws:
DatabaseException - if an error occurs on the database, these include constraint violations, security violations and general database erros.
OptimisticLockException - if the object's descriptor is using optimistic locking and the object has been updated or deleted by another user since it was last read.

deleteAllObjects

public void deleteAllObjects(java.util.Vector domainObjects)
                      throws DatabaseException,
                             OptimisticLockException
Deprecated. 
PUBLIC: delete all of the objects and all of their privately owned parts in the database. The allows for a group of objects to be deleted as a unit. The objects will be deleted through a single transactions.
Throws:
DatabaseException - if an error occurs on the database, these include constraint violations, security violations and general database erros.
OptimisticLockException - if the object's descriptor is using optimistic locking and the object has been updated or deleted by another user since it was last read.

deleteObject

public java.lang.Object deleteObject(java.lang.Object domainObject)
                              throws DatabaseException,
                                     OptimisticLockException
Deprecated. 
PUBLIC: Delete the object and all of its privately owned parts from the database. The delete operation can be customized through using a delete query.
Throws:
DatabaseException - if an error occurs on the database, these include constraint violations, security violations and general database erros. An database error is not raised if the object is already deleted or no rows are effected.
OptimisticLockException - if the object's descriptor is using optimistic locking and the object has been updated or deleted by another user since it was last read.
See Also:
DeleteObjectQuery

doesObjectExist

public boolean doesObjectExist(java.lang.Object object)
                        throws DatabaseException
Deprecated. 
PUBLIC: Return if the object exists on the database or not. This always checks existence on the database.
Specified by:
doesObjectExist in interface Session
Throws:
DatabaseException

dontLogMessages

public void dontLogMessages()
Deprecated. 
PUBLIC: Turn off logging
Specified by:
dontLogMessages in interface Session

executeNonSelectingCall

public int executeNonSelectingCall(Call call)
                            throws DatabaseException
Deprecated. 
PUBLIC: Execute the call on the database. The row count is returned. The call can be a stored procedure call, SQL call or other type of call.

Example:

session.executeNonSelectingCall(new SQLCall("Delete from Employee");

Specified by:
executeNonSelectingCall in interface Session
Throws:
DatabaseException
See Also:
executeSelectingCall(Call)

executeNonSelectingSQL

public void executeNonSelectingSQL(java.lang.String sqlString)
                            throws DatabaseException
Deprecated. 
PUBLIC: Execute the sql on the database.

Example:

session.executeNonSelectingSQL("Delete from Employee");

Specified by:
executeNonSelectingSQL in interface Session
Throws:
DatabaseException
See Also:
Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass,
                                     java.lang.Object arg1)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass,
                                     java.lang.Object arg1,
                                     java.lang.Object arg2)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass,
                                     java.lang.Object arg1,
                                     java.lang.Object arg2,
                                     java.lang.Object arg3)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass,
                                     java.util.Vector argumentValues)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Object arg1)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Object arg1,
                                     java.lang.Object arg2)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Object arg1,
                                     java.lang.Object arg2,
                                     java.lang.Object arg3)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.util.Vector argumentValues)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(DatabaseQuery query)
                              throws DatabaseException
Deprecated. 
PUBLIC: Execute the database query. A query is a database operation such as reading or writting. The query allows for the operation to be customized for such things as, performance, depth, caching, etc.
Specified by:
executeQuery in interface Session
Throws:
DatabaseException
See Also:
DatabaseQuery

executeQuery

public java.lang.Object executeQuery(DatabaseQuery query,
                                     java.util.Vector argumentValues)
                              throws DatabaseException
Deprecated. 
PUBLIC: Return the results from exeucting the database query. the arguments are passed in as a vector
Specified by:
executeQuery in interface Session
Throws:
DatabaseException

executeSelectingCall

public java.util.Vector executeSelectingCall(Call call)
                                      throws DatabaseException
Deprecated. 
PUBLIC: Execute the call on the database and return the result. The call must return a value, if no value is return executeNonSelectCall must be used. The call can be a stored procedure call, SQL call or other type of call. A vector of database rows is returned, database row implements Java 2 Map which should be used to access the data.

Example:

session.executeSelectingCall(new SQLCall("Select * from Employee");

Specified by:
executeSelectingCall in interface Session
Throws:
DatabaseException
See Also:
executeNonSelectingCall(Call)

executeSQL

public java.util.Vector executeSQL(java.lang.String sqlString)
                            throws DatabaseException
Deprecated. 
PUBLIC: Execute the sql on the database and return the result. It must return a value, if no value is return executeNonSelectingSQL must be used. A vector of database rows is returned, database row implements Java 2 Map which should be used to access the data. Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.

Example:

session.executeSelectingCall("Select * from Employee");

Specified by:
executeSQL in interface Session
Throws:
DatabaseException
See Also:
executeSelectingCall(Call)

getActiveSession

public Session getActiveSession()
Deprecated. 
PUBLIC: Return the active session for the current active external (JTS) transaction. This should only be used with JTS and will return the session if no external transaction exists.
Specified by:
getActiveSession in interface Session

getActiveUnitOfWork

public UnitOfWork getActiveUnitOfWork()
Deprecated. 
PUBLIC: Return the active unit of work for the current active external (JTS) transaction. This should only be used with JTS and will return null if no external transaction exists.
Specified by:
getActiveUnitOfWork in interface Session

getAllFromIdentityMap

public java.util.Vector getAllFromIdentityMap(Expression selectionCriteria,
                                              java.lang.Class theClass,
                                              DatabaseRow translationRow)
                                       throws QueryException
Deprecated.  
ADVANCED: Query the cache in-memory. If the expression is too complex an exception will be thrown.
Specified by:
getAllFromIdentityMap in interface Session
Throws:
QueryException
See Also:
Session.getIdentityMapAccessor(), IdentityMapAccessor

getAllFromIdentityMap

public java.util.Vector getAllFromIdentityMap(Expression selectionCriteria,
                                              java.lang.Class theClass,
                                              DatabaseRow translationRow,
                                              InMemoryQueryIndirectionPolicy valueHolderPolicy,
                                              boolean shouldReturnInvalidatedObjects)
                                       throws QueryException
Deprecated.  
ADVANCED: Query the cache in-memory. If the expression is too complex an exception will be thrown. Only return objects that are invalid in the cache if specified.
Throws:
QueryException
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

getAllFromIdentityMap

public java.util.Vector getAllFromIdentityMap(Expression selectionCriteria,
                                              java.lang.Class theClass,
                                              DatabaseRow translationRow,
                                              InMemoryQueryIndirectionPolicy valueHolderPolicy)
                                       throws QueryException
Deprecated.  
ADVANCED: Query the cache in-memory. If the expression is too complex an exception will be thrown.
Specified by:
getAllFromIdentityMap in interface Session
Throws:
QueryException
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

getAsOfClause

public AsOfClause getAsOfClause()
Deprecated. 
ADVANCED: Answers the past time this session is as of. Indicates whether or not this is a special historical session where all objects are read relative to a particular point in time.
Specified by:
getAsOfClause in interface Session
Returns:
An immutable object representation of the past time. null if no clause set, or this a regular session.
See Also:
acquireHistoricalSession(oracle.toplink.history.AsOfClause)

getCacheSynchronizationManager

public CacheSynchronizationManager getCacheSynchronizationManager()
Deprecated. 
ADVANCED: Returns the Synchronization Policy for this session.
Specified by:
getCacheSynchronizationManager in interface Session

getClassDescriptor

public ClassDescriptor getClassDescriptor(java.lang.Class theClass)
Deprecated. 
ADVANCED: Return the descriptor specified for the class. If the class does not have a descriptor but implements an interface that is also implemented by one of the classes stored in the hashtable, that descriptor will be stored under the new class.
Specified by:
getClassDescriptor in interface Session

getClassDescriptor

public ClassDescriptor getClassDescriptor(java.lang.Object domainObject)
Deprecated. 
ADVANCED: Return the descriptor specified for the object's class.
Specified by:
getClassDescriptor in interface Session

getClassDescriptorForAlias

public ClassDescriptor getClassDescriptorForAlias(java.lang.String alias)
Deprecated. 
PUBLIC: Return the descriptor for the alias. UnitOfWork delegates this to the parent
Specified by:
getClassDescriptorForAlias in interface Session

getDescriptor

public Descriptor getDescriptor(java.lang.Class theClass)
Deprecated. 
ADVANCED: Return the descriptor specified for the class. If the class does not have a descriptor but implements an interface that is also implemented by one of the classes stored in the hashtable, that descriptor will be stored under the new class.
Specified by:
getDescriptor in interface Session

getDescriptor

public Descriptor getDescriptor(java.lang.Object domainObject)
Deprecated. 
ADVANCED: Return the descriptor specified for the object's class.
Specified by:
getDescriptor in interface Session

getDescriptorForAlias

public Descriptor getDescriptorForAlias(java.lang.String alias)
Deprecated. 
PUBLIC: Return the descriptor for the alias
Specified by:
getDescriptorForAlias in interface Session

getDescriptors

public java.util.Map getDescriptors()
Deprecated. 
ADVANCED: Return all registered descriptors.
Specified by:
getDescriptors in interface Session

getEventManager

public SessionEventManager getEventManager()
Deprecated. 
PUBLIC: Return the event manager. The event manager can be used to register for various session events.
Specified by:
getEventManager in interface Session

getExceptionHandler

public ExceptionHandler getExceptionHandler()
Deprecated. 
PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.
Specified by:
getExceptionHandler in interface Session

getExternalTransactionController

public ExternalTransactionController getExternalTransactionController()
Deprecated. 
PUBLIC: Used for JTS integration. If your application requires to have JTS control transactions instead of TopLink an external transaction controler must be specified. TopLink provides JTS controlers for several JTS implementations including JTS 1.0, Weblogic 5.1 and WebSphere 3.0.
Specified by:
getExternalTransactionController in interface Session
See Also:
JTATransactionController

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
Deprecated.  
ADVANCED: Return the object from the identity with primary and class of the given object.
Specified by:
getFromIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
Deprecated.  
ADVANCED: Return the object from the identity with the primary and class.
Specified by:
getFromIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass,
                                           boolean shouldReturnInvalidatedObjects)
Deprecated.  
ADVANCED: Return the object from the identity with the primary and class. Only return Invalidated objects if requested.
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

getFromIdentityMap

public java.lang.Object getFromIdentityMap(Expression selectionCriteria,
                                           java.lang.Class theClass,
                                           DatabaseRow translationRow)
                                    throws QueryException
Deprecated. Since 4.0.1
ADVANCED: Query the cache in-memory. If the object is not found null is returned. If the expression is too complex an exception will be thrown.
Specified by:
getFromIdentityMap in interface Session
Throws:
QueryException
See Also:
Session.getIdentityMapAccessor(), IdentityMapAccessor

getFromIdentityMap

public java.lang.Object getFromIdentityMap(Expression selectionCriteria,
                                           java.lang.Class theClass,
                                           DatabaseRow translationRow,
                                           InMemoryQueryIndirectionPolicy valueHolderPolicy)
                                    throws QueryException
Deprecated.  
ADVANCED: Query the cache in-memory. If the object is not found null is returned. If the expression is too complex an exception will be thrown.
Specified by:
getFromIdentityMap in interface Session
Throws:
QueryException
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

getIdentityMapAccessor

public IdentityMapAccessor getIdentityMapAccessor()
Deprecated. 
PUBLIC: The IdentityMapAccessor is the preferred way of accessing IdentityMap funcitons This will return an object which implements an interface which exposes all public IdentityMap functions.
Specified by:
getIdentityMapAccessor in interface Session

getIntegrityChecker

public IntegrityChecker getIntegrityChecker()
Deprecated. 
PUBLIC: Returns the integrityChecker.IntegrityChecker holds all the Descriptor Exceptions.
Specified by:
getIntegrityChecker in interface Session

getLog

public java.io.Writer getLog()
Deprecated. 
PUBLIC: Return the writer to which an accessor writes logged messages and SQL. If not set, this reference defaults to a writer on System.out. To enable logging, logMessages must be turned on.
Specified by:
getLog in interface Session
See Also:
logMessages()

getLogin

public DatabaseLogin getLogin()
Deprecated. 
OBSOLETE: Return the login, the login holds any database connection information given. This has been replaced by getDatasourceLogin to make use of the Login interface to support non-relational datasources, if DatabaseLogin API is required it will need to be cast.
Specified by:
getLogin in interface Session

getDatasourceLogin

public Login getDatasourceLogin()
Deprecated. 
PUBLIC: Return the login, the login holds any database connection information given. This return the Login interface and may need to be cast to the datasource specific implementation.
Specified by:
getDatasourceLogin in interface Session

getName

public java.lang.String getName()
Deprecated. 
PUBLIC: Return the name of the session. This is used with the session broker, or to give the session a more meaningful name.
Specified by:
getName in interface Session

getNextSequenceNumberValue

public java.lang.Number getNextSequenceNumberValue(java.lang.Class domainClass)
Deprecated. 
ADVANCED: Return the sequnce number from the database
Specified by:
getNextSequenceNumberValue in interface Session

getProfiler

public SessionProfiler getProfiler()
Deprecated. 
PUBLIC: Return the profiler. The profiler is a tool that can be used to determine performance bottlenecks. The profiler can be queries to print summaries and configure for logging purposes.
Specified by:
getProfiler in interface Session

getProject

public Project getProject()
Deprecated. 
PUBLIC: Return the project, the project holds configuartion information including the descriptors.
Specified by:
getProject in interface Session

getProperties

public java.util.Map getProperties()
Deprecated. 
ADVANCED: Allow for user defined properties.
Specified by:
getProperties in interface Session

getProperty

public java.lang.Object getProperty(java.lang.String name)
Deprecated. 
ADVANCED: Returns the user defined property.
Specified by:
getProperty in interface Session

getQueries

public java.util.Map getQueries()
Deprecated. 
ADVANCED: Return all pre-defined queries.
Specified by:
getQueries in interface Session
See Also:
getAllQueries()

getAllQueries

public java.util.Vector getAllQueries()
Deprecated. 
PUBLIC: Return the pre-defined queries in this session. A single vector containing all the queries is returned.
See Also:
getQueries()

getQuery

public DatabaseQuery getQuery(java.lang.String name)
Deprecated. 
PUBLIC: Return the query from the session pre-defined queries with the given name. This allows for common queries to be pre-defined, reused and executed by name.
Specified by:
getQuery in interface Session

getQuery

public DatabaseQuery getQuery(java.lang.String name,
                              java.util.Vector arguments)
Deprecated. 
PUBLIC: Return the query from the session pre-defined queries with the given name and argument types. This allows for common queries to be pre-defined, reused and executed by name. This method should be used if the Session has multiple queries with the same name but different arguments.
Specified by:
getQuery in interface Session
See Also:
getQuery(String)

getSessionLog

public SessionLog getSessionLog()
Deprecated. 
PUBLIC: Return the session log to which an accessor logs messages and SQL. If not set, this will default to a session log on a writer on System.out. To enable logging, logMessages must be turned on.
Specified by:
getSessionLog in interface Session
See Also:
logMessages()

getWriteLockValue

public java.lang.Object getWriteLockValue(java.lang.Object domainObject)
Deprecated.  
ADVANCED: Extract the write lock value from the identity map.
Specified by:
getWriteLockValue in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

getWriteLockValue

public java.lang.Object getWriteLockValue(java.util.Vector primaryKey,
                                          java.lang.Class theClass)
Deprecated.  
ADVANCED: Extract the write lock value from the identity map.
Specified by:
getWriteLockValue in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

handleException

public java.lang.Object handleException(java.lang.RuntimeException exception)
                                 throws java.lang.RuntimeException
Deprecated. 
PUBLIC: Allow any WARNING level exceptions that occur within TopLink to be logged and handled by the exception handler.
Specified by:
handleException in interface Session
Throws:
java.lang.RuntimeException

hasCacheSynchronizationManager

public boolean hasCacheSynchronizationManager()
Deprecated. 
ADVANCED: Return true if a cache synchronisation manager exists.
Specified by:
hasCacheSynchronizationManager in interface Session

hasDescriptor

public boolean hasDescriptor(java.lang.Class theClass)
Deprecated. 
ADVANCED: Return true if a descriptor exists for the given class.
Specified by:
hasDescriptor in interface Session

hasExceptionHandler

public boolean hasExceptionHandler()
Deprecated. 
PUBLIC: Return if an exception handler is present.
Specified by:
hasExceptionHandler in interface Session

hasExternalTransactionController

public boolean hasExternalTransactionController()
Deprecated. 
PUBLIC: Used for JTA integration. If your application requires to have JTA control transactions instead of TopLink an external transaction controler must be specified. TopLink provides JTA controlers for JTA 1.0 and application servers.
Specified by:
hasExternalTransactionController in interface Session
See Also:
JTATransactionController

initializeAllIdentityMaps

public void initializeAllIdentityMaps()
Deprecated.  
PUBLIC: Reset the entire object cache.

NOTE: be careful using this method. This method blows away both this session's and its parents caches, this includes the server cache or any other cache. This throws away any objects that have been read in. Extream caution should be used before doing this because object identity will no longer be maintained for any objects currently read in. This should only be called if the application knows that it no longer has references to object held in the cache.

Specified by:
initializeAllIdentityMaps in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

initializeIdentityMap

public void initializeIdentityMap(java.lang.Class theClass)
Deprecated.  
PUBLIC: Reset the identity map for only the instances of the class. For inheritance the user must make sure that they only use the root class. Caution must be used in doing this to ensure that the objects within the identity map are not referenced from other objects of other classes or from the application.
Specified by:
initializeIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

initializeIdentityMaps

public void initializeIdentityMaps()
Deprecated.  
PUBLIC: Reset the entire local object cache. This throws away any objects that have been read in. Extream caution should be used before doing this because object identity will no longer be maintained for any objects currently read in. This should only be called if the application knows that it no longer has references to object held in the cache.
Specified by:
initializeIdentityMaps in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

insertObject

public java.lang.Object insertObject(java.lang.Object domainObject)
                              throws DatabaseException
Deprecated. 
PUBLIC: Insert the object and all of its privately owned parts into the database. Insert should only be used if the application knows that the object is new, otherwise writeObject should be used. The insert operation can be customized through using an insert query.
Throws:
DatabaseException - if an error occurs on the database, these include constraint violations, security violations and general database erros.
See Also:
InsertObjectQuery, writeObject(Object)

isClassReadOnly

public boolean isClassReadOnly(java.lang.Class theClass)
Deprecated. 
PUBLIC: Return if the class is defined as read-only.

isClientSession

public boolean isClientSession()
Deprecated. 
PUBLIC: Return if this session is a client session.
Specified by:
isClientSession in interface Session

isConnected

public boolean isConnected()
Deprecated. 
PUBLIC: Return if this session is connected to the database.
Specified by:
isConnected in interface Session

isDatabaseSession

public boolean isDatabaseSession()
Deprecated. 
PUBLIC: Return if this session is a database session.
Specified by:
isDatabaseSession in interface Session

isDistributedSession

public boolean isDistributedSession()
Deprecated. 
PUBLIC: Return if this session is a distributed session.
Specified by:
isDistributedSession in interface Session

isInProfile

public boolean isInProfile()
Deprecated. 
PUBLIC: Return if a profiler is being used.
Specified by:
isInProfile in interface Session

setIsInProfile

public void setIsInProfile(boolean inProfile)
Deprecated. 
PUBLIC: Allow for user deactive a profiler

isInTransaction

public boolean isInTransaction()
Deprecated. 
PUBLIC: Return if the session is currently in the progress of a database transaction. Because nested transactions are allowed check if the transaction mutex has been aquired.

isRemoteSession

public boolean isRemoteSession()
Deprecated. 
PUBLIC: Return if this session is remote.
Specified by:
isRemoteSession in interface Session

isRemoteUnitOfWork

public boolean isRemoteUnitOfWork()
Deprecated. 
PUBLIC: Return if this session is a unit of work.
Specified by:
isRemoteUnitOfWork in interface Session

isServerSession

public boolean isServerSession()
Deprecated. 
PUBLIC: Return if this session is a server session.
Specified by:
isServerSession in interface Session

isSessionBroker

public boolean isSessionBroker()
Deprecated. 
PUBLIC: Return if this session is a session broker.
Specified by:
isSessionBroker in interface Session

isUnitOfWork

public boolean isUnitOfWork()
Deprecated. 
PUBLIC: Return if this session is a unit of work.
Specified by:
isUnitOfWork in interface Session

keyFromObject

public java.util.Vector keyFromObject(java.lang.Object domainObject)
                               throws ValidationException
Deprecated. 
ADVANCED: Extract and return the primary key from the object.
Specified by:
keyFromObject in interface Session
Throws:
ValidationException

log

public void log(SessionLogEntry entry)
Deprecated. 
PUBLIC: Log the log entry.
Specified by:
log in interface Session

log

public void log(SessionLogEntry entry)
Deprecated. Replaced by log(oracle.toplink.logging.SessionLogEntry)
OBSOLETE:
Specified by:
log in interface Session
See Also:
log(oracle.toplink.logging.SessionLogEntry)

logDebug

public void logDebug(java.lang.String message,
                     java.lang.Object[] arguments)
Deprecated. Replaced by log(int level, String category, String message, Object[] params)
OBSOLETE:
Specified by:
logDebug in interface Session
See Also:
log(int level, String category, String message, Object[] params)

logDebug

public void logDebug(java.lang.String message)
Deprecated. Replaced by log(int level, String message, Object[] params, Accessor accessor, boolean shouldTranslate)
OBSOLETE:
Specified by:
logDebug in interface Session
See Also:
log(int, String, String)

logException

public void logException(java.lang.Exception exception)
Deprecated. Replaced by logThrowable(int level, String category, Throwable throwable)
OBSOLETE:
Specified by:
logException in interface Session
See Also:
logThrowable(int level, String category, Throwable throwable)

logMessage

public void logMessage(java.lang.String message,
                       java.lang.Object[] arguments)
Deprecated. Replaced by log(int level, String category, String message, Object[] params)
OBSOLETE:
Specified by:
logMessage in interface Session
See Also:
log(int level, String category, String message, Object[] params)

logMessage

public void logMessage(java.lang.String message)
Deprecated. 
Log a untranslated message to the TopLink log at FINER level.
Specified by:
logMessage in interface Session

logMessages

public void logMessages()
Deprecated. Replaced by setLogLevel(int level);
OBSOLETE:
Specified by:
logMessages in interface Session
See Also:
setLogLevel(int)

printIdentityMap

public void printIdentityMap(java.lang.Class businessClass)
Deprecated.  
PUBLIC: Used to print all the objects in the identity map of the passed in class. The output of this method will be logged to this session's SessionLog at SEVERE level.
Specified by:
printIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

printIdentityMaps

public void printIdentityMaps()
Deprecated.  
PUBLIC: Used to print all the objects in every identity map in this session. The output of this method will be logged to this session's SessionLog at SEVERE level.
Specified by:
printIdentityMaps in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

putInIdentityMap

public java.lang.Object putInIdentityMap(java.lang.Object domainObject)
Deprecated.  
ADVANCED: Register the object with the identity map. The object must always be registered with its version number if optimistic locking is used.
Specified by:
putInIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

putInIdentityMap

public java.lang.Object putInIdentityMap(java.lang.Object domainObject,
                                         java.util.Vector key)
Deprecated.  
ADVANCED: Register the object with the identity map. The object must always be registered with its version number if optimistic locking is used.
Specified by:
putInIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

putInIdentityMap

public java.lang.Object putInIdentityMap(java.lang.Object domainObject,
                                         java.util.Vector key,
                                         java.lang.Object writeLockValue)
Deprecated.  
ADVANCED: Register the object with the identity map. The object must always be registered with its version number if optimistic locking is used.
Specified by:
putInIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

putInIdentityMap

public java.lang.Object putInIdentityMap(java.lang.Object domainObject,
                                         java.util.Vector key,
                                         java.lang.Object writeLockValue,
                                         long readTime)
Deprecated.  
ADVANCED: Register the object with the identity map. The object must always be registered with its version number if optimistic locking is used. The readTime may also be included in the cache key as it is constructed
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

readAllObjects

public java.util.Vector readAllObjects(java.lang.Class domainClass)
                                throws DatabaseException
Deprecated. 
PUBLIC: Read all of the instances of the class from the database. This operation can be customized through using a ReadAllQuery, or through also passing in a selection criteria.
Specified by:
readAllObjects in interface Session
Throws:
DatabaseException
See Also:
ReadAllQuery, readAllObjects(Class, Expression)

readAllObjects

public java.util.Vector readAllObjects(java.lang.Class domainClass,
                                       java.lang.String sqlString)
                                throws DatabaseException
Deprecated. 
PUBLIC: Read all of the instances of the class from the database return through execution the SQL string. The SQL string must be a valid SQL select statement or selecting stored procedure call. This operation can be customized through using a ReadAllQuery. Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.
Specified by:
readAllObjects in interface Session
Throws:
DatabaseException
See Also:
ReadAllQuery

readAllObjects

public java.util.Vector readAllObjects(java.lang.Class referenceClass,
                                       Call aCall)
                                throws DatabaseException
Deprecated. 
PUBLIC: Read all the instances of the class from the database returned through execution the Call string. The Call can be an SQLCall or EJBQLCall. example: session.readAllObjects(Employee.class, new SQLCall("SELECT * FROM EMPLOYEE"));
Specified by:
readAllObjects in interface Session
Throws:
DatabaseException
See Also:
Call

readAllObjects

public java.util.Vector readAllObjects(java.lang.Class domainClass,
                                       Expression expression)
                                throws DatabaseException
Deprecated. 
PUBLIC: Read all of the instances of the class from the database matching the given expression. This operation can be customized through using a ReadAllQuery.
Specified by:
readAllObjects in interface Session
Throws:
DatabaseException
See Also:
ReadAllQuery

readObject

public java.lang.Object readObject(java.lang.Class domainClass)
                            throws DatabaseException
Deprecated. 
PUBLIC: Read the first instance of the class from the database. This operation can be customized through using a ReadObjectQuery, or through also passing in a selection criteria.
Specified by:
readObject in interface Session
Throws:
DatabaseException
See Also:
ReadObjectQuery, readAllObjects(Class, Expression)

readObject

public java.lang.Object readObject(java.lang.Class domainClass,
                                   java.lang.String sqlString)
                            throws DatabaseException
Deprecated. 
PUBLIC: Read the first instance of the class from the database return through execution the SQL string. The SQL string must be a valid SQL select statement or selecting stored procedure call. This operation can be customized through using a ReadObjectQuery. Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.
Specified by:
readObject in interface Session
Throws:
DatabaseException
See Also:
ReadObjectQuery

readObject

public java.lang.Object readObject(java.lang.Class domainClass,
                                   Call aCall)
                            throws DatabaseException
Deprecated. 
PUBLIC: Read the first instance of the class from the database returned through execution the Call string. The Call can be an SQLCall or EJBQLCall. example: session.readObject(Employee.class, new SQLCall("SELECT * FROM EMPLOYEE"));
Specified by:
readObject in interface Session
Throws:
DatabaseException
See Also:
SQLCall, EJBQLCall

readObject

public java.lang.Object readObject(java.lang.Class domainClass,
                                   Expression expression)
                            throws DatabaseException
Deprecated. 
PUBLIC: Read the first instance of the class from the database matching the given expression. This operation can be customized through using a ReadObjectQuery.
Specified by:
readObject in interface Session
Throws:
DatabaseException
See Also:
ReadObjectQuery

readObject

public java.lang.Object readObject(java.lang.Object object)
                            throws DatabaseException
Deprecated. 
PUBLIC: Use the example object to consruct a read object query by the objects primary key. This will read the object from the database with the same primary key as the object or null if no object is found.
Specified by:
readObject in interface Session
Throws:
DatabaseException

refreshAndLockObject

public java.lang.Object refreshAndLockObject(java.lang.Object object)
                                      throws DatabaseException
Deprecated. 
PUBLIC: Refresh the attributes of the object and of all of its private parts from the database. The object will be pessimisticly locked on the database for the duration of the transaction. If the object is already locked this method will wait until the lock is released. A no wait option is available through setting the lock mode.
Throws:
DatabaseException
See Also:
#refreshAndLockObject(Object, lockMode)

refreshAndLockObject

public java.lang.Object refreshAndLockObject(java.lang.Object object,
                                             short lockMode)
                                      throws DatabaseException
Deprecated. 
PUBLIC: Refresh the attributes of the object and of all of its private parts from the database. The object will be pessimisticly locked on the database for the duration of the transaction.

Lock Modes: ObjectLevelReadQuery.NO_LOCK, LOCK, LOCK_NOWAIT

Throws:
DatabaseException

refreshObject

public java.lang.Object refreshObject(java.lang.Object object)
                               throws DatabaseException
Deprecated. 
PUBLIC: Refresh the attributes of the object and of all of its private parts from the database. This can be used to ensure the object is up to date with the database. Caution should be used when using this to make sure the application has no un commited changes to the object.
Specified by:
refreshObject in interface Session
Throws:
DatabaseException

release

public void release()
Deprecated. 
PUBLIC: Release the session. This does nothing by default, but allows for other sessions such as the ClientSession to do something.
Specified by:
release in interface Session

removeFromIdentityMap

public void removeFromIdentityMap(java.lang.Object domainObject)
Deprecated.  
ADVANCED: Remove the object from the object cache. Caution should be used when calling to avoid violating object identity. The application should only call this is it knows that no references to the object exist.
Specified by:
removeFromIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

removeFromIdentityMap

public void removeFromIdentityMap(java.util.Vector key,
                                  java.lang.Class theClass)
Deprecated.  
ADVANCED: Remove the object from the object cache.
Specified by:
removeFromIdentityMap in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

removeProperty

public void removeProperty(java.lang.String property)
Deprecated. 
PUBLIC: Remove the user defined property.
Specified by:
removeProperty in interface Session

removeQuery

public void removeQuery(java.lang.String queryName)
Deprecated. 
PUBLIC: Remove all queries with the given queryName regardless of the argument types.
Specified by:
removeQuery in interface Session
See Also:
removeQuery(String, Vector)

removeQuery

public void removeQuery(java.lang.String queryName,
                        java.util.Vector argumentTypes)
Deprecated. 
PUBLIC: Remove the specific query with the given queryName and argumentTypes.

rollbackTransaction

public void rollbackTransaction()
                         throws DatabaseException,
                                ConcurrencyException
Deprecated. 
PUBLIC: Rollback the active database transaction. This allows a group of database modification to be commited or rolledback as a unit. All writes/deletes will be sent to the database be will not be visible to other users until commit. Although databases do not allow nested transaction, TopLink supports nesting through only committing to the database on the outer commit.
Throws:
DatabaseException - if the database connection is lost or the rollback fails.
ConcurrencyException - if this session is not within a transaction.

setCacheSynchronizationManager

public void setCacheSynchronizationManager(CacheSynchronizationManager cacheSynchronizationManager)
Deprecated. 
ADVANCED: Sets the cache synchronization manager for this session. This is used to broadcast changes to this session's cache to other sessions on other servers.
Specified by:
setCacheSynchronizationManager in interface Session

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
Deprecated. 
PUBLIC: Set the exceptionHandler. Exception handler can catch errors that occur on queries or during database access.
Specified by:
setExceptionHandler in interface Session

setExternalTransactionController

public void setExternalTransactionController(ExternalTransactionController externalTransactionController)
Deprecated. 
Used for JTS integration internally by ServerPlatform.
Specified by:
setExternalTransactionController in interface Session
See Also:
CustomServerPlatform

setIntegrityChecker

public void setIntegrityChecker(IntegrityChecker integrityChecker)
Deprecated. 
PUBLIC: set the integrityChecker. IntegrityChecker holds all the Descriptor Exceptions.
Specified by:
setIntegrityChecker in interface Session

setLog

public void setLog(java.io.Writer log)
Deprecated. 
PUBLIC: Set the writer to which an accessor writes logged messages and SQL. If not set, this reference defaults to a writer on System.out. To enable logging logMessages() is used.
Specified by:
setLog in interface Session
See Also:
logMessages()

setLogin

public void setLogin(DatabaseLogin login)
Deprecated. 
PUBLIC: Set the login.

setLogin

public void setLogin(Login login)
Deprecated. 
PUBLIC: Set the login.

setDatasourceLogin

public void setDatasourceLogin(Login login)
Deprecated. 
PUBLIC: Set the login.

setName

public void setName(java.lang.String name)
Deprecated. 
PUBLIC: Set the name of the session. This is used with the session broker.
Specified by:
setName in interface Session

setProfiler

public void setProfiler(SessionProfiler profiler)
Deprecated. 
PUBLIC: Set the profiler for the session. This allows for performance operations to be profiled.
Specified by:
setProfiler in interface Session

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object propertyValue)
Deprecated. 
PUBLIC: Allow for user defined properties.
Specified by:
setProperty in interface Session

setSessionLog

public void setSessionLog(SessionLog sessionLog)
Deprecated. 
PUBLIC: Set the session log to which an accessor logs messages and SQL. If not set, this will default to a session log on a writer on System.out. To enable logging, log level can not be OFF. Also set a backpointer to this session in SessionLog. To avoid a sessionLog being shared by more than one session, it needs to be cloned.
Specified by:
setSessionLog in interface Session
See Also:
logMessage(String)

setSessionLog

public void setSessionLog(SessionLog sessionLog)
Deprecated.  
OBSOLETE: Replaced by setSessionLog(oracle.toplink.logging.SessionLog);
Specified by:
setSessionLog in interface Session
See Also:
setSessionLog(oracle.toplink.logging.SessionLog)

setShouldLogMessages

public void setShouldLogMessages(boolean shouldLogMessages)
Deprecated.  
OBSOLETE: Replaced by setLogLevel(int, String);
Specified by:
setShouldLogMessages in interface Session
See Also:
setLogLevel(int)

setUseOldCommit

public void setUseOldCommit(boolean oldCommit)
Deprecated.  
ADVANCED: Customers may experience errors with older code, that uses query events on commit, and 9.0.4 of TopLink. Setting this flag to true should remove those errors. Any new code should not use this flag but instead use API on DescriptorEvent to update the values in the Objects and the UnitOfWork Change Sets as well;

shouldLogMessages

public boolean shouldLogMessages()
Deprecated. 
PUBLIC: Return if logging is enabled (false if log level is OFF)
Specified by:
shouldLogMessages in interface Session

toString

public java.lang.String toString()
Deprecated. 
Print the connection status with the session.

updateObject

public java.lang.Object updateObject(java.lang.Object domainObject)
                              throws DatabaseException,
                                     OptimisticLockException
Deprecated. 
PUBLIC: Update the object and all of its privately owned parts in the database. Update should only be used if the application knows that the object is new, otherwise writeObject should be used. The update operation can be customized through using an update query.
Throws:
DatabaseException - if an error occurs on the database, these include constraint violations, security violations and general database erros.
OptimisticLockException - if the object's descriptor is using optimistic locking and the object has been updated or deleted by another user since it was last read.
See Also:
UpdateObjectQuery, writeObject(Object)

updateWriteLockValue

public void updateWriteLockValue(java.lang.Object domainObject,
                                 java.lang.Object writeLockValue)
Deprecated.  
ADVANCED: Update the write lock value in the identity map.
Specified by:
updateWriteLockValue in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

updateWriteLockValue

public void updateWriteLockValue(java.util.Vector primaryKey,
                                 java.lang.Class theClass,
                                 java.lang.Object writeLockValue)
Deprecated.  
ADVANCED: Update the write lock value in the identity map.
Specified by:
updateWriteLockValue in interface Session
See Also:
getIdentityMapAccessor(), IdentityMapAccessor

usesExternalTransactionController

public boolean usesExternalTransactionController()
Deprecated.  
This should not be used, and isn't but for some reason was on the interface. This should be removed next release.
Specified by:
usesExternalTransactionController in interface Session

usesOldCommit

public boolean usesOldCommit()
Deprecated. 
ADVANCED: Customers may experience errors with older code, that uses query events on commit, and 9.0.4 of TopLink. Setting this flag to true should remove those errors. Any new code should not use this flag but instead use API on DescriptorEvent to update the values in the Objects and the UnitOfWork Change Sets as well;

validateCache

public void validateCache()
Deprecated. 
ADVANCED: This can be used to help debugging an object identity problem. An object identity problem is when an object in the cache references an object not in the cache. This method will validate that all cached objects are in a correct state.
Specified by:
validateCache in interface Session

verifyDelete

public boolean verifyDelete(java.lang.Object domainObject)
Deprecated. 
TESTING: This is used by testing code to ensure that a deletion was successful.

writeObject

public java.lang.Object writeObject(java.lang.Object domainObject)
                             throws DatabaseException,
                                    OptimisticLockException
Deprecated. 
PUBLIC: Write the object and all of its privately owned parts in the database. Write will determine if an insert or an update should be done, it may go to the database to determine this (by default will check the identity map). The write operation can be customized through using an write query.
Throws:
DatabaseException - if an error occurs on the database, these include constraint violations, security violations and general database erros.
OptimisticLockException - if the object's descriptor is using optimistic locking and the object has been updated or deleted by another user since it was last read.
See Also:
WriteObjectQuery, insertObject(Object), updateObject(Object)

getCommandManager

public CommandManager getCommandManager()
Deprecated. 
PUBLIC: Return the CommandManager that allows this session to act as a CommandProcessor and receive or propagate commands from/to the TopLink cluster.
Specified by:
getCommandManager in interface CommandProcessor
Returns:
The CommandManager instance that controls the remote command service for this session
See Also:
CommandManager

setCommandManager

public void setCommandManager(CommandManager mgr)
Deprecated. 
ADVANCED: Set the CommandManager that allows this session to act as a CommandProcessor and receive or propagate commands from/to the TopLink cluster.
Specified by:
setCommandManager in interface CommandProcessor
Parameters:
mgr - The CommandManager instance to control the remote command service for this session
See Also:
CommandManager

shouldPropagateChanges

public boolean shouldPropagateChanges()
Deprecated. 
PUBLIC: Return whether changes should be propagated to other sessions or applications in a TopLink cluster through the Remote Command Manager mechanism. In order for this to occur the CommandManager must be set.
Returns:
True if propagation is set to occur, false if not
See Also:
setCommandManager(CommandManager)

setShouldPropagateChanges

public void setShouldPropagateChanges(boolean choice)
Deprecated. 
ADVANCED: Set whether changes should be propagated to other sessions or applications in a TopLink cluster through the Remote Command Manager mechanism. In order for this to occur the CommandManager must be set.
Parameters:
choice - If true (and the CommandManager is set) then propagation will occur
See Also:
setCommandManager(CommandManager)

getLogLevel

public int getLogLevel(java.lang.String category)
Deprecated. 
PUBLIC:

Return the log level

Specified by:
getLogLevel in interface Session
Parameters:
category - the string representation of a TopLink category, e.g. "sql", "transaction" ...
Returns:
the log level

getLogLevel

public int getLogLevel()
Deprecated. 
PUBLIC:

Return the log level

Specified by:
getLogLevel in interface Session
Returns:
the log level

setLogLevel

public void setLogLevel(int level)
Deprecated. 
PUBLIC:

Set the log level

Specified by:
setLogLevel in interface Session
Parameters:
level - the new log level

shouldLog

public boolean shouldLog(int Level,
                         java.lang.String category)
Deprecated. 
PUBLIC:

Check if a message of the given level would actually be logged.

Specified by:
shouldLog in interface Session
Parameters:
category - the string representation of a TopLink category
Returns:
true if the given message level will be logged

log

public void log(int level,
                java.lang.String category,
                java.lang.String message)
Deprecated. 
PUBLIC:

Log a message with level and category that needs to be translated.

Parameters:
level - the log request level value
message - the string message
category - the string representation of a TopLink category.

log

public void log(int level,
                java.lang.String category,
                java.lang.String message,
                java.lang.Object param)
Deprecated. 
PUBLIC:

Log a message with level, category and a parameter that needs to be translated.

Parameters:
level - the log request level value
message - the string message
category - the string representation of a TopLink category.
param - a parameter of the message

log

public void log(int level,
                java.lang.String category,
                java.lang.String message,
                java.lang.Object param1,
                java.lang.Object param2)
Deprecated. 
PUBLIC:

Log a message with level, category and two parameters that needs to be translated.

Parameters:
level - the log request level value
message - the string message
category - the string representation of a TopLink category.
param1 - a parameter of the message
param2 - second parameter of the message

log

public void log(int level,
                java.lang.String category,
                java.lang.String message,
                java.lang.Object param1,
                java.lang.Object param2,
                java.lang.Object param3)
Deprecated. 
PUBLIC:

Log a message with level, category and three parameters that needs to be translated.

Parameters:
level - the log request level value
message - the string message
category - the string representation of a TopLink category.
param1 - a parameter of the message
param2 - second parameter of the message
param3 - third parameter of the message

log

public void log(int level,
                java.lang.String category,
                java.lang.String message,
                java.lang.Object[] params)
Deprecated. 
PUBLIC:

Log a message with level, category and an array of parameters that needs to be translated.

Parameters:
level - the log request level value
message - the string message
category - the string representation of a TopLink category.
params - array of parameters to the message

log

public void log(int level,
                java.lang.String category,
                java.lang.String message,
                java.lang.Object[] params,
                Accessor accessor)
Deprecated. 
PUBLIC:

Log a message with level, category, parameters and accessor that needs to be translated.

Parameters:
level - the log request level value
message - the string message
params - array of parameters to the message
accessor - the connection that generated the log entry
category - the string representation of a TopLink category.

log

public void log(int level,
                java.lang.String category,
                java.lang.String message,
                java.lang.Object[] params,
                Accessor accessor,
                boolean shouldTranslate)
Deprecated. 
PUBLIC:

Log a message with level, category, parameters and accessor. shouldTranslate determines if the message needs to be translated.

Parameters:
level - the log request level value
message - the string message
params - array of parameters to the message
accessor - the connection that generated the log entry
category - the string representation of a TopLink category.
shouldTranslate - true if the message needs to be translated.

log

public void log(int level,
                java.lang.String message,
                java.lang.Object[] params,
                Accessor accessor)
Deprecated. 
PUBLIC:

Log a message with level, parameters and accessor that needs to be translated.

Parameters:
level - the log request level value
message - the string message
params - array of parameters to the message
accessor - the connection that generated the log entry

log

public void log(int level,
                java.lang.String message,
                java.lang.Object[] params,
                Accessor accessor,
                boolean shouldTranslate)
Deprecated. 
PUBLIC:

Log a message with level, parameters and accessor. shouldTranslate determines if the message needs to be translated.

Parameters:
level - the log request level value
message - the string message
params - array of parameters to the message
accessor - the connection that generated the log entry
shouldTranslate - true if the message needs to be translated.

logThrowable

public void logThrowable(int level,
                         java.lang.String category,
                         java.lang.Throwable throwable)
Deprecated. 
PUBLIC:

Log a throwable with level and category.

Parameters:
level - the log request level value
category - the string representation of a TopLink category.
throwable - a Throwable

severe

public void severe(java.lang.String message,
                   java.lang.String category)
Deprecated. 
PUBLIC:

This method is called when a severe level message needs to be logged. The message will be translated

Parameters:
message - the message key

warning

public void warning(java.lang.String message,
                    java.lang.String category)
Deprecated. 
PUBLIC:

This method is called when a warning level message needs to be logged. The message will be translated

Parameters:
message - the message key

info

public void info(java.lang.String message,
                 java.lang.String category)
Deprecated. 
PUBLIC:

This method is called when a info level message needs to be logged. The message will be translated

Parameters:
message - the message key

config

public void config(java.lang.String message,
                   java.lang.String category)
Deprecated. 
PUBLIC:

This method is called when a config level message needs to be logged. The message will be translated

Parameters:
message - the message key

fine

public void fine(java.lang.String message,
                 java.lang.String category)
Deprecated. 
PUBLIC:

This method is called when a fine level message needs to be logged. The message will be translated

Parameters:
message - the message key

finer

public void finer(java.lang.String message,
                  java.lang.String category)
Deprecated. 
PUBLIC:

This method is called when a finer level message needs to be logged. The message will be translated

Parameters:
message - the message key

finest

public void finest(java.lang.String message,
                   java.lang.String category)
Deprecated. 
PUBLIC:

This method is called when a finest level message needs to be logged. The message will be translated

Parameters:
message - the message key

handleSevere

public java.lang.Object handleSevere(java.lang.RuntimeException exception)
                              throws java.lang.RuntimeException
Deprecated. 
PUBLIC: Allow any SEVERE level exceptions that occur within TopLink to be logged and handled by the exception handler.
Specified by:
handleSevere in interface Session
Throws:
java.lang.RuntimeException

Skip navigation links

Copyright © 1998, 2006, Oracle. All Rights Reserved.