Author: andre Date: 2010-06-24 09:19:43 +0200 (Thu, 24 Jun 2010) New Revision: 42666
Modified: mmbase/trunk/bridge/src/main/java/org/mmbase/bridge/util/Queries.java Log: did not build: exact same method twice in this class (copy-paste issue?) Modified: mmbase/trunk/bridge/src/main/java/org/mmbase/bridge/util/Queries.java =================================================================== --- mmbase/trunk/bridge/src/main/java/org/mmbase/bridge/util/Queries.java 2010-06-23 13:12:40 UTC (rev 42665) +++ mmbase/trunk/bridge/src/main/java/org/mmbase/bridge/util/Queries.java 2010-06-24 07:19:43 UTC (rev 42666) @@ -1554,40 +1554,6 @@ /** - * @since MMBase-1.9.4 - */ - public static int applyConstraints(Query q, Step step, Node n) { - NodeManager stepManager = q.getCloud().getNodeManager(step.getTableName()); - if (! (n.getNodeManager().equals(stepManager) || stepManager.getDescendants().contains(n.getNodeManager()))) { - throw new IllegalArgumentException("Node '" + n.getNumber() + "' of type " + n.getNodeManager().getName() + " cannot be part of " + step); - } - for (FieldConstraint constraint : getConstraints(q.getConstraint(), step)) { - if (constraint instanceof FieldValueConstraint) { - FieldValueConstraint fvc = (FieldValueConstraint) constraint; - boolean needsSet = true; - try { - needsSet = ! fvc.matches(fvc.getValue()); - } catch (UnsupportedOperationException ue) { - log.warn(ue); - } - if (needsSet) { - switch (fvc.getOperator()) { - case FieldCompareConstraint.LESS_EQUAL: - case FieldCompareConstraint.EQUAL: - case FieldCompareConstraint.GREATER_EQUAL: - n.setValue(fvc.getField().getFieldName(), fvc.getValue()); - break; - default: - throw new IllegalArgumentException("Don't know how to apply " + fvc); - } - } - } - } - return 0; - - } - - /** * Explores a query object, returns the relations the node has within the query. * * @throws UnsupportedOperationException If it cannot be determined how the node is related. _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs