public void add( Clause clause )
{
// Check if we should merge to consecutive WHERE clauses
if ( !clauses.isEmpty() && clause instanceof WhereClause )
{
WhereClause previousWhere = lastClause(WhereClause.class);
if ( previousWhere != null )
{
previousWhere.mergeWith( (WhereClause) clause );
return;
}
}
clauses.add( clause );