1 package org.hibernate.sql; 3 4 8 public class DisjunctionFragment { 9 10 private StringBuffer buffer = new StringBuffer (); 11 12 public DisjunctionFragment addCondition(ConditionFragment fragment) { 13 if ( buffer.length()>0 ) buffer.append(" or "); 14 buffer.append("(") 15 .append( fragment.toFragmentString() ) 16 .append(")"); 17 return this; 18 } 19 20 public String toFragmentString() { 21 return buffer.toString(); 22 } 23 } 24 | Popular Tags |