<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
| Modifier and Type | Field and Description |
|---|---|
| protected transient Collection | accessors
The connection to the data store. |
| protected transient ExposedNodeLinkedList | activeCommandThreads
List of active command threads. |
| protected Map | 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 | deferredEvents
temporarily holds a list of events that must be fired after the current operation completes. |
| protected transient Map | 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 | 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 | 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 | properties
Allow for user defined properties. |
| protected transient Map | 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 | staticMetamodelClasses
This map will hold onto class to static metamodel class references from JPA. |
| protected transient List | tablePerTenantDescriptors
PERF: cache table per tenant descriptors needing to be initialized per EM |
| protected transient List | 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 |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Session | acquireHistoricalSession(AsOfClause
Represents a valid snap shot time. clause)Implements org. |
| 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. |
| 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. |
| public void | |
| public void | addJPAQuery(DatabaseQuery query)
Implements org. |
| 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. |
| 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 | |
| protected void | basicBeginTransaction(Accessor accessor)
INTERNAL: Called by beginTransaction() to start a transaction. |
| protected void | |
| public Object | basicExecuteCall(Call call, AbstractRecord translationRow, DatabaseQuery query)
INTERNAL: Execute the call on each accessors and merge the results. |
| protected void | |
| public boolean | |
| public void | |
| protected JPAQueryBuilder | |
| public void | checkAndRefreshInvalidObject(Object object, CacheKey cacheKey, ClassDescriptor descriptor)
INTERNAL: Check if the object is invalid and refresh it. |
| protected ClassDescriptor | Returns: ClassDescriptorCheck to see if the descriptor of a superclass can be used to describe this class |
| public void | |
| public void | |
| public void | clearIntegrityChecker()
Implements org. |
| public void | |
| public void | clearProfile()
Implements org. |
| public Object | |
| public boolean | commitExternalTransaction()
INTERNAL: Attempts to commit the running internally started external transaction. |
| public void | |
| 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 | |
| public boolean | containsQuery(String queryName)
Implements org. |
| public Object | copy(Object originalObjectOrObjects)
Implements org. |
| public Object | copy(Object originalObjectOrObjects, AttributeGroup group)
Implements org. |
| 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 | |
| public Object | |
| public Vector | 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 | createCloneQueryValueHolder(ValueHolderInterface<T> attributeValue, Object clone, AbstractRecord row, ForeignReferenceMapping mapping)
|
| public <T> DatabaseValueHolder | createCloneTransformationValueHolder(ValueHolderInterface<T> attributeValue, Object original, Object clone, AbstractTransformationMapping mapping)
|
| public <T> InjectionManager | |
| public Object | createProtectedInstanceFromCachedData(Object cached, Integer refreshCascade, ClassDescriptor descriptor)
INTERNAL: This method is similar to getAndCloneCacheKeyFromParent. |
| public void | |
| 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. |
| public void | dontLogMessages()
Implements org. |
| public void | endOperationProfile(String operationName)
Implements org. |
| 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 | |
| public int | executeNonSelectingCall(Call call)
Implements org. |
| public void | executeNonSelectingSQL(String sqlString)
Implements org. |
| public Object | executeQuery(String queryName)
Implements org. |
| public Object | executeQuery(String queryName, Class<?> domainClass)
Implements org. |
| public Object | executeQuery(String queryName, Class<?> domainClass, Object arg1)
Implements org. |
| public Object | executeQuery(String queryName, Class<?> domainClass, Object arg1, Object arg2)
Implements org. |
| public Object | executeQuery(String queryName, Class<?> domainClass, Object arg1, Object arg2, Object arg3)
Implements org. |
| public Object | executeQuery(String queryName, Class<?> domainClass, List<E> argumentValues)
Implements org. |
| 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. |
| public Object | executeQuery(String queryName, Object arg1, Object arg2)
Implements org. |
| public Object | executeQuery(String queryName, Object arg1, Object arg2, Object arg3)
Implements org. |
| public Object | executeQuery(String queryName, List<E> argumentValues)
Implements org. |
| 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. |
| public Object | executeQuery(DatabaseQuery query, List<E> argumentValues)
Implements org. |
| 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 | executeSelectingCall(Call call)
Implements org. |
| public Vector | executeSQL(String sqlString)
Implements org. |
| public void | |
| public void | |
| public void | |
| public Accessor | getAccessor()
INTERNAL: This should normally not be used, most sessions do not have a single accessor. |
| public Collection | getAccessors()
INTERNAL: This should normally not be used, most sessions do not have specific accessors. |
| public Collection | getAccessors(Call call, AbstractRecord translationRow, DatabaseQuery query)
INTERNAL: Return the connections to use for the query execution. |
| public ExposedNodeLinkedList | |
| public Session | getActiveSession()
Implements org. |
| public UnitOfWork | getActiveUnitOfWork()
Implements org. |
| public Map | |
| public List | |
| public AsOfClause | Returns: An immutable object representation of the past time.null if no clause set, or this a regular session.Implements org. |
| public Map | |
| public AbstractSession | |
| 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. |
| public ClassDescriptor | getClassDescriptor(Object domainObject)
Implements org. |
| public ClassDescriptor | getClassDescriptorForAlias(String alias)
Implements org. |
| public CommandManager | Returns: The CommandManager instance that controls the remote command service for this sessionImplements org. |
| public CommitManager | getCommitManager()
INTERNAL: The commit manager is used to resolve referential integrity on commits of multiple objects. |
| public Login | getDatasourceLogin()
Implements org. |
| public Platform | getDatasourcePlatform()
Implements abstract org. Implements org. |
| public Vector | getDefaultReadOnlyClasses()
INTERNAL: Returns the set of read-only classes that gets assigned to each newly created UnitOfWork. |
| public ReferenceMode | getDefaultReferenceMode()
Implements org. |
| public ClassDescriptor | getDescriptor(Class<?> theClass)
Implements org. |
| public ClassDescriptor | getDescriptor(Object domainObject)
Implements org. |
| public ClassDescriptor | Returns: The descriptor for the alias ornull if no descriptor was found.The descriptor alias. alias)Implements org. |
| public Map | getDescriptors()
Implements abstract org. Implements org. |
| public SessionEventManager | getEventManager()
Implements org. |
| public ExceptionHandler | getExceptionHandler()
Implements org. |
| 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 accessormay store session name or reference class for brokers case query)INTERNAL: Gets the session which this query will be executed on. |
| public ExternalTransactionController | getExternalTransactionController()
Implements org. |
| public Object | getId(Object domainObject)
Implements org. |
| public IdentityMapAccessor | getIdentityMapAccessor()
Implements org. |
| public IdentityMapAccessor | getIdentityMapAccessorInstance()
INTERNAL: Return the internally available IdentityMapAccessor instance. |
| public <T> InjectionManager | |
| public IntegrityChecker | getIntegrityChecker()
Implements org. |
| public List | getJPAQueries()
Implements org. |
| public List | |
| public ClassLoader | |
| public Writer | getLog()
Implements org. |
| public DatabaseLogin | getLogin()
Implements org. |
| public int | Returns: the log levelthe string representation of a EclipseLink category, e.g. "sql", "transaction" ... category)Implements org. Return the log level |
| public int | Returns: the log levelImplements org. Return the log level |
| public String | |
| public ClassDescriptor | getMappedSuperclass(String className)
INTERNAL: Return the mapped superclass descriptor if one exists for the given class name. |
| public Set | getMultitenantContextProperties()
PUBLIC: Return a set of multitenant context properties this session |
| public String | getName()
Implements org. |
| public long | |
| public Number | getNextSequenceNumberValue(Class<?> domainClass)
Implements org. |
| public int | |
| public AbstractSession | |
| 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 chaintrue when method calls itself. If the path
starting at canReturnSelf, boolean 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.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 IdentityMaptrue when method calls itself. If the path
starting at canReturnSelf, boolean 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.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. |
| public Integer | |
| public TimeUnit | |
| public DatabasePlatform | getPlatform()
Implements org. |
| public Platform | getPlatform(Class<?> domainClass)
Implements abstract org. |
| public SessionProfiler | getProfiler()
Implements org. |
| public Project | getProject()
Implements org. |
| public Map | getProperties()
Implements org. |
| public Object | getProperty(String name)
Implements org. |
| public Map | getQueries()
Implements org. |
| public DatabaseQuery | getQuery(String name)
Implements org. |
| public DatabaseQuery | getQuery(String name, List<E> arguments)
Implements org. |
| public DatabaseQuery | |
| public DatabaseQuery | |
| public JPAQueryBuilder | |
| public int | |
| 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 | |
| public Serializer | getSerializer()
Implements org. |
| public ServerPlatform | getServerPlatform()
Implements org. |
| public AbstractSession | |
| public AbstractSession | |
| public SessionLog | getSessionLog()
Implements org. |
| public String | |
| public String | getStaticMetamodelClass(String modelClassName)
INTERNAL: Return the static metamodel class associated with the given model class if available. |
| public List | |
| public List | |
| 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. |
| public Object | handleSevere(RuntimeException exception)
Implements org. |
| public boolean | |
| public boolean | |
| public boolean | hasDescriptor(Class<?> theClass)
Implements org. |
| public boolean | |
| public boolean | hasExceptionHandler()
Implements org. |
| public boolean | hasExternalTransactionController()
Implements org. |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | incrementProfile(String operationName)
Implements org. |
| public void | incrementProfile(String operationName, DatabaseQuery query)
INTERNAL: Updates the count of SessionProfiler event |
| public void | |
| public void | |
| 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 | |
| public boolean | |
| public boolean | isClassReadOnly(Class<?> theClass, ClassDescriptor descriptor)
INTERNAL: Return if the class is defined as read-only. |
| public boolean | isClientSession()
Implements org. |
| public boolean | |
| public boolean | isConnected()
Implements org. |
| 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. |
| public boolean | isDistributedSession()
Implements org. |
| 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. |
| public boolean | |
| public boolean | |
| public boolean | isInProfile()
Implements org. |
| public boolean | isInTransaction()
PUBLIC: Return if the session is currently in the progress of a database transaction. |
| public boolean | |
| public boolean | isJPAQueriesProcessed()
INTERNAL: used to see if JPA Queries have been processed during initialization |
| public boolean | |
| public boolean | |
| public boolean | isRemoteSession()
Implements org. |
| public boolean | isRemoteUnitOfWork()
Implements org. |
| public boolean | isServerSession()
Implements org. |
| public boolean | isSessionBroker()
Implements org. |
| public boolean | |
| public boolean | isUnitOfWork()
Implements org. |
| 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. |
| public void | |
| public void | |
| 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 | |
| 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. |
| 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. |
| 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 | |
| public Vector | 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. |
| public void | |
| protected void | processJPAQuery(DatabaseQuery jpaQuery)
INTERNAL: Process the JPA named query into an EclipseLink Session query. |
| public Vector | readAllObjects(Class<?> domainClass)
Implements org. |
| public Vector | 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 | readAllObjects(Class<?> referenceClass, Call aCall)
Implements org. |
| public Vector | readAllObjects(Class<?> domainClass, Expression expression)
Implements org. |
| public Object | readObject(Class<?> domainClass)
Implements org. |
| 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. |
| public Object | readObject(Class<?> domainClass, Expression expression)
Implements org. |
| public Object | readObject(Object object)
Implements org. |
| 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. |
| public void | |
| public void | |
| 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 | |
| public void | releaseUnitOfWork(UnitOfWorkImpl unitOfWork)
INTERNAL: Release the unit of work, if lazy release the connection. |
| public void | removeProperty(String property)
Implements org. |
| public void | removeQuery(String queryName)
Implements org. |
| 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 | |
| public void | |
| public void | |
| public void | setCommandManager(CommandManager
The CommandManager instance to control the remote command
service for this session mgr)Implements org. |
| public void | setCommitManager(CommitManager commitManager)
INTERNAL: The commit manager is used to resolve referncial integrity on commits of multiple objects. |
| public void | |
| public void | setDefaultReferenceMode(ReferenceMode defaultReferenceMode)
Implements org. |
| public void | |
| public void | setExceptionHandler(ExceptionHandler exceptionHandler)
Implements org. |
| public void | setExternalTransactionController(ExternalTransactionController externalTransactionController)
Implements org. |
| public void | |
| public void | setIntegrityChecker(IntegrityChecker integrityChecker)
Implements org. |
| public void | |
| public void | setIsFinalizersEnabled(boolean isFinalizersEnabled)
Implements org. |
| public void | |
| public void | |
| public void | setJPAQueriesProcessed(boolean jpaQueriesProcessed)
INTERNAL: used to set if JPA Queries have been processed during initialization |
| public void | setLog(Writer log)
Implements org. |
| public void | setLoggingOff(final boolean
Logging is turned off when loggingOff)true
and turned on when false.INTERNAL: PERF: Used for quick turning logging ON/OFF entirely. |
| public void | |
| public void | |
| public void | setLogLevel(int
the new log level level)Implements org. Set the log level |
| public void | setName(String name)
Implements org. |
| protected void | |
| public void | setPartitioningPolicy(PartitioningPolicy partitioningPolicy)
Implements org. |
| public void | setPessimisticLockTimeoutDefault(Integer pessimisticLockTimeoutDefault)
PUBLIC: Set the default pessimistic lock timeout value. |
| public void | |
| public void | setProfiler(SessionProfiler profiler)
Implements org. |
| 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. |
| public void | |
| public void | |
| public void | setQueryTimeoutDefault(int queryTimeoutDefault)
Implements org. |
| public void | setQueryTimeoutUnitDefault(TimeUnit queryTimeoutUnitDefault)
Implements org. |
| public void | |
| public void | setSerializer(Serializer serializer)
Implements org. |
| public void | setSessionLog(SessionLog sessionLog)
Implements org. |
| 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 | |
| public boolean | |
| public boolean | Returns: true if the given message level will be loggedthe log request level level, String the string representation of a EclipseLink category category)Implements org. Check if a message of the given level would actually be logged. |
| public boolean | shouldLogMessages()
Implements org. |
| public boolean | shouldLogMessages(int
A log constant that is one of LOG_ERROR, LOG_WARNING, LOG_INFO, LOG_DEBUG logLevel)Implements org. |
| 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 notPUBLIC: 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 | startOperationProfile(String operationName)
Implements org. |
| public void | startOperationProfile(String operationName, DatabaseQuery query, int weight)
INTERNAL: Start the operation timing. |
| public String | |
| public Object | |
| 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. |
| public void | |
| public void | validateCache()
Implements org. |
| 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 | |
| public boolean | wasJTSTransactionInternallyStarted()
INTERNAL: Return if a JTS transaction was started by the session. |
| public Object | |
| 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. |