try {
JoinFragment join = joinSequence.toJoinFragment( enabledFilters, true );
return new StringBuffer( "select " )
.append( StringHelper.join( ", ", columns ) )
.append( " from " )
.append( join.toFromFragmentString().substring( 2 ) )// remove initial ", "
.append( " where " )
.append( join.toWhereFragmentString().substring( 5 ) )// remove initial " and "
.toString();
}
catch ( MappingException me ) {
throw new QueryException( me );
}