Package org.hibernate

Examples of org.hibernate.FlushMode


      }
    }
  }

  public static FlushMode getFlushMode(Object value) {
    FlushMode flushMode = null;
    if (value instanceof FlushMode) {
      flushMode = (FlushMode) value;
    }
    else if (value instanceof javax.persistence.FlushModeType) {
      flushMode = ConfigurationHelper.getFlushMode( (javax.persistence.FlushModeType) value);
View Full Code Here


   * JPA 2.0. This method can then return null.
   * If it returns null, do em.unwrap(Session.class).getFlushMode() to get the
   * Hibernate flush mode
   */
  public FlushModeType getFlushMode() {
    FlushMode mode = getSession().getFlushMode();
    if ( mode == FlushMode.AUTO ) {
      return FlushModeType.AUTO;
    }
    else if ( mode == FlushMode.COMMIT ) {
      return FlushModeType.COMMIT;
View Full Code Here

      }
    }
  }

  public static FlushMode getFlushMode(Object value) {
    FlushMode flushMode = null;
    if (value instanceof FlushMode) {
      flushMode = (FlushMode) value;
    }
    else if (value instanceof javax.persistence.FlushModeType) {
      flushMode = ConfigurationHelper.getFlushMode( (javax.persistence.FlushModeType) value);
View Full Code Here

      throwPersistenceException( he );
    }
  }

  public FlushModeType getFlushMode() {
    FlushMode mode = getSession().getFlushMode();
    if ( mode == FlushMode.AUTO ) {
      this.flushModeType = FlushModeType.AUTO;
    }
    else if ( mode == FlushMode.COMMIT ) {
      this.flushModeType = FlushModeType.COMMIT;
View Full Code Here

    if ( queryAnn == null ) return;
    if ( BinderHelper.isDefault( queryAnn.name() ) ) {
      throw new AnnotationException( "A named query must have a name when used in class or package level" );
    }

    FlushMode flushMode;
    flushMode = getFlushMode( queryAnn.flushMode() );

    NamedQueryDefinition query = new NamedQueryDefinition(
        queryAnn.query(),
        queryAnn.cacheable(),
View Full Code Here

    mappings.addQuery( queryAnn.name(), query );
    if ( log.isInfoEnabled() ) log.info( "Binding named query: " + queryAnn.name() + " => " + queryAnn.query() );
  }

  private static FlushMode getFlushMode(FlushModeType flushModeType) {
    FlushMode flushMode;
    switch ( flushModeType ) {
      case ALWAYS:
        flushMode = FlushMode.ALWAYS;
        break;
      case AUTO:
View Full Code Here

      }
    }
  }

  public static FlushMode getFlushMode(Object value) {
    FlushMode flushMode = null;
    if (value instanceof FlushMode) {
      flushMode = (FlushMode) value;
    }
    else if (value instanceof javax.persistence.FlushModeType) {
      flushMode = ConfigurationHelper.getFlushMode( (javax.persistence.FlushModeType) value);
View Full Code Here

   * JPA 2.0. This method can then return null.
   * If it returns null, do em.unwrap(Session.class).getFlushMode() to get the
   * Hibernate flush mode
   */
  public FlushModeType getFlushMode() {
    FlushMode mode = getSession().getFlushMode();
    if ( mode == FlushMode.AUTO ) {
      return FlushModeType.AUTO;
    }
    else if ( mode == FlushMode.COMMIT ) {
      return FlushModeType.COMMIT;
View Full Code Here

      }
    }
  }

  public static FlushMode getFlushMode(Object value) {
    FlushMode flushMode = null;
    if (value instanceof FlushMode) {
      flushMode = (FlushMode) value;
    }
    else if (value instanceof javax.persistence.FlushModeType) {
      flushMode = ConfigurationHelper.getFlushMode( (javax.persistence.FlushModeType) value);
View Full Code Here

    Integer fetchSize = getInteger( hints, QueryHints.FETCH_SIZE, name );
    if ( fetchSize != null && fetchSize < 0 ) {
      fetchSize = null;
    }

    FlushMode flushMode = getFlushMode( hints, QueryHints.FLUSH_MODE, name );
    CacheMode cacheMode = getCacheMode( hints, QueryHints.CACHE_MODE, name );

    boolean readOnly = getBoolean( hints, QueryHints.READ_ONLY, name );

    String comment = getString( hints, QueryHints.COMMENT );
View Full Code Here

TOP

Related Classes of org.hibernate.FlushMode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.