@Override public String getUuid() { return delegate.getUuid(); }
protected void prepareForPossibleLoadingOutsideTransaction() { if ( session != null ) { allowLoadOutsideTransaction = session.getFactory().getSessionFactoryOptions().isInitializeLazyStateOutsideTransactionsEnabled(); if ( allowLoadOutsideTransaction && sessionFactoryUuid == null ) { sessionFactoryUuid = session.getFactory().getUuid(); } } }
public final void setSession(SharedSessionContractImplementor session) { this.session = session; if ( session != null && !allowLoadOutsideTransaction ) { this.allowLoadOutsideTransaction = session.getFactory().getSessionFactoryOptions().isInitializeLazyStateOutsideTransactionsEnabled(); if ( this.allowLoadOutsideTransaction ) { this.sessionFactoryUuid = session.getFactory().getUuid(); } } }
/** * Initialize internal state based on the currently attached session, * in order to be ready to load data even after the proxy is detached from the session. * * This method only has any effect if * {@link SessionFactoryOptions#isInitializeLazyStateOutsideTransactionsEnabled()} is {@code true}. */ protected void prepareForPossibleLoadingOutsideTransaction() { if ( session != null ) { allowLoadOutsideTransaction = session.getFactory().getSessionFactoryOptions().isInitializeLazyStateOutsideTransactionsEnabled(); if ( allowLoadOutsideTransaction && sessionFactoryUuid == null ) { sessionFactoryUuid = session.getFactory().getUuid(); } } }
/** * Used by TypeFactory scoping. * * @param factory The SessionFactory that the TypeFactory is being bound to */ void setSessionFactory(SessionFactoryImplementor factory) { if ( this.sessionFactory != null ) { log.scopingTypesToSessionFactoryAfterAlreadyScoped( this.sessionFactory, factory ); } else { this.sessionFactoryUuid = factory.getUuid(); String sfName = factory.getSessionFactoryOptions().getSessionFactoryName(); if ( sfName == null ) { final CfgXmlAccessService cfgXmlAccessService = factory.getServiceRegistry() .getService( CfgXmlAccessService.class ); if ( cfgXmlAccessService.getAggregatedConfig() != null ) { sfName = cfgXmlAccessService.getAggregatedConfig().getSessionFactoryName(); } } this.sessionFactoryName = sfName; } this.sessionFactory = factory; }
@Override public String getUuid() { return delegate.getUuid(); }
protected void prepareForPossibleLoadingOutsideTransaction() { if ( session != null ) { allowLoadOutsideTransaction = session.getFactory().getSessionFactoryOptions().isInitializeLazyStateOutsideTransactionsEnabled(); if ( allowLoadOutsideTransaction && sessionFactoryUuid == null ) { sessionFactoryUuid = session.getFactory().getUuid(); } } }
public final void setSession(SharedSessionContractImplementor session) { this.session = session; if ( session != null && !allowLoadOutsideTransaction ) { this.allowLoadOutsideTransaction = session.getFactory().getSessionFactoryOptions().isInitializeLazyStateOutsideTransactionsEnabled(); if ( this.allowLoadOutsideTransaction ) { this.sessionFactoryUuid = session.getFactory().getUuid(); } } }
/** * Initialize internal state based on the currently attached session, * in order to be ready to load data even after the proxy is detached from the session. * * This method only has any effect if * {@link SessionFactoryOptions#isInitializeLazyStateOutsideTransactionsEnabled()} is {@code true}. */ protected void prepareForPossibleLoadingOutsideTransaction() { if ( session != null ) { allowLoadOutsideTransaction = session.getFactory().getSessionFactoryOptions().isInitializeLazyStateOutsideTransactionsEnabled(); if ( allowLoadOutsideTransaction && sessionFactoryUuid == null ) { sessionFactoryUuid = session.getFactory().getUuid(); } } }
/** * Used by TypeFactory scoping. * * @param factory The SessionFactory that the TypeFactory is being bound to */ void setSessionFactory(SessionFactoryImplementor factory) { if ( this.sessionFactory != null ) { log.scopingTypesToSessionFactoryAfterAlreadyScoped( this.sessionFactory, factory ); } else { this.sessionFactoryUuid = factory.getUuid(); String sfName = factory.getSessionFactoryOptions().getSessionFactoryName(); if ( sfName == null ) { final CfgXmlAccessService cfgXmlAccessService = factory.getServiceRegistry() .getService( CfgXmlAccessService.class ); if ( cfgXmlAccessService.getAggregatedConfig() != null ) { sfName = cfgXmlAccessService.getAggregatedConfig().getSessionFactoryName(); } } this.sessionFactoryName = sfName; } this.sessionFactory = factory; }