Codota Logo
SessionImplementor.setDefaultReadOnly
Code IndexAdd Codota to your IDE (free)

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

Best Java code snippets using org.hibernate.engine.spi.SessionImplementor.setDefaultReadOnly (Showing top 4 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 setDefaultReadOnly(boolean readOnly) {
  delegate.setDefaultReadOnly( readOnly );
}
origin: org.hibernate.orm/hibernate-core

@Override
public void setDefaultReadOnly(boolean readOnly) {
  delegate.setDefaultReadOnly( readOnly );
}
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.spiSessionImplementorsetDefaultReadOnly

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

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • onCreateOptionsMenu (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JTable (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