Examples of toFragmentString()


Examples of org.hibernate.sql.ConditionFragment.toFragmentString()

    else {
      // A COMPOSITE KEY...
      final ConditionFragment keyRestrictionBuilder = new ConditionFragment()
          .setTableAlias( alias )
          .setCondition( keyColumnNames, "?" );
      final String keyRestrictionFragment = keyRestrictionBuilder.toFragmentString();

      StringBuilder restrictions = new StringBuilder();
      if ( batchSize==1 ) {
        // for no batching, use "foo = ? and bar = ?"
        restrictions.append( keyRestrictionFragment );
View Full Code Here

Examples of org.hibernate.sql.ConditionFragment.toFragmentString()

          .setCondition( columnNames, "?" );
 
      StringBuilder whereString = new StringBuilder();
      if ( batchSize==1 ) {
        // if no batch, use "foo = ? and bar = ?"
        whereString.append( byId.toFragmentString() );
      }
      else {
        // if a composite key, use "( (foo = ? and bar = ?) or (foo = ? and bar = ?) )" for batching
        whereString.append('('); //TODO: unnecessary for databases with ANSI-style joins
        DisjunctionFragment df = new DisjunctionFragment();
View Full Code Here

Examples of org.hibernate.sql.ConditionFragment.toFragmentString()

    return String.format(
        "? %s (select count(*) from %s where %s)",
        op,
        cp.getTableName(),
        subQueryRestriction.toFragmentString()
    );
  }

  @Override
  public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
View Full Code Here

Examples of org.hibernate.sql.ConditionFragment.toFragmentString()

          .setCondition( columnNames, "?" );
 
      StringBuffer whereString = new StringBuffer();
      if ( batchSize==1 ) {
        // if no batch, use "foo = ? and bar = ?"
        whereString.append( byId.toFragmentString() );
      }
      else {
        // if a composite key, use "( (foo = ? and bar = ?) or (foo = ? and bar = ?) )" for batching
        whereString.append('('); //TODO: unnecessary for databases with ANSI-style joins
        DisjunctionFragment df = new DisjunctionFragment();
View Full Code Here

Examples of org.hibernate.sql.ConditionFragment.toFragmentString()

          .setCondition( columnNames, "?" );
 
      StringBuffer whereString = new StringBuffer();
      if ( batchSize==1 ) {
        // if no batch, use "foo = ? and bar = ?"
        whereString.append( byId.toFragmentString() );
      }
      else {
        // if a composite key, use "( (foo = ? and bar = ?) or (foo = ? and bar = ?) )" for batching
        whereString.append('('); //TODO: unnecessary for databases with ANSI-style joins
        DisjunctionFragment df = new DisjunctionFragment();
View Full Code Here

Examples of org.hibernate.sql.DisjunctionFragment.toFragmentString()

        restrictions.append( '(' );
        DisjunctionFragment df = new DisjunctionFragment();
        for ( int i=0; i<batchSize; i++ ) {
          df.addCondition( keyRestrictionFragment );
        }
        restrictions.append( df.toFragmentString() );
        restrictions.append( ')' );
      }
      select.appendRestrictions( restrictions.toString() );
    }
  }
View Full Code Here

Examples of org.hibernate.sql.DisjunctionFragment.toFragmentString()

        whereString.append('('); //TODO: unnecessary for databases with ANSI-style joins
        DisjunctionFragment df = new DisjunctionFragment();
        for ( int i=0; i<batchSize; i++ ) {
          df.addCondition(byId);
        }
        whereString.append( df.toFragmentString() );
        whereString.append(')'); //TODO: unnecessary for databases with ANSI-style joins
      }
      return whereString;
    }
  }
View Full Code Here

Examples of org.hibernate.sql.DisjunctionFragment.toFragmentString()

        whereString.append('('); //TODO: unnecessary for databases with ANSI-style joins
        DisjunctionFragment df = new DisjunctionFragment();
        for ( int i=0; i<batchSize; i++ ) {
          df.addCondition(byId);
        }
        whereString.append( df.toFragmentString() );
        whereString.append(')'); //TODO: unnecessary for databases with ANSI-style joins
      }
      return whereString;
    }
  }
View Full Code Here

Examples of org.hibernate.sql.DisjunctionFragment.toFragmentString()

        whereString.append('('); //TODO: unnecessary for databases with ANSI-style joins
        DisjunctionFragment df = new DisjunctionFragment();
        for ( int i=0; i<batchSize; i++ ) {
          df.addCondition(byId);
        }
        whereString.append( df.toFragmentString() );
        whereString.append(')'); //TODO: unnecessary for databases with ANSI-style joins
      }
      return whereString;
    }
  }
View Full Code Here

Examples of org.hibernate.sql.InFragment.toFragmentString()

        if ( !queryable.isAbstract() ) frag.addValue( queryable.getDiscriminatorSQLValue() );
      }

      StringBuffer buf = new StringBuffer(50)
        .append(" and ")
        .append( frag.toFragmentString() );

      return buf.toString();
    }
    else {
      return "";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.