Top Description Fields Constructors Methods
org.eclipse.persistence.internal.sessions

public abstract Class AbstractSession

extends CoreAbstractSession<ClassDescriptor, Login, Platform, Project, SessionEventManager>
implements Session, CommandProcessor, Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable, org.eclipse.persistence.sessions.coordination.CommandProcessor, org.eclipse.persistence.sessions.Session, org.eclipse.persistence.core.sessions.CoreSession
Known Direct Subclasses
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl, org.eclipse.persistence.internal.history.HistoricalSession, org.eclipse.persistence.sessions.server.ClientSession
Imports
java.io.Serializable, .StringWriter, .Writer, java.lang.reflect.Constructor, java.security.AccessController, java.util.ArrayList, .Collection, .HashMap, .HashSet, .Iterator, .List, .Map, .Set, .Vector, java.util.concurrent.TimeUnit, org.eclipse.persistence.config.PersistenceUnitProperties, .ReferenceMode, org.eclipse.persistence.descriptors.ClassDescriptor, .DescriptorEvent, .DescriptorQueryManager, .TablePerMultitenantPolicy, org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicy, org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy, org.eclipse.persistence.exceptions.ConcurrencyException, .DatabaseException, .EclipseLinkException, .ExceptionHandler, .IntegrityChecker, .IntegrityException, .OptimisticLockException, .QueryException, .ValidationException, org.eclipse.persistence.expressions.Expression, org.eclipse.persistence.history.AsOfClause, org.eclipse.persistence.indirection.ValueHolderInterface, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.databaseaccess.Accessor, .Platform, org.eclipse.persistence.internal.descriptors.ObjectBuilder, org.eclipse.persistence.internal.helper.ConcurrencyManager, .Helper, .QueryCounter, org.eclipse.persistence.internal.helper.linkedlist.ExposedNodeLinkedList, org.eclipse.persistence.internal.history.HistoricalSession, org.eclipse.persistence.internal.identitymaps.CacheKey, .IdentityMapManager, org.eclipse.persistence.internal.indirection.DatabaseValueHolder, .ProtectedValueHolder, .ProxyIndirectionPolicy, org.eclipse.persistence.internal.localization.ExceptionLocalization, org.eclipse.persistence.internal.queries.JoinedAttributeManager, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName, .PrivilegedGetConstructorFor, .PrivilegedInvokeConstructor, .PrivilegedNewInstanceFromClass, org.eclipse.persistence.internal.sequencing.Sequencing, org.eclipse.persistence.internal.sessions.cdi.DisabledInjectionManager, .InjectionManager, org.eclipse.persistence.logging.DefaultSessionLog, .SessionLog, .SessionLogEntry, org.eclipse.persistence.mappings.ForeignReferenceMapping, org.eclipse.persistence.mappings.foundation.AbstractTransformationMapping, org.eclipse.persistence.platform.database.DatabasePlatform, org.eclipse.persistence.platform.server.ServerPlatform, org.eclipse.persistence.queries.AttributeGroup, .Call, .DataModifyQuery, .DataReadQuery, .DatabaseQuery, .DeleteObjectQuery, .DoesExistQuery, .InsertObjectQuery, .JPAQueryBuilder, .JPQLCall, .ObjectBuildingQuery, .ObjectLevelReadQuery, .ReadAllQuery, .ReadObjectQuery, .SQLCall, .UpdateObjectQuery, .WriteObjectQuery, org.eclipse.persistence.sessions.CopyGroup, .DatabaseLogin, .ExternalTransactionController, .Login, .Project, .SessionEventManager, .SessionProfiler, org.eclipse.persistence.sessions.coordination.Command, .CommandManager, .CommandProcessor, .MetadataRefreshListener, org.eclipse.persistence.sessions.serializers.Serializer

Implementation of org.eclipse.persistence.sessions.Session The public interface should be used.
See Also
<p> <b>Purpose</b>: Define the interface and common protocol of an EclipseLink compliant session. <p> <b>Description</b>: The session is the primary interface into EclipseLink, 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 controller objects. Controller objects normally sit behind the GUI and perform the business processes required for the application, they should perform all explicit database access and database access should be avoided from the domain object model. Do not use a globally accessible 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. <p> <b>Responsibilities</b>: <ul> <li> Connecting/disconnecting. <li> Reading and writing objects. <li> Transaction and unit of work support. <li> Identity maps and caching. </ul>, DatabaseSessionImpl

Field Summary

Modifier and TypeField and Description
protected transient Collection<Accessor>
accessors

The connection to the data store.

protected transient ExposedNodeLinkedList
activeCommandThreads

List of active command threads.

protected Map<String, AttributeGroup>
attributeGroups

Stores predefined reusable AttributeGroups.

protected transient AbstractSession
broker

Support being owned by a session broker.

protected transient CommandManager
commandManager

Used to connect this session to EclipseLink cluster for distributed command

protected transient CommitManager
commitManager

Resolves referential integrity on commits.

protected ReferenceMode
defaultReferenceMode

Stores the default reference mode that a UnitOfWork will use when referencing managed objects.

protected List<DescriptorEvent>
deferredEvents

temporarily holds a list of events that must be fired after the current operation completes.

protected transient Map<Class<?>, ClassDescriptor>
descriptors

PERF: cache descriptors from project.

protected transient SessionEventManager
eventManager

Stores the event listeners for this session.

protected transient ExceptionHandler
exceptionHandler

ExceptionHandler handles database exceptions.

protected transient ExternalTransactionController
externalTransactionController

Delegate that handles synchronizing a UnitOfWork with an external transaction.

protected IdentityMapAccessor
identityMapAccessor

Manages the live object cache.

protected transient InjectionManager<?>
injectionManager

Allow CDI injection of entity listeners

protected transient IntegrityChecker
integrityChecker

IntegrityChecker catch all the descriptor Exceptions.

protected boolean
isConcurrent

Allow a session to enable concurrent processing.

protected boolean
isExecutingEvents

records that the UOW is executing deferred events.

protected boolean
isFinalizersEnabled

PERF: Allow for finalizers to be enabled, currently enables client-session finalize.

protected boolean
isInBroker

Used to determine If a session is in a Broker or not

protected boolean
isInProfile

Used to determine If a session is in a profile or not

protected boolean
isLoggingOff

PERF: Quick check if logging is OFF entirely.

protected boolean
isSynchronized

Indicates whether the session is synchronized.

protected boolean
jpaQueriesProcessed

Stores predefined not yet parsed JPQL queries.

protected transient ClassDescriptor
lastDescriptorAccessed

Last descriptor accessed, use to optimize descriptor lookup.

protected transient String
logSessionString

When logging the name of the session is typed: class name + system hashcode.

protected MetadataRefreshListener
metadatalistener

the MetadataRefreshListener is used with RCM to force a refresh of the metadata used within EntityManagerFactoryWrappers

