Codota Logo
SessionImpl.autoFlushIfRequired
Code IndexAdd Codota to your IDE (free)

How to use
autoFlushIfRequired
method
in
org.hibernate.impl.SessionImpl

Best Java code snippets using org.hibernate.impl.SessionImpl.autoFlushIfRequired (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: hibernate/hibernate

private QueryTranslator[] prepareQueries(QueryTranslator[] q) {
  HashSet qs = new HashSet();
  for ( int i = 0; i < q.length; i++ ) {
    qs.addAll( q[i].getQuerySpaces() );
  }
  autoFlushIfRequired(qs);
  return q;
}
origin: hibernate/hibernate

public ScrollableResults scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) 
throws HibernateException {
  if ( log.isTraceEnabled() ) {
    log.trace( "scroll SQL query: " + customQuery.getSQL() );
  }
  CustomLoader loader = new CustomLoader( customQuery, getFactory() );
  autoFlushIfRequired( loader.getQuerySpaces() );
  dontFlushFromFind++; //stops flush being called multiple times if this method is recursively called
  try {
    return loader.scroll(queryParameters, this);
  }
  finally {
    dontFlushFromFind--;
  }
}
origin: hibernate/hibernate

public ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException {
  if ( log.isTraceEnabled() ) {
    log.trace( "scroll: " + query );
    queryParameters.traceParameters( factory );
  }
  QueryTranslator[] q = factory.getQuery( query, false, getEnabledFilters() );
  if ( q.length != 1 ) throw new QueryException( "implicit polymorphism not supported for scroll() queries" );
  autoFlushIfRequired( q[0].getQuerySpaces() );
  dontFlushFromFind++; //stops flush being called multiple times if this method is recursively called
  try {
    return q[0].scroll(queryParameters, this);
  }
  finally {
    dontFlushFromFind--;
  }
}
origin: hibernate/hibernate

public List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) 
throws HibernateException {
  if ( log.isTraceEnabled() ) log.trace( "SQL query: " + customQuery.getSQL() );
  
  CustomLoader loader = new CustomLoader( customQuery, getFactory() );
  autoFlushIfRequired( loader.getQuerySpaces() );
  dontFlushFromFind++;
  boolean success = false;
  try {
    List results = loader.list(this, queryParameters);
    success = true;
    return results;
  }
  finally {
    dontFlushFromFind--;
    afterOperation(success);
  }
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException {
  errorIfClosed();
  checkTransactionSynchStatus();
  HQLQueryPlan plan = getHQLQueryPlan( query, false );
  autoFlushIfRequired( plan.getQuerySpaces() );
  dontFlushFromFind++;
  try {
    return plan.performScroll( queryParameters, this );
  }
  finally {
    dontFlushFromFind--;
  }
}
origin: hibernate/hibernate

autoFlushIfRequired(spaces);
origin: jboss.jboss-embeddable-ejb3/hibernate-all

autoFlushIfRequired(spaces);
origin: hibernate/hibernate

public ScrollableResults scroll(CriteriaImpl criteria, ScrollMode scrollMode) {
  String entityName = criteria.getEntityOrClassName();
  CriteriaLoader loader = new CriteriaLoader(
      getOuterJoinLoadable(entityName),
      factory,
      criteria,
      entityName,
      getEnabledFilters()
  );
  autoFlushIfRequired( loader.getQuerySpaces() );
  dontFlushFromFind++;
  try {
    return loader.scroll(this, scrollMode);
  }
  finally {
    dontFlushFromFind--;
  }
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public int executeUpdate(String query, QueryParameters queryParameters) throws HibernateException {
  errorIfClosed();
  checkTransactionSynchStatus();
  queryParameters.validateParameters();
  HQLQueryPlan plan = getHQLQueryPlan( query, false );
  autoFlushIfRequired( plan.getQuerySpaces() );
  boolean success = false;
  int result = 0;
  try {
    result = plan.performExecuteUpdate( queryParameters, this );
    success = true;
  }
  finally {
    afterOperation(success);
  }
  return result;
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public int executeNativeUpdate(NativeSQLQuerySpecification nativeQuerySpecification,
    QueryParameters queryParameters) throws HibernateException {
  errorIfClosed();
  checkTransactionSynchStatus();
  queryParameters.validateParameters();
  NativeSQLQueryPlan plan = getNativeSQLQueryPlan(nativeQuerySpecification);
  
  autoFlushIfRequired( plan.getCustomQuery().getQuerySpaces() );
  
  boolean success = false;
  int result = 0;
  try {
    result = plan.performExecuteUpdate(queryParameters, this);
    success = true;
  } finally {
    afterOperation(success);
  }
  return result;
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public List list(String query, QueryParameters queryParameters) throws HibernateException {
  errorIfClosed();
  checkTransactionSynchStatus();
  queryParameters.validateParameters();
  HQLQueryPlan plan = getHQLQueryPlan( query, false );
  autoFlushIfRequired( plan.getQuerySpaces() );
  List results = CollectionHelper.EMPTY_LIST;
  boolean success = false;
  dontFlushFromFind++;   //stops flush being called multiple times if this method is recursively called
  try {
    results = plan.performList( queryParameters, this );
    success = true;
  }
  finally {
    dontFlushFromFind--;
    afterOperation(success);
  }
  return results;
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public ScrollableResults scroll(CriteriaImpl criteria, ScrollMode scrollMode) {
  errorIfClosed();
  checkTransactionSynchStatus();
  String entityName = criteria.getEntityOrClassName();
  CriteriaLoader loader = new CriteriaLoader(
      getOuterJoinLoadable(entityName),
      factory,
      criteria,
      entityName,
      getEnabledFilters()
  );
  autoFlushIfRequired( loader.getQuerySpaces() );
  dontFlushFromFind++;
  try {
    return loader.scroll(this, scrollMode);
  }
  finally {
    dontFlushFromFind--;
  }
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public Iterator iterate(String query, QueryParameters queryParameters) throws HibernateException {
  errorIfClosed();
  checkTransactionSynchStatus();
  queryParameters.validateParameters();
  HQLQueryPlan plan = getHQLQueryPlan( query, true );
  autoFlushIfRequired( plan.getQuerySpaces() );
  dontFlushFromFind++; //stops flush being called multiple times if this method is recursively called
  try {
    return plan.performIterate( queryParameters, this );
  }
  finally {
    dontFlushFromFind--;
  }
}
origin: hibernate/hibernate

if ( autoFlushIfRequired( filterTranslator.getQuerySpaces() ) ) {
origin: jboss.jboss-embeddable-ejb3/hibernate-all

if ( autoFlushIfRequired( plan.getQuerySpaces() ) ) {
org.hibernate.implSessionImplautoFlushIfRequired

Javadoc

detect in-memory changes, determine if the changes are to tables named in the query and, if so, complete execution the flush

Popular methods of SessionImpl

  • getFactory
  • <init>
    Constructor used in building "child sessions".
  • afterOperation
    Check if there is a Hibernate or JTA transaction in progress and, if there is not, flush if necessar
  • cleanup
    clear all the internal collections, just to help the garbage collector, does not clear anything that
  • clear
  • close
  • delete
  • find
    Retrieve a list of persistent objects using a hibernate query
  • flush
  • get
  • getConnectionReleaseMode
  • getEnabledFilters
  • getConnectionReleaseMode,
  • getEnabledFilters,
  • getFlushMode,
  • getOuterJoinLoadable,
  • getProxyIdentifier,
  • guessEntityName,
  • isAutoCloseSessionEnabled,
  • iterate,
  • list

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
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