Package cz.cvut.kbss.jopa.sessions
Class ServerSession
java.lang.Object
cz.cvut.kbss.jopa.sessions.AbstractSession
cz.cvut.kbss.jopa.sessions.ServerSession
- All Implemented Interfaces:
ConfigurationHolder,MetamodelProvider,Wrapper
The ServerSession is the primary interface for accessing the ontology.
It manages an accessor object, which performs the queries.
-
Field Summary
Fields inherited from class cz.cvut.kbss.jopa.sessions.AbstractSession
configuration -
Constructor Summary
ConstructorsConstructorDescriptionServerSession(OntologyStorageProperties storageProperties, Configuration configuration, MetamodelImpl metamodel) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConnectionWrapperAcquires connection to the underlying ontology storage.acquireUnitOfWork(Configuration configuration) Acquires aUnitOfWorkinstance to perform transactional operations.voidclose()Close the server session and all connections to the underlying data source.Gets aCriteriaBuilderinstance for building Criteria API queries.Get the current live object cache.Gets the metamodelbooleanisEntityType(Class<?> cls) Checks whether the specified class is an entity type.voidvoid<T> TUnwraps implementation of the specified class.Methods inherited from class cz.cvut.kbss.jopa.sessions.AbstractSession
getConfigurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cz.cvut.kbss.jopa.sessions.MetamodelProvider
getNamedQueryManager, getResultSetMappingManager
-
Constructor Details
-
ServerSession
public ServerSession(OntologyStorageProperties storageProperties, Configuration configuration, MetamodelImpl metamodel)
-
-
Method Details
-
acquireUnitOfWork
Acquires aUnitOfWorkinstance to perform transactional operations.- Returns:
- UnitOfWork instance
-
acquireConnection
Description copied from class:AbstractSessionAcquires connection to the underlying ontology storage.- Specified by:
acquireConnectionin classAbstractSession- Returns:
- Connection
-
getLiveObjectCache
Description copied from class:AbstractSessionGet the current live object cache.This manager represents the second level cache.
- Specified by:
getLiveObjectCachein classAbstractSession- Returns:
- Second level cache manager
-
transactionStarted
-
transactionFinished
-
close
public void close()Close the server session and all connections to the underlying data source. -
getMetamodel
Description copied from interface:MetamodelProviderGets the metamodel- Specified by:
getMetamodelin interfaceMetamodelProvider- Returns:
- Metamodel
-
isEntityType
Description copied from interface:MetamodelProviderChecks whether the specified class is an entity type.- Specified by:
isEntityTypein interfaceMetamodelProvider- Parameters:
cls- The class to check- Returns:
- Whether type is managed
-
getCriteriaBuilder
Description copied from class:AbstractSessionGets aCriteriaBuilderinstance for building Criteria API queries.- Specified by:
getCriteriaBuilderin classAbstractSession- Returns:
- Criteria query builder
-
unwrap
Description copied from interface:WrapperUnwraps implementation of the specified class.
-