protected Set<String>
multitenantContextProperties

Stores the set of multitenant context properties this session requires

protected String
name

Used to identify a session when using the session broker.

protected transient int
numberOfActiveUnitsOfWork

Keep track of active units of work.

protected Map<K, V>
objectsLockedForClone

This collection will be used to store those objects that are currently locked for the clone process.

protected PartitioningPolicy
partitioningPolicy

Allow queries to be targeted at specific connection pools.

protected Integer
pessimisticLockTimeoutDefault

Default pessimistic lock timeout value.

protected TimeUnit
protected transient Platform
platform

Allow the datasource platform to be cached.

protected transient SessionProfiler
profiler

Tool that log performance information.

protected transient Project
project

The project stores configuration information, such as the descriptors and login.

protected Map<String, Object>
properties

Allow for user defined properties.

protected transient Map<String, List<DatabaseQuery>>
queries

Stores predefine reusable queries.

protected transient JPAQueryBuilder
queryBuilder

Store the query builder used to parse JPQL.

protected int
protected TimeUnit
protected transient Serializer
serializer

Set the Serializer to use by default for serialization.

protected transient SessionLog
sessionLog

Destination for logged messages and SQL.

protected boolean
shouldCheckWriteLock

PERF: Cache the write-lock check to avoid cost of checking in every register/clone.

protected boolean
shouldOptimizeResultSetAccess

Indicates whether ObjectLevelReadQuery should by default use ResultSet Access optimization.

protected boolean
shouldPropagateChanges

Determined whether changes should be propagated to an EclipseLink cluster

protected Map<String, String>
staticMetamodelClasses

This map will hold onto class to static metamodel class references from JPA.

protected transient List<ClassDescriptor>
tablePerTenantDescriptors

PERF: cache table per tenant descriptors needing to be initialized per EM

protected transient List<DatabaseQuery>
tablePerTenantQueries

PERF: cache table per tenant queries needing to be initialized per EM

protected boolean
tolerateInvalidJPQL

Indicates whether Session creation should tolerate an invalid NamedQuery.

protected transient ConcurrencyManager
transactionMutex

Ensure mutual exclusion of the session's transaction state across multiple threads.

protected boolean
wasJTSTransactionInternallyStarted

If Transactions were externally started

Constructor Summary

AccessConstructor and Description
protected
AbstractSession()

INTERNAL: Create and return a new session.

protected
AbstractSession(int nothing)

INTERNAL: Create a blank session, used for proxy session.

protected
AbstractSession(Login login)

PUBLIC: Create and return a new session.

protected
AbstractSession(Project project)

PUBLIC: Create and return a new session.

Method Summary

Modifier and TypeMethod and Description
public Session
acquireHistoricalSession(AsOfClause
Represents a valid snap shot time.
clause
)

Implements org.eclipse.persistence.sessions.Session.acquireHistoricalSession.

INTERNAL: Constructs a HistoricalSession given a valid AsOfClause.
public UnitOfWorkImpl
acquireNonSynchronizedUnitOfWork()

INTERNAL: Return a unit of work for this session not registered with the JTS transaction.

public UnitOfWorkImpl
acquireNonSynchronizedUnitOfWork(ReferenceMode referenceMode)

INTERNAL: Return a unit of work for this session not registered with the JTS transaction.

public RepeatableWriteUnitOfWork
acquireRepeatableWriteUnitOfWork(ReferenceMode referenceMode)

PUBLIC: Return a repeatable write unit of work for this session.

public UnitOfWorkImpl
acquireUnitOfWork()

Implements org.eclipse.persistence.sessions.Session.acquireUnitOfWork.

PUBLIC: Return a unit of work for this session.
public UnitOfWorkImpl
acquireUnitOfWork(ReferenceMode
The reference type the UOW should use internally when referencing Working clones. Setting this to WEAK means the UOW will use weak references to reference clones that support active object change tracking and hard references for deferred change tracked objects. Setting to FORCE_WEAK means that all objects will be referenced by weak references and if the application no longer references the clone the clone may be garbage collected. If the clone has uncommitted changes then those changes will be lost.
referenceMode
)

Implements org.eclipse.persistence.sessions.Session.acquireUnitOfWork.

PUBLIC: Return a unit of work for this session.
public void
addAlias(String alias, ClassDescriptor descriptor)

PUBLIC: Add an alias for the descriptor

public void
addJPAQuery(DatabaseQuery query)

Implements org.eclipse.persistence.sessions.Session.addJPAQuery.

INTERNAL: Return all pre-defined not yet parsed EJBQL queries.
public void
addJPATablePerTenantQuery(DatabaseQuery query)

INTERNAL: Return all pre-defined not yet parsed EJBQL multitenant queries.

public void
addMultitenantContextProperty(String contextProperty)

PUBLIC: Return a set of multitenant context properties this session

protected synchronized void
addQuery(DatabaseQuery query, boolean nameMustBeUnique)

INTERNAL: Add the query to the session queries.

public void
addQuery(String name, DatabaseQuery query)

Implements org.eclipse.persistence.sessions.Session.addQuery.

PUBLIC: Add the query to the session queries with the given name.
public void
addQuery(String name, DatabaseQuery query, boolean replace)

PUBLIC: Add the query to the session queries with the given name.

public void
addStaticMetamodelClass(String modelClassName, String metamodelClassName)

INTERNAL: Add a metamodel class to model class reference.

protected void
addTablePerTenantDescriptor(ClassDescriptor descriptor)

INTERNAL: Add a descriptor that is uses a table per tenant multitenant policy.

protected void
addTablePerTenantQuery(DatabaseQuery query)

INTERNAL: Add a query that queries a table per tenant entity

protected void
basicBeginTransaction()

INTERNAL: Called by beginTransaction() to start a transaction.

protected void
basicBeginTransaction(Accessor accessor)

INTERNAL: Called by beginTransaction() to start a transaction.

protected void
basicCommitTransaction()

INTERNAL: Called by commitTransaction() to commit a transaction.

public Object
basicExecuteCall(Call call, AbstractRecord translationRow, DatabaseQuery query)

INTERNAL: Execute the call on each accessors and merge the results.

protected void
basicRollbackTransaction()

INTERNAL: Called by rollbackTransaction() to rollback a transaction.

public boolean
beginExternalTransaction()

INTERNAL: Attempts to begin an external transaction.

public void
beginTransaction()

PUBLIC: Begin a transaction on the database.

protected JPAQueryBuilder
buildDefaultQueryBuilder()

INTERNAL Build the JPQL builder based on session properties.

public void
checkAndRefreshInvalidObject(Object object, CacheKey cacheKey, ClassDescriptor descriptor)

INTERNAL: Check if the object is invalid and refresh it.

protected ClassDescriptor

Returns:

ClassDescriptor
checkHierarchyForDescriptor
(Class<?> theClass)

Check to see if the descriptor of a superclass can be used to describe this class

