Package org.grails.orm.hibernate
Class AbstractHibernateSession
java.lang.Object
org.grails.datastore.mapping.core.AbstractAttributeStoringSession
org.grails.orm.hibernate.AbstractHibernateSession
- All Implemented Interfaces:
org.grails.datastore.mapping.core.Session,org.grails.datastore.mapping.query.api.QueryAliasAwareSession,org.grails.datastore.mapping.query.QueryCreator
- Direct Known Subclasses:
HibernateSession
public abstract class AbstractHibernateSession
extends org.grails.datastore.mapping.core.AbstractAttributeStoringSession
implements org.grails.datastore.mapping.query.api.QueryAliasAwareSession
Session implementation that wraps a Hibernate
Session.- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected AbstractHibernateDatastoreprotected IHibernateTemplateFields inherited from class org.grails.datastore.mapping.core.AbstractAttributeStoringSession
attributes, sessionPropertyMap -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractHibernateSession(AbstractHibernateDatastore hibernateDatastore, org.hibernate.SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.grails.datastore.mapping.transactions.Transactionorg.grails.datastore.mapping.transactions.TransactionbeginTransaction(org.springframework.transaction.TransactionDefinition definition) voidclear()voidbooleanvoidvoidvoidvoidflush()org.grails.datastore.mapping.core.Datastoreabstract jakarta.persistence.FlushModeTypeprotected CollectiongetIterableAsCollection(Iterable objects) org.grails.datastore.mapping.model.MappingContextorg.grails.datastore.mapping.engine.Persisterorg.grails.datastore.mapping.transactions.Transactionbooleanbooleanbooleanboolean<T> Tlock(Class<T> type, Serializable key) void<T> Tproxy(Class<T> type, Serializable key) void<T> Tretrieve(Class<T> type, Serializable key) retrieveAll(Class type, Serializable... keys) voidsetSynchronizedWithTransaction(boolean synchronizedWithTransaction) voidMethods inherited from class org.grails.datastore.mapping.core.AbstractAttributeStoringSession
clearSessionProperty, getAttribute, getSessionProperty, removeAttributesForEntity, setAttribute, setSessionPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.grails.datastore.mapping.query.api.QueryAliasAwareSession
createQueryMethods inherited from interface org.grails.datastore.mapping.core.Session
clearSessionProperty, createQuery, deleteAll, getAttribute, getObjectIdentifier, getSessionProperty, retrieveAll, setAttribute, setFlushMode, setSessionProperty, updateAll
-
Field Details
-
datastore
-
connected
protected boolean connected -
hibernateTemplate
-
-
Constructor Details
-
AbstractHibernateSession
protected AbstractHibernateSession(AbstractHibernateDatastore hibernateDatastore, org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
isSchemaless
public boolean isSchemaless()- Specified by:
isSchemalessin interfaceorg.grails.datastore.mapping.query.QueryCreator
-
insert
- Specified by:
insertin interfaceorg.grails.datastore.mapping.core.Session
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceorg.grails.datastore.mapping.core.Session- Overrides:
isConnectedin classorg.grails.datastore.mapping.core.AbstractAttributeStoringSession
-
disconnect
public void disconnect()- Specified by:
disconnectin interfaceorg.grails.datastore.mapping.core.Session- Overrides:
disconnectin classorg.grails.datastore.mapping.core.AbstractAttributeStoringSession
-
beginTransaction
public org.grails.datastore.mapping.transactions.Transaction beginTransaction()- Specified by:
beginTransactionin interfaceorg.grails.datastore.mapping.core.Session
-
beginTransaction
public org.grails.datastore.mapping.transactions.Transaction beginTransaction(org.springframework.transaction.TransactionDefinition definition) - Specified by:
beginTransactionin interfaceorg.grails.datastore.mapping.core.Session
-
getMappingContext
public org.grails.datastore.mapping.model.MappingContext getMappingContext()- Specified by:
getMappingContextin interfaceorg.grails.datastore.mapping.core.Session
-
persist
- Specified by:
persistin interfaceorg.grails.datastore.mapping.core.Session
-
refresh
- Specified by:
refreshin interfaceorg.grails.datastore.mapping.core.Session
-
attach
- Specified by:
attachin interfaceorg.grails.datastore.mapping.core.Session
-
flush
public void flush()- Specified by:
flushin interfaceorg.grails.datastore.mapping.core.Session
-
clear
public void clear()- Specified by:
clearin interfaceorg.grails.datastore.mapping.core.Session
-
clear
- Specified by:
clearin interfaceorg.grails.datastore.mapping.core.Session
-
contains
- Specified by:
containsin interfaceorg.grails.datastore.mapping.core.Session
-
lock
- Specified by:
lockin interfaceorg.grails.datastore.mapping.core.Session
-
unlock
- Specified by:
unlockin interfaceorg.grails.datastore.mapping.core.Session
-
persist
- Specified by:
persistin interfaceorg.grails.datastore.mapping.core.Session
-
retrieve
- Specified by:
retrievein interfaceorg.grails.datastore.mapping.core.Session
-
proxy
- Specified by:
proxyin interfaceorg.grails.datastore.mapping.core.Session
-
lock
- Specified by:
lockin interfaceorg.grails.datastore.mapping.core.Session
-
delete
- Specified by:
deletein interfaceorg.grails.datastore.mapping.core.Session
-
getIterableAsCollection
-
delete
- Specified by:
deletein interfaceorg.grails.datastore.mapping.core.Session
-
retrieveAll
- Specified by:
retrieveAllin interfaceorg.grails.datastore.mapping.core.Session
-
getPersister
- Specified by:
getPersisterin interfaceorg.grails.datastore.mapping.core.Session
-
getTransaction
public org.grails.datastore.mapping.transactions.Transaction getTransaction()- Specified by:
getTransactionin interfaceorg.grails.datastore.mapping.core.Session
-
hasTransaction
public boolean hasTransaction()- Specified by:
hasTransactionin interfaceorg.grails.datastore.mapping.core.Session
-
getDatastore
public org.grails.datastore.mapping.core.Datastore getDatastore()- Specified by:
getDatastorein interfaceorg.grails.datastore.mapping.core.Session
-
isDirty
- Specified by:
isDirtyin interfaceorg.grails.datastore.mapping.core.Session
-
getNativeInterface
- Specified by:
getNativeInterfacein interfaceorg.grails.datastore.mapping.core.Session
-
setSynchronizedWithTransaction
public void setSynchronizedWithTransaction(boolean synchronizedWithTransaction) - Specified by:
setSynchronizedWithTransactionin interfaceorg.grails.datastore.mapping.core.Session
-
getFlushMode
public abstract jakarta.persistence.FlushModeType getFlushMode()- Specified by:
getFlushModein interfaceorg.grails.datastore.mapping.core.Session
-