Package org.hibernate.util

Examples of org.hibernate.util.IdentitySet


    else {
      queryParametersToUse = queryParameters;
    }

    List combinedResults = new ArrayList();
    IdentitySet distinction = new IdentitySet();
    int includedCount = -1;
    translator_loop: for ( int i = 0; i < translators.length; i++ ) {
      List tmp = translators[i].list( session, queryParametersToUse );
      if ( needsLimit ) {
        // NOTE : firstRow is zero-based
        int first = queryParameters.getRowSelection().getFirstRow() == null
                    ? 0
                      : queryParameters.getRowSelection().getFirstRow().intValue();
        int max = queryParameters.getRowSelection().getMaxRows() == null
                    ? -1
                      : queryParameters.getRowSelection().getMaxRows().intValue();
        final int size = tmp.size();
        for ( int x = 0; x < size; x++ ) {
          final Object result = tmp.get( x );
          if ( distinction.add( result ) ) {
            continue;
          }
          includedCount++;
          if ( includedCount < first ) {
            continue;
View Full Code Here


      int max = !hasLimit || queryParameters.getRowSelection().getMaxRows() == null
            ? -1
            : queryParameters.getRowSelection().getMaxRows().intValue();
      int size = results.size();
      List tmp = new ArrayList();
      IdentitySet distinction = new IdentitySet();
      for ( int i = 0; i < size; i++ ) {
        final Object result = results.get( i );
        if ( !distinction.add( result ) ) {
          continue;
        }
        includedCount++;
        if ( includedCount < first ) {
          continue;
View Full Code Here

   * @param event The delete event to be handled.
   *
   * @throws HibernateException
   */
  public void onDelete(DeleteEvent event) throws HibernateException {
    onDelete( event, new IdentitySet() );
  }
View Full Code Here

      int max = !hasLimit || queryParameters.getRowSelection().getMaxRows() == null
            ? -1
            : queryParameters.getRowSelection().getMaxRows().intValue();
      int size = results.size();
      List tmp = new ArrayList();
      IdentitySet distinction = new IdentitySet();
      for ( int i = 0; i < size; i++ ) {
        final Object result = results.get( i );
        if ( !distinction.add( result ) ) {
          continue;
        }
        includedCount++;
        if ( includedCount < first ) {
          continue;
View Full Code Here

  /**
   * apply constraints on a bean instance and return all the failures.
   * if <code>bean</code> is null, an empty array is returned
   */
  public InvalidValue[] getInvalidValues(T bean) {
    return this.getInvalidValues( bean, new IdentitySet() );
  }
View Full Code Here

    else {
      queryParametersToUse = queryParameters;
    }

    List combinedResults = new ArrayList();
    IdentitySet distinction = new IdentitySet();
    int includedCount = -1;
    translator_loop: for ( int i = 0; i < translators.length; i++ ) {
      List tmp = translators[i].list( session, queryParametersToUse );
      if ( needsLimit ) {
        // NOTE : firstRow is zero-based
        int first = queryParameters.getRowSelection().getFirstRow() == null
                    ? 0
                      : queryParameters.getRowSelection().getFirstRow().intValue();
        int max = queryParameters.getRowSelection().getMaxRows() == null
                    ? -1
                      : queryParameters.getRowSelection().getMaxRows().intValue();
        final int size = tmp.size();
        for ( int x = 0; x < size; x++ ) {
          final Object result = tmp.get( x );
          if ( ! distinction.add( result ) ) {
            continue;
          }
          includedCount++;
          if ( includedCount < first ) {
            continue;
View Full Code Here

    else {
      queryParametersToUse = queryParameters;
    }

    List combinedResults = new ArrayList();
    IdentitySet distinction = new IdentitySet();
    int includedCount = -1;
    translator_loop: for ( int i = 0; i < translators.length; i++ ) {
      List tmp = translators[i].list( session, queryParametersToUse );
      if ( needsLimit ) {
        // NOTE : firstRow is zero-based
        int first = queryParameters.getRowSelection().getFirstRow() == null
                    ? 0
                      : queryParameters.getRowSelection().getFirstRow().intValue();
        int max = queryParameters.getRowSelection().getMaxRows() == null
                    ? -1
                      : queryParameters.getRowSelection().getMaxRows().intValue();
        final int size = tmp.size();
        for ( int x = 0; x < size; x++ ) {
          final Object result = tmp.get( x );
          if ( distinction.add( result ) ) {
            continue;
          }
          includedCount++;
          if ( includedCount < first ) {
            continue;
View Full Code Here

   * @param event The delete event to be handled.
   *
   * @throws HibernateException
   */
  public void onDelete(DeleteEvent event) throws HibernateException {
    onDelete( event, new IdentitySet() );
  }
View Full Code Here

      int max = !hasLimit || queryParameters.getRowSelection().getMaxRows() == null
            ? -1
            : queryParameters.getRowSelection().getMaxRows().intValue();
      int size = results.size();
      List tmp = new ArrayList();
      IdentitySet distinction = new IdentitySet();
      for ( int i = 0; i < size; i++ ) {
        final Object result = results.get( i );
        if ( !distinction.add( result ) ) {
          continue;
        }
        includedCount++;
        if ( includedCount < first ) {
          continue;
View Full Code Here

    else {
      queryParametersToUse = queryParameters;
    }

    List combinedResults = new ArrayList();
    IdentitySet distinction = new IdentitySet();
    int includedCount = -1;
    translator_loop: for ( int i = 0; i < translators.length; i++ ) {
      List tmp = translators[i].list( session, queryParametersToUse );
      if ( needsLimit ) {
        // NOTE : firstRow is zero-based
        int first = queryParameters.getRowSelection().getFirstRow() == null
                    ? 0
                      : queryParameters.getRowSelection().getFirstRow().intValue();
        int max = queryParameters.getRowSelection().getMaxRows() == null
                    ? -1
                      : queryParameters.getRowSelection().getMaxRows().intValue();
        final int size = tmp.size();
        for ( int x = 0; x < size; x++ ) {
          final Object result = tmp.get( x );
          if ( distinction.add( result ) ) {
            continue;
          }
          includedCount++;
          if ( includedCount < first ) {
            continue;
View Full Code Here

TOP

Related Classes of org.hibernate.util.IdentitySet

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.