public void
cleanUpInjectionManager()

allow the entity listener injection manager to clean itself up.

public void
clearDescriptors()

INTERNAL: Clear the the descriptors cache.

public void
public void
clearLastDescriptorAccessed()

INTERNAL: Clear the the lastDescriptorAccessed cache.

public void
clearProfile()

Implements org.eclipse.persistence.sessions.Session.clearProfile.

PUBLIC: Clear the profiler, this will end the current profile operation.
public Object
clone()

Overrides java.lang.Object.clone.

INTERNAL: Clones the descriptor
public boolean
commitExternalTransaction()

INTERNAL: Attempts to commit the running internally started external transaction.

public void
commitTransaction()

PUBLIC: Commit the active database transaction.

public boolean
compareObjects(Object firstObject, Object secondObject)

INTERNAL: Return if the two object match completely.

public boolean
compareObjectsDontMatch(Object firstObject, Object secondObject)

TESTING: Return true if the object do not match.

public void
config(String
the message key
message
,
String category)

PUBLIC:

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

public boolean
containsQuery(String queryName)

Implements org.eclipse.persistence.sessions.Session.containsQuery.

PUBLIC: Return true if the pre-defined query is defined on the session.
public Object
copy(Object originalObjectOrObjects)

Implements org.eclipse.persistence.sessions.Session.copy.

PUBLIC: Return a complete copy of the object or of collection of objects.
public Object
copy(Object originalObjectOrObjects, AttributeGroup group)

Implements org.eclipse.persistence.sessions.Session.copy.

PUBLIC: Return a complete copy of the object or of collection of objects.
public void
copyDescriptorNamedQueries(boolean
if the value is true, it allow multiple queries of the same name but different arguments to be copied to the session.
allowSameQueryNameDiffArgsCopyToSession
)

INTERNAL: This method will be used to copy all EclipseLink named queries defined in descriptors into the session.

public void
copyDescriptorsFromProject()

INTERNAL: Copies descriptors cached on the Project.

public Object
copyInternal(Object originalObject, CopyGroup copyGroup)

INTERNAL:

public Vector<E>
copyReadOnlyClasses()

INTERNAL: Copy the read only classes from the unit of work Added Nov 8, 2000 JED for Patch 2.5.1.8 Ref: Prs 24502

public <T> DatabaseValueHolder<T>
public <T> DatabaseValueHolder<T>
public <T> InjectionManager<T>
public Object
createProtectedInstanceFromCachedData(Object cached, Integer refreshCascade, ClassDescriptor descriptor)

INTERNAL: This method is similar to getAndCloneCacheKeyFromParent.

public void
deferEvent(DescriptorEvent event)

INTERNAL: Add an event to the deferred list.

public void
deleteAllObjects(Collection<E> domainObjects)

PUBLIC: delete all of the objects and all of their privately owned parts in the database.

public Object
deleteObject(Object domainObject)

PUBLIC: Delete the object and all of its privately owned parts from the database.

public boolean
doesObjectExist(Object object)

Implements org.eclipse.persistence.sessions.Session.doesObjectExist.

PUBLIC: Return if the object exists on the database or not.
public void
public void
public void
endOperationProfile(String operationName, DatabaseQuery query, int weight)

INTERNAL: End the operation timing.

public Object
executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query)

INTERNAL: Overridden by subclasses that do more than just execute the call.

public void
executeDeferredEvents()

INTERNAL: Causes any deferred events to be fired.

public int
executeNonSelectingCall(Call call)

Implements org.eclipse.persistence.sessions.Session.executeNonSelectingCall.

PUBLIC: Execute the call on the database.
public void
executeNonSelectingSQL(String sqlString)

Implements org.eclipse.persistence.sessions.Session.executeNonSelectingSQL.

PUBLIC: Execute the sql on the database.
public Object
executeQuery(String queryName)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Class<?> domainClass)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Class<?> domainClass, Object arg1)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Class<?> domainClass, Object arg1, Object arg2)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Class<?> domainClass, Object arg1, Object arg2, Object arg3)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Class<?> domainClass, List<E> argumentValues)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Class<?> domainClass, Vector<E> argumentValues)

PUBLIC: Execute the pre-defined query by name and return the result.

public Object
executeQuery(String queryName, Object arg1)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Object arg1, Object arg2)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Object arg1, Object arg2, Object arg3)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, List<E> argumentValues)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Vector<E> argumentValues)

PUBLIC: Execute the pre-defined query by name and return the result.

public Object
executeQuery(DatabaseQuery query)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the database query.
public Object
executeQuery(DatabaseQuery query, List<E> argumentValues)

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Return the results from executing the database query.
public Object
executeQuery(DatabaseQuery query, AbstractRecord row)

INTERNAL: Return the results from executing the database query.

public Object
executeQuery(DatabaseQuery query, AbstractRecord row, int retryCount)

INTERNAL: Return the results from executing the database query.

public Vector<E>
executeSelectingCall(Call call)

Implements org.eclipse.persistence.sessions.Session.executeSelectingCall.

PUBLIC: Execute the call on the database and return the result.
public Vector<E>
executeSQL(String sqlString)

Implements org.eclipse.persistence.sessions.Session.executeSQL.

PUBLIC: Execute the sql on the database and return the result.
public void
fine(String
the message key
message
,
String category)

PUBLIC:

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

public void
finer(String
the message key
message
,
String category)

PUBLIC:

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

public void
finest(String
the message key
message
,
String category)

PUBLIC:

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

public Accessor
getAccessor()

INTERNAL: This should normally not be used, most sessions do not have a single accessor.

public Collection<Accessor>
getAccessors()

INTERNAL: This should normally not be used, most sessions do not have specific accessors.

public Collection<Accessor>
getAccessors(Call call, AbstractRecord translationRow, DatabaseQuery query)

INTERNAL: Return the connections to use for the query execution.

public ExposedNodeLinkedList
public Session
getActiveSession()

Implements org.eclipse.persistence.sessions.Session.getActiveSession.

PUBLIC: Return the active session for the current active external (JTS) transaction.
public UnitOfWork
getActiveUnitOfWork()

Implements org.eclipse.persistence.sessions.Session.getActiveUnitOfWork.

PUBLIC: Return the active unit of work for the current active external (JTS) transaction.
public Map<K, V>
getAliasDescriptors()

INTERNAL: Returns the alias descriptors Map.

public List<DatabaseQuery>
getAllQueries()

INTERNAL: Return the pre-defined queries in this session.

public AsOfClause

Returns:

An immutable object representation of the past time. null if no clause set, or this a regular session.
getAsOfClause
()

Implements org.eclipse.persistence.sessions.Session.getAsOfClause.

ADVANCED: Answers the past time this session is as of.
public Map<String, AttributeGroup>
getAttributeGroups()

ADVANCED Return all predefined attribute groups

public AbstractSession
getBroker()

