Package org.hibernate.sql

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


          .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

    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

          .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

          .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

          .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

          .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

          .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

          .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

          .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

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.