@Override public String toString() { return "AllRestriction [restrictions=" + getRestrictions() + "]"; } }
@Override public String toString() { return "AllRestriction [restrictions=" + getRestrictions() + "]"; } }
@Override public void visitAll(final AllRestriction restriction) { for (final Restriction r : restriction.getRestrictions()) { r.visit(this); } } @Override public void visitAllComplete(final AllRestriction restriction) {}
@Override public void visitAll(final AllRestriction restriction) { for (final Restriction r : restriction.getRestrictions()) { r.visit(this); } } @Override public void visitAllComplete(final AllRestriction restriction) {}
@Override public void visitAllComplete(final AllRestriction restriction) { final int restrictionSize = restriction.getRestrictions().size(); final int criterionSize = m_criterions.size(); if (criterionSize < restrictionSize) { throw new IllegalStateException("AllRestriction with " + restrictionSize + " entries encountered, but we only have " + criterionSize + " criterions!"); } final List<Criterion> criterions = m_criterions.subList(criterionSize - restrictionSize, criterionSize); final Junction j = org.hibernate.criterion.Restrictions.conjunction(); for (final Criterion crit : criterions) { j.add(crit); } criterions.clear(); m_criterions.add(j); }
@Override public void visit(final RestrictionVisitor visitor) { visitor.visitAll(this); for (final Restriction restriction : getRestrictions()) { restriction.visit(visitor); } visitor.visitAllComplete(this); }
@Override public void visit(final RestrictionVisitor visitor) { visitor.visitAll(this); for (final Restriction restriction : getRestrictions()) { restriction.visit(visitor); } visitor.visitAllComplete(this); }