INTERNAL: Allow the session to be used from a session broker.

protected CacheKey
getCacheKeyFromTargetSessionForMerge(Object implementation, ObjectBuilder builder, ClassDescriptor descriptor, MergeManager mergeManager)

INTERNAL: For use within the merge process this method will get an object from the shared cache using a readlock.

public ClassDescriptor
getClassDescriptor(Class<?> theClass)

Implements org.eclipse.persistence.sessions.Session.getClassDescriptor.

ADVANCED: Return the descriptor specified for the class.
public ClassDescriptor
getClassDescriptor(Object domainObject)

Implements org.eclipse.persistence.sessions.Session.getClassDescriptor.

ADVANCED: Return the descriptor specified for the object's class.
public ClassDescriptor
getClassDescriptorForAlias(String alias)

Implements org.eclipse.persistence.sessions.Session.getClassDescriptorForAlias.

PUBLIC: Return the descriptor for the alias.
public CommandManager

Returns:

The CommandManager instance that controls the remote command service for this session
getCommandManager
()

Implements org.eclipse.persistence.sessions.coordination.CommandProcessor.getCommandManager.

PUBLIC: Return the CommandManager that allows this session to act as a CommandProcessor and receive or propagate commands from/to the EclipseLink cluster.
public CommitManager
getCommitManager()

INTERNAL: The commit manager is used to resolve referential integrity on commits of multiple objects.

public Login
getDatasourceLogin()

Implements org.eclipse.persistence.sessions.Session.getDatasourceLogin, org.eclipse.persistence.core.sessions.CoreSession.getDatasourceLogin.

PUBLIC: Return the login, the login holds any database connection information given.
public Platform
public Vector<E>
getDefaultReadOnlyClasses()

INTERNAL: Returns the set of read-only classes that gets assigned to each newly created UnitOfWork.

public ReferenceMode
getDefaultReferenceMode()

Implements org.eclipse.persistence.sessions.Session.getDefaultReferenceMode.

Stores the default Session wide reference mode that a UnitOfWork will use when referencing managed objects.
public ClassDescriptor
public ClassDescriptor
getDescriptor(Object domainObject)

Implements org.eclipse.persistence.sessions.Session.getDescriptor, org.eclipse.persistence.core.sessions.CoreSession.getDescriptor.

ADVANCED: Return the descriptor specified for the object's class.
public ClassDescriptor

Returns:

The descriptor for the alias or null if no descriptor was found.
getDescriptorForAlias
(final String
The descriptor alias.
alias
)

Implements org.eclipse.persistence.sessions.Session.getDescriptorForAlias.

PUBLIC: Return the descriptor for the alias.
public Map<Class<?>, ClassDescriptor>
public SessionEventManager
public ExceptionHandler
getExceptionHandler()

Implements org.eclipse.persistence.sessions.Session.getExceptionHandler.

PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.
public String
getExceptionHandlerClass()

INTERNAL: Return a string which represents my ExceptionHandler's class Added for F2104: Properties.xml - gn

public AbstractSession

Returns:

a session with a live accessor
getExecutionSession
(DatabaseQuery
may store session name or reference class for brokers case
query
)

INTERNAL: Gets the session which this query will be executed on.

public ExternalTransactionController
public Object
getId(Object domainObject)

Implements org.eclipse.persistence.sessions.Session.getId.

ADVANCED: Extract and return the primary key from the object.
public IdentityMapAccessor
getIdentityMapAccessor()

Implements org.eclipse.persistence.sessions.Session.getIdentityMapAccessor.

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.
public IdentityMapAccessor
getIdentityMapAccessorInstance()

INTERNAL: Return the internally available IdentityMapAccessor instance.

public <T> InjectionManager<T>
public IntegrityChecker
getIntegrityChecker()

Implements org.eclipse.persistence.sessions.Session.getIntegrityChecker.

PUBLIC: Returns the integrityChecker.IntegrityChecker holds all the ClassDescriptor Exceptions.
public List<DatabaseQuery>
getJPAQueries()

Implements org.eclipse.persistence.sessions.Session.getJPAQueries.

ADVANCED: Return all pre-defined not yet parsed JPQL queries.
public List<DatabaseQuery>
getJPATablePerTenantQueries()

ADVANCED: Return all pre-defined not yet parsed JPQL queries.

public ClassLoader
getLoader()

INTERNAL: Return the class loader for the session's application.

public Writer
getLog()

Implements org.eclipse.persistence.sessions.Session.getLog.

PUBLIC: Return the writer to which an accessor writes logged messages and SQL.
public DatabaseLogin
getLogin()

Implements org.eclipse.persistence.sessions.Session.getLogin.

OBSOLETE: Return the login, the login holds any database connection information given.
public int

Returns:

the log level
getLogLevel
(String
the string representation of a EclipseLink category, e.g. "sql", "transaction" ...
category
)

Implements org.eclipse.persistence.sessions.Session.getLogLevel.

PUBLIC:

Return the log level

public int

Returns:

the log level
getLogLevel
()

Implements org.eclipse.persistence.sessions.Session.getLogLevel.

PUBLIC:

Return the log level

public String
getLogSessionString()

INTERNAL: Return the name of the session: class name + system hashcode.

public ClassDescriptor
getMappedSuperclass(String className)

INTERNAL: Return the mapped superclass descriptor if one exists for the given class name.

public Set<String>
getMultitenantContextProperties()

PUBLIC: Return a set of multitenant context properties this session

public String
getName()

Implements org.eclipse.persistence.sessions.Session.getName.

PUBLIC: Return the name of the session.
public long
getNextQueryId()

INTERNAL: Called by a sessions queries to obtain individual query ids.

public Number
getNextSequenceNumberValue(Class<?> domainClass)

Implements org.eclipse.persistence.sessions.Session.getNextSequenceNumberValue.

ADVANCED: Return the sequnce number from the database
public int
getNumberOfActiveUnitsOfWork()

INTERNAL: Return the number of units of work connected.

public AbstractSession
getParent()

INTERNAL: Gets the parent session.

public AbstractSession
getParentIdentityMapSession(DatabaseQuery query)

INTERNAL: Gets the next link in the chain of sessions followed by a query's check early return, the chain of sessions with identity maps all the way up to the root session.

public AbstractSession

Returns:

this if there is no next link in the chain
getParentIdentityMapSession
(DatabaseQuery query, boolean
true when method calls itself. If the path starting at this is acceptable. Sometimes true if want to move to the first valid session, i.e. executing on ClientSession when really should be on ServerSession.
canReturnSelf
,
boolean
return the session we will execute the call on, not the next step towards it.
terminalOnly
)

INTERNAL: Gets the next link in the chain of sessions followed by a query's check early return, the chain of sessions with identity maps all the way up to the root session.

public AbstractSession

Returns:

