Codota Logo
SessionImplementor.setCacheMode
Code IndexAdd Codota 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)

  • Common ways to obtain SessionImplementor
private void myMethod () {
SessionImplementor s =
  • Codota IconEntityManager entityManager;entityManager.unwrap(SessionImplementor.class)
  • Codota IconFlushEntityEvent flushEntityEvent;flushEntityEvent.getSession()
  • Codota IconLazyInitializer lazyInitializer;lazyInitializer.getSession()
  • Smart code suggestions by Codota
}
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

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JOptionPane (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now