Methods Summary |
---|
public org.hibernate.criterion.Junction | add(Criterion criterion)
criteria.add(criterion);
return this;
|
public java.lang.String | getOp()
return op;
|
public org.hibernate.engine.TypedValue[] | getTypedValues(org.hibernate.Criteria crit, CriteriaQuery criteriaQuery)
ArrayList typedValues = new ArrayList();
Iterator iter = criteria.iterator();
while ( iter.hasNext() ) {
TypedValue[] subvalues = ( (Criterion) iter.next() ).getTypedValues(crit, criteriaQuery);
for ( int i=0; i<subvalues.length; i++ ) {
typedValues.add( subvalues[i] );
}
}
return (TypedValue[]) typedValues.toArray( new TypedValue[ typedValues.size() ] );
|
public java.lang.String | toSqlString(org.hibernate.Criteria crit, CriteriaQuery criteriaQuery)
if ( criteria.size()==0 ) return "1=1";
StringBuffer buffer = new StringBuffer()
.append('(");
Iterator iter = criteria.iterator();
while ( iter.hasNext() ) {
buffer.append( ( (Criterion) iter.next() ).toSqlString(crit, criteriaQuery) );
if ( iter.hasNext() ) buffer.append(' ").append(op).append(' ");
}
return buffer.append(')").toString();
|
public java.lang.String | toString()
return '(" + StringHelper.join( ' " + op + ' ", criteria.iterator() ) + ')";
|