Session with the required IdentityMap
getParentIdentityMapSession
(ClassDescriptor descriptor, boolean
true when method calls itself. If the path starting at this is acceptable. Sometimes true if want to move to the first valid session, i.e. executing on ClientSession when really should be on ServerSession.
canReturnSelf
,
boolean
return the last session in the chain where the Enitity is stored.
terminalOnly
)

INTERNAL: Returns the appropriate IdentityMap session for this descriptor.

public PartitioningPolicy
getPartitioningPolicy()

Implements org.eclipse.persistence.sessions.Session.getPartitioningPolicy.

PUBLIC: Return the session's partitioning policy.
public Integer
getPessimisticLockTimeoutDefault()

INTERNAL: Returns the default pessimistic lock timeout value.

public TimeUnit
public DatabasePlatform
getPlatform()

Implements org.eclipse.persistence.sessions.Session.getPlatform.

INTERNAL: Return the database platform currently connected to.
public Platform
getPlatform(Class<?> domainClass)

Implements abstract org.eclipse.persistence.internal.core.sessions.CoreAbstractSession.getPlatform.

INTERNAL: Return the database platform currently connected to for specified class.
public SessionProfiler
getProfiler()

Implements org.eclipse.persistence.sessions.Session.getProfiler.

PUBLIC: Return the profiler.
public Project
getProject()

Implements org.eclipse.persistence.sessions.Session.getProject, org.eclipse.persistence.core.sessions.CoreSession.getProject.

PUBLIC: Return the project, the project holds configuartion information including the descriptors.
public Map<String, Object>
getProperties()

Implements org.eclipse.persistence.sessions.Session.getProperties.

ADVANCED: Allow for user defined properties.
public Object
getProperty(String name)

Implements org.eclipse.persistence.sessions.Session.getProperty.

ADVANCED: Returns the user defined property.
public Map<String, List<DatabaseQuery>>
getQueries()

Implements org.eclipse.persistence.sessions.Session.getQueries.

ADVANCED: Return all pre-defined queries.
public DatabaseQuery
getQuery(String name)

Implements org.eclipse.persistence.sessions.Session.getQuery.

PUBLIC: Return the query from the session pre-defined queries with the given name.
public DatabaseQuery
getQuery(String name, List<E> arguments)

Implements org.eclipse.persistence.sessions.Session.getQuery.

PUBLIC: Return the query from the session pre-defined queries with the given name and argument types.
public DatabaseQuery
getQuery(String name, Vector<E> arguments)

PUBLIC: Return the query from the session pre-defined queries with the given name and argument types.

public DatabaseQuery
getQuery(String name, Vector<E> arguments, boolean
indicates whether parent should be searched if query not found.
shouldSearchParent
)

INTERNAL: Return the query from the session pre-defined queries with the given name and argument types.

public JPAQueryBuilder
getQueryBuilder()

INTERNAL Return the query builder used to parser JPQL.

public int
getQueryTimeoutDefault()

PUBLIC: Return the default query timeout for this session.

public TimeUnit
public MetadataRefreshListener
getRefreshMetadataListener()

INTERNAL: This currently only used by JPA with RCM to force a refresh of the metadata used within EntityManagerFactoryWrappers

public AbstractSession
getRootSession(DatabaseQuery query)

INTERNAL: The session that this query is executed against when not in transaction.

public Sequencing
getSequencing()

INTERNAL: Return the Sequencing object used by the session.

public Serializer
getSerializer()

Implements org.eclipse.persistence.sessions.Session.getSerializer.

Return the Serializer to use by default for serialization.
public ServerPlatform
getServerPlatform()

Implements org.eclipse.persistence.sessions.Session.getServerPlatform.

INTERNAL: Marked internal as this is not customer API but helper methods for accessing the server platform from within EclipseLink's other sessions types (ie not DatabaseSession)
public AbstractSession
getSessionForClass(Class<?> domainClass)

INTERNAL: Return the session to be used for the class.

public AbstractSession
getSessionForName(String name)

INTERNAL: Return the session by name.

public SessionLog
getSessionLog()

Implements org.eclipse.persistence.sessions.Session.getSessionLog.

PUBLIC: Return the session log to which an accessor logs messages and SQL.
public String
getSessionTypeString()

INTERNAL: Returns the type of session, its class.

public String
getStaticMetamodelClass(String modelClassName)

INTERNAL: Return the static metamodel class associated with the given model class if available.

public List<ClassDescriptor>
getTablePerTenantDescriptors()

INTERNAL: Return list of table per tenant multitenant descriptors.

public List<DatabaseQuery>
getTablePerTenantQueries()

INTERNAL: Return list of table per tenant multitenant descriptors.

public ConcurrencyManager
getTransactionMutex()

INTERNAL: The transaction mutex ensure mutual exclusion on transaction across multiple threads.

public Object
handleException(RuntimeException
The exception being thrown
exception
)

Implements org.eclipse.persistence.sessions.Session.handleException, org.eclipse.persistence.sessions.coordination.CommandProcessor.handleException.

PUBLIC: Allow any WARNING level exceptions that occur within EclipseLink to be logged and handled by the exception handler.
public Object
handleSevere(RuntimeException exception)

Implements org.eclipse.persistence.sessions.Session.handleSevere.

PUBLIC: Allow any SEVERE level exceptions that occur within EclipseLink to be logged and handled by the exception handler.
public boolean
hasBroker()

INTERNAL: Allow the session to be used from a session broker.

public boolean
hasCommitManager()

INTERNAL: Return if the commit manager has been set.

public boolean
hasDescriptor(Class<?> theClass)

Implements org.eclipse.persistence.sessions.Session.hasDescriptor.

ADVANCED: Return true if a descriptor exists for the given class.
public boolean
hasEventManager()

INTERNAL: Return if an event manager has been set.

public boolean
hasExceptionHandler()

Implements org.eclipse.persistence.sessions.Session.hasExceptionHandler.

PUBLIC: Return if an exception handler is present.
public boolean
public boolean
hasProperties()

INTERNAL: Allow to check for user defined properties.

public boolean
hasTablePerTenantDescriptors()

INTERNAL: Return list of table per tenant multitenant descriptors.

public boolean
hasTablePerTenantQueries()

INTERNAL: Return a list of table per tenant multitenant queries.

public void
incrementProfile(String operationName)

Implements org.eclipse.persistence.sessions.coordination.CommandProcessor.incrementProfile.

INTERNAL: Updates the count of SessionProfiler event
public void
incrementProfile(String operationName, DatabaseQuery query)

INTERNAL: Updates the count of SessionProfiler event

public void
info(String
the message key
message
,
String category)

PUBLIC:

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

public void
initializeIdentityMapAccessor()

INTERNAL: Set up the IdentityMapManager.

public Object
insertObject(Object domainObject)

PUBLIC: Insert the object and all of its privately owned parts into the database.

public Object
internalExecuteQuery(DatabaseQuery query, AbstractRecord databaseRow)

