public QueryDescriptor.QueryMode getMode() {
return mode;
}
public ViewCriteria toViewCriteria(final ViewObject vo) {
final ViewCriteria retval = vo.createViewCriteria();
retval.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
retval.setConjunction(ConjunctionCriterion.Conjunction.OR == getConjunction() ?
ViewCriteriaComponent.VC_CONJ_OR : ViewCriteriaComponent.VC_CONJ_AND);
for (Criterion crit : criteria) {
if (crit instanceof AttributeCriterionImpl) {
final AttributeCriterionImpl attrCrit = (AttributeCriterionImpl) crit;
attrCrit.addViewCriteriaRow(retval, getConjunction());