Examples of InFragment


Examples of org.hibernate.sql.InFragment

      "";
  }

  private String discriminatorFilterFragment(String alias) throws MappingException {
    if ( needsDiscriminator() ) {
      InFragment frag = new InFragment();

      if ( isDiscriminatorFormula() ) {
        frag.setFormula( alias, getDiscriminatorFormulaTemplate() );
      }
      else {
        frag.setColumn( alias, getDiscriminatorColumnName() );
      }

      String[] subclasses = getSubclassClosure();
      for ( int i=0; i<subclasses.length; i++ ) {
        final Queryable queryable = (Queryable) getFactory().getEntityPersister( subclasses[i] );
        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.