INTERNAL: Return the results from exeucting the database query.

public boolean
isBroker()

INTERNAL: Returns true if the session is a session Broker.

public boolean
isClassReadOnly(Class<?> theClass)

PUBLIC: Return if the class is defined as read-only.

public boolean
isClassReadOnly(Class<?> theClass, ClassDescriptor descriptor)

INTERNAL: Return if the class is defined as read-only.

public boolean
isClientSession()

Implements org.eclipse.persistence.sessions.Session.isClientSession.

PUBLIC: Return if this session is a client session.
public boolean
isConcurrent()

ADVANCED: Return if the session enables concurrent processing.

public boolean
isConnected()

Implements org.eclipse.persistence.sessions.Session.isConnected.

PUBLIC: Return if this session is connected to the database.
public boolean
isConsideredInvalid(Object object, CacheKey cacheKey, ClassDescriptor descriptor)

INTERNAL: Check if the object is invalid and *should* be refreshed.

public boolean
isDatabaseSession()

Implements org.eclipse.persistence.sessions.Session.isDatabaseSession.

PUBLIC: Return if this session is a database session.
public boolean
isDistributedSession()

Implements org.eclipse.persistence.sessions.Session.isDistributedSession.

PUBLIC: Return if this session is a distributed session.
public boolean
isExclusiveConnectionRequired()

INTERNAL: This method is called in case externalConnectionPooling is used.

public boolean
isExclusiveIsolatedClientSession()

PUBLIC: Return if this session is an exclusive isolated client session.

public boolean
isFinalizersEnabled()

Implements org.eclipse.persistence.sessions.Session.isFinalizersEnabled.

PUBLIC: Return if this session's decendants should use finalizers.
public boolean
isHistoricalSession()

INTERNAL: Return if this session is a historical session.

public boolean
isInBroker()

INTERNAL: Returns true if the session is in a session Broker.

public boolean
isInProfile()

Implements org.eclipse.persistence.sessions.Session.isInProfile.

PUBLIC: Return if a profiler is being used.
public boolean
isInTransaction()

PUBLIC: Return if the session is currently in the progress of a database transaction.

public boolean
isIsolatedClientSession()

PUBLIC: Return if this session is an isolated client session.

public boolean
isJPAQueriesProcessed()

INTERNAL: used to see if JPA Queries have been processed during initialization

public boolean
isLoggingOff()

INTERNAL: PERF: Used for quick check if logging is OFF entirely.

public boolean
isProtectedSession()

PUBLIC: Returns true if Protected Entities should be built within this session

public boolean
isRemoteSession()

Implements org.eclipse.persistence.sessions.Session.isRemoteSession.

PUBLIC: Return if this session is remote.
public boolean
isRemoteUnitOfWork()

Implements org.eclipse.persistence.sessions.Session.isRemoteUnitOfWork.

PUBLIC: Return if this session is a unit of work.
public boolean
isServerSession()

Implements org.eclipse.persistence.sessions.Session.isServerSession.

PUBLIC: Return if this session is a server session.
public boolean
isSessionBroker()

Implements org.eclipse.persistence.sessions.Session.isSessionBroker.

PUBLIC: Return if this session is a session broker.
public boolean
isSynchronized()

INTERNAL: Return if this session is synchronized.

public boolean
isUnitOfWork()

Implements org.eclipse.persistence.sessions.Session.isUnitOfWork.

PUBLIC: Return if this session is a unit of work.
public Object
keyFromObject(Object domainObject, ClassDescriptor descriptor)

ADVANCED: Extract and return the primary key from the object.

public void
load(Object objectOrCollection, AttributeGroup group)

This method will load the passed object or collection of objects using the passed AttributeGroup.

public void
load(Object objectOrCollection, AttributeGroup group, ClassDescriptor referenceDescriptor, boolean fromFetchGroup)

This method will load the passed object or collection of objects using the passed AttributeGroup.

public void
log(SessionLogEntry entry)

Implements org.eclipse.persistence.sessions.Session.log.

PUBLIC: Log the log entry.
public void
log(int
the log request level value
level
,
String
the string representation of a EclipseLink category.
category
,
String
the string message
message
)

PUBLIC:

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

public void
log(int
the log request level value
level
,
String
the string representation of a EclipseLink category.
category
,
String
the string message
message
,
Object
a parameter of the message
param
)

PUBLIC:

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

public void
log(int
the log request level value
level
,
String
the string representation of a EclipseLink category.
category
,
String
the string message
message
,
Object
a parameter of the message
param1
,
Object
second parameter of the message
param2
)

PUBLIC:

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

public void
log(int
the log request level value
level
,
String
the string representation of a EclipseLink category.
category
,
String
the string message
message
,
Object
a parameter of the message
param1
,
Object
second parameter of the message
param2
,
Object
third parameter of the message
param3
)

PUBLIC:

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

public void
log(int
the log request level value
level
,
String
the string representation of a EclipseLink category.
category
,
String
the string message
message
,
Object[]
array of parameters to the message
params
)

PUBLIC:

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

public void
log(int
the log request level value
level
,
String
the string representation of a EclipseLink category.
category
,
String
the string message
message
,
Object[]
array of parameters to the message
params
,
Accessor
the connection that generated the log entry
accessor
)

PUBLIC:

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

public void
log(int
the log request level value
level
,
String
the string representation of a EclipseLink category.
category
,
String
the string message
message
,
Object[]
array of parameters to the message
params
,
Accessor
the connection that generated the log entry
accessor
,
boolean
true if the message needs to be translated.
shouldTranslate
)

PUBLIC:

Log a message with level, category, parameters and accessor.

public void
logMessage(String message)

Implements org.eclipse.persistence.sessions.Session.logMessage.

Log a untranslated message to the EclipseLink log at FINER level.
public void
logMessage(int
A log constant that is one of LOG_ERROR, LOG_WARNING, LOG_INFO, LOG_DEBUG
logLevel
,
String
The message String that is to be logged
message
)

Implements org.eclipse.persistence.sessions.coordination.CommandProcessor.logMessage.

INTERNAL: RemoteCommandManager method.
public void
logThrowable(int
the log request level value
level
,
String
the string representation of a EclipseLink category.
category
,
Throwable
a Throwable
throwable
)

PUBLIC:

Log a throwable with level and category.

public void
postAcquireConnection(Accessor accessor)

INTERNAL: This method rises appropriate for the session event(s) right after connection is acquired.

public DatabaseQuery
prepareDatabaseQuery(DatabaseQuery query)

INTERNAL: A call back to do session specific preparation of a query.

public void
preReleaseConnection(Accessor accessor)

INTERNAL: This method rises appropriate for the session event(s) right before the connection is released.

public int
priviledgedExecuteNonSelectingCall(Call call)

INTERNAL: Execute the call on the database.

public Vector<E>
priviledgedExecuteSelectingCall(Call call)

