ExampleQuerier.java :  » Web-Framework » RSF » uk » org » ponder » mapping » Java Open Source

Java Open Source » Web Framework » RSF 
RSF » uk » org » ponder » mapping » ExampleQuerier.java
/*
 * Created on Dec 14, 2004
 */
package uk.org.ponder.mapping;

import uk.org.ponder.saxalizer.AccessMethod;

/**
 * @author Antranig Basman (antranig@caret.cam.ac.uk)
 * 
 */
public class ExampleQuerier {
  public static boolean match(Object query, Object totest, AccessMethod[] fields) {
    for (int i = 0; i < fields.length; ++ i) {
      Object querychild = fields[i].getChildObject(query);
      if (querychild != null) {
        Object testchild = fields[i].getChildObject(totest);
        if (!querychild.equals(testchild)) return false;
      }
    }
    return true;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.