congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SessionImplementor.setCacheMode
Code IndexAdd Tabnine to your IDE (free)

How to use
setCacheMode
method
in
org.hibernate.engine.spi.SessionImplementor

Best Java code snippets using org.hibernate.engine.spi.SessionImplementor.setCacheMode (Showing top 15 results out of 315)

origin: hibernate/hibernate-orm

@Override
public void setCacheMode(CacheMode cm) {
  delegate.setCacheMode( cm );
}
origin: hibernate/hibernate-orm

private void applyProperties() {
  applyEntityManagerSpecificProperties();
  setHibernateFlushMode( ConfigurationHelper.getFlushMode( properties.get( AvailableSettings.FLUSH_MODE ), FlushMode.AUTO ) );
  setLockOptions( this.properties, this.lockOptions );
  getSession().setCacheMode(
      CacheModeHelper.interpretCacheMode(
          currentCacheStoreMode(),
          currentCacheRetrieveMode()
      )
  );
}
origin: org.jboss.seam/jboss-seam

public void setCacheMode(CacheMode paramCacheMode)
{
 ((SessionImplementor) delegate).setCacheMode(paramCacheMode);      
}
origin: org.hibernate.orm/hibernate-core

@Override
public void setCacheMode(CacheMode cm) {
  delegate.setCacheMode( cm );
}
origin: riotfamily/riot

public void setCacheMode(CacheMode cm) {
  session.setCacheMode(cm);
}
origin: org.hibernate/com.springsource.org.hibernate

  protected void after() {
    if (sessionFlushMode!=null) {
      getSession().setFlushMode(sessionFlushMode);
      sessionFlushMode = null;
    }
    if (sessionCacheMode!=null) {
      getSession().setCacheMode(sessionCacheMode);
      sessionCacheMode = null;
    }
  }
}
origin: org.hibernate/com.springsource.org.hibernate

protected void after() {
  if ( sessionFlushMode != null ) {
    getSession().setFlushMode( sessionFlushMode );
    sessionFlushMode = null;
  }
  if ( sessionCacheMode != null ) {
    getSession().setCacheMode( sessionCacheMode );
    sessionCacheMode = null;
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

protected void after() {
  if ( sessionFlushMode != null ) {
    getSession().setFlushMode( sessionFlushMode );
    sessionFlushMode = null;
  }
  if ( sessionCacheMode != null ) {
    getSession().setCacheMode( sessionCacheMode );
    sessionCacheMode = null;
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

  protected void after() {
    if (sessionFlushMode!=null) {
      getSession().setFlushMode(sessionFlushMode);
      sessionFlushMode = null;
    }
    if (sessionCacheMode!=null) {
      getSession().setCacheMode(sessionCacheMode);
      sessionCacheMode = null;
    }
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

protected void before() {
  if ( flushMode != null ) {
    sessionFlushMode = getSession().getFlushMode();
    getSession().setFlushMode( flushMode );
  }
  if ( cacheMode != null ) {
    sessionCacheMode = getSession().getCacheMode();
    getSession().setCacheMode( cacheMode );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

protected void before() {
  if ( flushMode!=null ) {
    sessionFlushMode = getSession().getFlushMode();
    getSession().setFlushMode(flushMode);
  }
  if ( cacheMode!=null ) {
    sessionCacheMode = getSession().getCacheMode();
    getSession().setCacheMode(cacheMode);
  }
}

origin: org.hibernate/com.springsource.org.hibernate

protected void before() {
  if ( flushMode != null ) {
    sessionFlushMode = getSession().getFlushMode();
    getSession().setFlushMode( flushMode );
  }
  if ( cacheMode != null ) {
    sessionCacheMode = getSession().getCacheMode();
    getSession().setCacheMode( cacheMode );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

protected void before() {
  if ( flushMode!=null ) {
    sessionFlushMode = getSession().getFlushMode();
    getSession().setFlushMode(flushMode);
  }
  if ( cacheMode!=null ) {
    sessionCacheMode = getSession().getCacheMode();
    getSession().setCacheMode(cacheMode);
  }
}

origin: hibernate/hibernate-search

@Override
public void run() {
  log.trace( "started" );
  SessionImplementor session = (SessionImplementor) sessionFactory
      .withOptions()
      .tenantIdentifier( tenantId )
      .openSession();
  session.setHibernateFlushMode( FlushMode.MANUAL );
  session.setCacheMode( cacheMode );
  session.setDefaultReadOnly( true );
  try {
    loadAllFromQueue( session );
  }
  catch (Exception exception) {
    String logMessage = log.massIndexerExceptionWhileTransformingIds();
    //TODO: use an errorHandler instance
    // errorHandler.handleException( logMessage, exception );
    // temporary re-throw the exception as a Runtime
    throw new RuntimeException( logMessage, exception );
  }
  finally {
    producerEndSignal.countDown();
    session.close();
  }
  log.trace( "finished" );
}
origin: hibernate/hibernate-search

@Override
public void run() {
  log.trace( "started" );
  SessionImplementor session = (SessionImplementor) sessionFactory
      .withOptions()
      .tenantIdentifier( tenantId )
      .openSession();
  session.setHibernateFlushMode( FlushMode.MANUAL );
  session.setCacheMode( cacheMode );
  session.setDefaultReadOnly( true );
  try {
    loadAllFromQueue( session );
  }
  catch (Exception exception) {
    errorHandler.handleException( log.massIndexerExceptionWhileTransformingIds(), exception );
  }
  finally {
    producerEndSignal.countDown();
    session.close();
  }
  log.trace( "finished" );
}
org.hibernate.engine.spiSessionImplementorsetCacheMode

Popular methods of SessionImplementor

  • getFactory
    Get the creating SessionFactoryImplementor
  • getTransactionCoordinator
  • connection
  • getPersistenceContext
    Get the persistence context for this session
  • getLoadQueryInfluencers
    Get the load query influencers associated with this session.
  • isTransactionInProgress
    Does this Session have an active Hibernate transaction or is there a JTA transaction in progress?
  • getEntityPersister
    Get the EntityPersister for any instance
  • getJdbcCoordinator
  • isClosed
    Determine whether the session is closed. Provided separately from #isOpen() as this method does not
  • flush
  • getTenantIdentifier
    Match te method on org.hibernate.Session and org.hibernate.StatelessSession
  • generateEntityKey
  • getTenantIdentifier,
  • generateEntityKey,
  • getContextEntityIdentifier,
  • isOpen,
  • bestGuessEntityName,
  • getFlushMode,
  • getSessionFactory,
  • guessEntityName,
  • immediateLoad,
  • initializeCollection

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Menu (java.awt)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JButton (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now