INTERNAL: Execute the call on the database and return the result.

public void
processCommand(Object
Application formatted command to be processed
command
)

Implements org.eclipse.persistence.sessions.coordination.CommandProcessor.processCommand.

INTERNAL: RemoteCommandManager method.
public void
processJPAQueries()

INTERNAL: Process the JPA named queries into EclipseLink Session queries.

protected void
processJPAQuery(DatabaseQuery jpaQuery)

INTERNAL: Process the JPA named query into an EclipseLink Session query.

public Vector<E>
readAllObjects(Class<?> domainClass)

Implements org.eclipse.persistence.sessions.Session.readAllObjects.

PUBLIC: Read all of the instances of the class from the database.
public Vector<E>
readAllObjects(Class<?> domainClass, String sqlString)

PUBLIC: Read all of the instances of the class from the database return through execution the SQL string.

public Vector<E>
readAllObjects(Class<?> referenceClass, Call aCall)

Implements org.eclipse.persistence.sessions.Session.readAllObjects.

PUBLIC: Read all the instances of the class from the database returned through execution the Call string.
public Vector<E>
readAllObjects(Class<?> domainClass, Expression expression)

Implements org.eclipse.persistence.sessions.Session.readAllObjects.

PUBLIC: Read all of the instances of the class from the database matching the given expression.
public Object
readObject(Class<?> domainClass)

Implements org.eclipse.persistence.sessions.Session.readObject.

PUBLIC: Read the first instance of the class from the database.
public Object
readObject(Class<?> domainClass, String sqlString)

PUBLIC: Read the first instance of the class from the database return through execution the SQL string.

public Object
readObject(Class<?> domainClass, Call aCall)

Implements org.eclipse.persistence.sessions.Session.readObject.

PUBLIC: Read the first instance of the class from the database returned through execution the Call string.
public Object
readObject(Class<?> domainClass, Expression expression)

Implements org.eclipse.persistence.sessions.Session.readObject.

PUBLIC: Read the first instance of the class from the database matching the given expression.
public Object
readObject(Object object)

Implements org.eclipse.persistence.sessions.Session.readObject.

PUBLIC: Use the example object to consruct a read object query by the objects primary key.
public Object
refreshAndLockObject(Object object)

PUBLIC: Refresh the attributes of the object and of all of its private parts from the database.

public Object
refreshAndLockObject(Object object, short lockMode)

PUBLIC: Refresh the attributes of the object and of all of its private parts from the database.

public Object
refreshObject(Object object)

Implements org.eclipse.persistence.sessions.Session.refreshObject.

PUBLIC: Refresh the attributes of the object and of all of its private parts from the database.
public void
registerFinalizer()

INTERNAL: Register a finalizer to release this session.

public void
release()

Implements org.eclipse.persistence.sessions.Session.release.

PUBLIC: Release the session.
public void
releaseConnectionAfterCall(DatabaseQuery query)

INTERNAL: Release (if required) connection after call.

public void
releaseJTSConnection()

INTERNAL: Called in the end of beforeCompletion of external transaction synchronization listener.

public void
releaseReadConnection(Accessor connection)

INTERNAL:

public void
releaseUnitOfWork(UnitOfWorkImpl unitOfWork)

INTERNAL: Release the unit of work, if lazy release the connection.

public void
removeProperty(String property)

Implements org.eclipse.persistence.sessions.Session.removeProperty.

PUBLIC: Remove the user defined property.
public void
removeQuery(String queryName)

Implements org.eclipse.persistence.sessions.Session.removeQuery.

PUBLIC: Remove all queries with the given queryName regardless of the argument types.
public void
removeQuery(String queryName, Vector<E> argumentTypes)

PUBLIC: Remove the specific query with the given queryName and argumentTypes.

public CacheKey
retrieveCacheKey(Object primaryKey, ClassDescriptor concreteDescriptor, JoinedAttributeManager joinManager, ObjectBuildingQuery query)

public Object
retryQuery(DatabaseQuery query, AbstractRecord row, DatabaseException databaseException, int retryCount, AbstractSession executionSession)

INTERNAL: A query execution failed due to an invalid query.

public DatabaseException
retryTransaction(Accessor accessor, DatabaseException databaseException, int retryCount, AbstractSession executionSession)

INTERNAL: A begin transaction failed.

protected boolean
rollbackExternalTransaction()

PROTECTED: Attempts to rollback the running internally started external transaction.

public void
rollbackTransaction()

PUBLIC: Rollback the active database transaction.

public void
setAccessor(Accessor accessor)

INTERNAL: Set the accessor.

public void
setBroker(AbstractSession broker)

INTERNAL: Allow the session to be used from a session broker.

public void
setCommandManager(CommandManager
The CommandManager instance to control the remote command service for this session
mgr
)

Implements org.eclipse.persistence.sessions.coordination.CommandProcessor.setCommandManager.

ADVANCED: Set the CommandManager that allows this session to act as a CommandProcessor and receive or propagate commands from/to the EclipseLink cluster.
public void
setCommitManager(CommitManager commitManager)

INTERNAL: The commit manager is used to resolve referncial integrity on commits of multiple objects.

public void
setDatasourceLogin(Login login)

PUBLIC: Set the login.

public void
setDefaultReferenceMode(ReferenceMode defaultReferenceMode)

Implements org.eclipse.persistence.sessions.Session.setDefaultReferenceMode.

Stores the default Session wide reference mode that a UnitOfWork will use when referencing managed objects.
public void
setEventManager(SessionEventManager eventManager)

INTERNAL: Set the event manager.

public void
setExceptionHandler(ExceptionHandler exceptionHandler)

Implements org.eclipse.persistence.sessions.Session.setExceptionHandler.

PUBLIC: Set the exceptionHandler.
public void
setExternalTransactionController(ExternalTransactionController externalTransactionController)

Implements org.eclipse.persistence.sessions.Session.setExternalTransactionController.

Used for JTS integration internally by ServerPlatform.
public void
public void
setIntegrityChecker(IntegrityChecker integrityChecker)

Implements org.eclipse.persistence.sessions.Session.setIntegrityChecker.

PUBLIC: set the integrityChecker.
public void
setIsConcurrent(boolean isConcurrent)

ADVANCED: Set if the session enables concurrent processing.

public void
setIsFinalizersEnabled(boolean isFinalizersEnabled)

Implements org.eclipse.persistence.sessions.Session.setIsFinalizersEnabled.

PUBLIC: Set if this session's decendants should use finalizers.
public void
setIsInBroker(boolean isInBroker)

INTERNAL: Set if this session is contained in a SessionBroker.

public void
setIsInProfile(boolean inProfile)

PUBLIC: Allow for user deactive a profiler

public void
setJPAQueriesProcessed(boolean jpaQueriesProcessed)

INTERNAL: used to set if JPA Queries have been processed during initialization

public void
setLog(Writer log)

