public Session getSession(EntityMode entityMode) { if ( this.entityMode == entityMode ) { return this; } if ( childSessionsByEntityMode == null ) { childSessionsByEntityMode = new HashMap(); } SessionImpl rtn = (SessionImpl) childSessionsByEntityMode.get( entityMode ); if ( rtn == null ) { rtn = new SessionImpl( this, entityMode ); childSessionsByEntityMode.put( entityMode, rtn ); } return rtn; }
public Session getSession(EntityMode entityMode) { if ( this.entityMode == entityMode ) { return this; } if ( rootSession != null ) { rootSession.getSession( entityMode ); } errorIfClosed(); checkTransactionSynchStatus(); SessionImpl rtn = null; if ( childSessionsByEntityMode == null ) { childSessionsByEntityMode = new HashMap(); } else { rtn = (SessionImpl) childSessionsByEntityMode.get( entityMode ); } if ( rtn == null ) { rtn = new SessionImpl( this, entityMode ); childSessionsByEntityMode.put( entityMode, rtn ); } return rtn; }
public org.hibernate.classic.Session openTemporarySession() throws HibernateException { return new SessionImpl( null, this, true, settings.getCacheProvider().nextTimestamp(), interceptor, settings.getDefaultEntityMode(), false, false, ConnectionReleaseMode.AFTER_STATEMENT ); }
public org.hibernate.classic.Session openSession( final Connection connection, final boolean flushBeforeCompletionEnabled, final boolean autoCloseSessionEnabled, final ConnectionReleaseMode connectionReleaseMode) throws HibernateException { return new SessionImpl( connection, this, true, settings.getCacheProvider().nextTimestamp(), interceptor, settings.getDefaultEntityMode(), flushBeforeCompletionEnabled, autoCloseSessionEnabled, connectionReleaseMode ); }
private SessionImpl openSession( Connection connection, boolean autoClose, long timestamp, Interceptor sessionLocalInterceptor ) { return new SessionImpl( connection, this, autoClose, timestamp, sessionLocalInterceptor == null ? interceptor : sessionLocalInterceptor, settings.getDefaultEntityMode(), settings.isFlushBeforeCompletionEnabled(), settings.isAutoCloseSessionEnabled(), settings.getConnectionReleaseMode() ); }
private SessionImpl openSession( Connection connection, boolean autoClose, long timestamp, Interceptor sessionLocalInterceptor ) { return new SessionImpl( connection, this, autoClose, timestamp, sessionLocalInterceptor, sessionEventListenerConfig, settings.getDefaultEntityMode(), settings.isFlushBeforeCompletionEnabled(), settings.isAutoCloseSessionEnabled(), settings.getConnectionReleaseMode() ); }
currentSession = new SessionImpl( null, this,