Implements org.eclipse.persistence.sessions.Session.setLog.

PUBLIC: Set the writer to which an accessor writes logged messages and SQL.
public void
setLoggingOff(final boolean
Logging is turned off when true and turned on when false.
loggingOff
)

INTERNAL: PERF: Used for quick turning logging ON/OFF entirely.

public void
setLogin(DatabaseLogin login)

PUBLIC: Set the login.

public void
setLogin(Login login)

PUBLIC: Set the login.

public void
public void
setName(String name)

Implements org.eclipse.persistence.sessions.Session.setName.

PUBLIC: Set the name of the session.
protected void
setNumberOfActiveUnitsOfWork(int numberOfActiveUnitsOfWork)

public void
setPartitioningPolicy(PartitioningPolicy partitioningPolicy)

Implements org.eclipse.persistence.sessions.Session.setPartitioningPolicy.

PUBLIC: Set the session's partitioning policy.
public void
setPessimisticLockTimeoutDefault(Integer pessimisticLockTimeoutDefault)

PUBLIC: Set the default pessimistic lock timeout value.

public void
setPessimisticLockTimeoutUnitDefault(TimeUnit pessimisticLockTimeoutUnitDefault)

public void
setProfiler(SessionProfiler profiler)

Implements org.eclipse.persistence.sessions.Session.setProfiler.

PUBLIC: Set the profiler for the session.
public void
setProject(Project project)

INTERNAL: Set the project, the project holds configuration information including the descriptors.

public void
setProperties(Map<String, Object> propertiesMap)

INTERNAL: Set the user defined properties by shallow copying the propertiesMap.

public void
setProperty(String propertyName, Object propertyValue)

Implements org.eclipse.persistence.sessions.Session.setProperty.

PUBLIC: Allow for user defined properties.
public void
setQueries(Map<String, List<DatabaseQuery>> queries)

INTERNAL: Set the named queries.

public void
setQueryBuilder(JPAQueryBuilder queryBuilder)

INTERNAL Set the query builder used to parser JPQL.

public void
setQueryTimeoutDefault(int queryTimeoutDefault)

Implements org.eclipse.persistence.sessions.Session.setQueryTimeoutDefault.

PUBLIC: Set the default query timeout for this session.
public void
setQueryTimeoutUnitDefault(TimeUnit queryTimeoutUnitDefault)

Implements org.eclipse.persistence.sessions.Session.setQueryTimeoutUnitDefault.

PUBLIC: Set the default query timeout units for this session.
public void
public void
setSerializer(Serializer serializer)

Implements org.eclipse.persistence.sessions.Session.setSerializer.

Set the Serializer to use by default for serialization.
public void
setSessionLog(SessionLog sessionLog)

Implements org.eclipse.persistence.sessions.Session.setSessionLog.

PUBLIC: Set the session log to which an accessor logs messages and SQL.
public void
setShouldOptimizeResultSetAccess(boolean shouldOptimizeResultSetAccess)

ADVANCED: Set to indicate whether ObjectLevelReadQuery should by default use ResultSet Access optimization.

public void
setShouldPropagateChanges(boolean
If true (and the CommandManager is set) then propagation will occur
choice
)

ADVANCED: Set whether changes should be propagated to other sessions or applications in a EclipseLink cluster through the Remote Command Manager mechanism.

public void
setSynchronized(boolean synched)

INTERNAL: Set isSynchronized flag to indicate that this session is synchronized.

public void
setTolerateInvalidJPQL(boolean b)

ADVANCED: Indicates whether an invalid NamedQuery will be tolerated at init time.

protected void
public void
setWasJTSTransactionInternallyStarted(boolean wasJTSTransactionInternallyStarted)

INTERNAL: Return if a JTS transaction was started by the session.

public void
severe(String
the message key
message
,
String category)

PUBLIC:

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

public boolean
shouldDisplayData()

PUBLIC: Return true if SQL logging should log visible bind parameters.

public boolean

Returns:

true if the given message level will be logged
shouldLog
(int
the log request level
level
,
String
the string representation of a EclipseLink category
category
)

Implements org.eclipse.persistence.sessions.Session.shouldLog.

PUBLIC:

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

public boolean
shouldLogMessages()

Implements org.eclipse.persistence.sessions.Session.shouldLogMessages.

PUBLIC: Return if logging is enabled (false if log level is OFF)
public boolean
shouldLogMessages(int
A log constant that is one of LOG_ERROR, LOG_WARNING, LOG_INFO, LOG_DEBUG
logLevel
)

Implements org.eclipse.persistence.sessions.coordination.CommandProcessor.shouldLogMessages.

INTERNAL: RemoteCommandManager method.
public boolean
shouldOptimizeResultSetAccess()

ADVANCED: Indicates whether ObjectLevelReadQuery should by default use ResultSet Access optimization.

public boolean

Returns:

True if propagation is set to occur, false if not
shouldPropagateChanges
()

PUBLIC: Return whether changes should be propagated to other sessions or applications in a EclipseLink cluster through the Remote Command Manager mechanism.

public boolean
shouldTolerateInvalidJPQL()

ADVANCED: Indicates whether an invalid NamedQuery will be tolerated at init time.

public void
public void
startOperationProfile(String operationName, DatabaseQuery query, int weight)

INTERNAL: Start the operation timing.

public String
toString()

Overrides java.lang.Object.toString.

Print the connection status with the session.
public Object
unwrapObject(Object proxy)

INTERNAL: Unwrap the object if required.

public Object
updateObject(Object domainObject)

PUBLIC: Update the object and all of its privately owned parts in the database.

public void
updateProfile(String operationName, Object value)

Implements org.eclipse.persistence.sessions.coordination.CommandProcessor.updateProfile.

INTERNAL: Updates the value of SessionProfiler state
public void
updateTablePerTenantDescriptors(String property, Object value)

INTERNAL: Set the table per tenant.

public void
validateCache()

Implements org.eclipse.persistence.sessions.Session.validateCache.

ADVANCED: This can be used to help debugging an object identity problem.
public void
validateQuery(DatabaseQuery query)

INTERNAL: This method will be used to update the query with any settings required For this session.

public boolean
verifyDelete(Object domainObject)

TESTING: This is used by testing code to ensure that a deletion was successful.

public void
warning(String
the message key
message
,
String category)

PUBLIC:

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

public boolean
wasJTSTransactionInternallyStarted()

INTERNAL: Return if a JTS transaction was started by the session.

public Object
wrapObject(Object implementation)

INTERNAL: Wrap the object if required.

protected void
writeAllObjectsWithChangeSet(UnitOfWorkChangeSet uowChangeSet)

INTERNAL: Write all of the objects and all of their privately owned parts in the database.

public Object
writeObject(Object domainObject)

PUBLIC: Write the object and all of its privately owned parts in the database.

public void
writesCompleted()

INTERNAL: This method notifies the accessor that a particular sets of writes has completed.