}
final int aFieldNameListSize = aFieldNameList.length;
final int theGivenValueListSize = theGivenValueList.size();
if(aFieldNameListSize != theGivenValueListSize)
{
throw new WPISuiteException("Too few fields or values given");
}
Method[] allMethods = anObjectQueried.getMethods();
int i=0;
List<Method> methodsToBeSaved = new ArrayList<Method>();
while(i < aFieldNameListSize){
for(Method m: allMethods){//Cycles through all of the methods in the class anObjectQueried
if(i == aFieldNameListSize){
//do nothing
}
else if(m.getName().equalsIgnoreCase("get" + aFieldNameList[i])){
methodsToBeSaved.add(m); //saves the method called "get" + aFieldName
i++;
}
}
}
final List<Method> theGetter = methodsToBeSaved;
if(theGetter.size() == 0){
logger.log(Level.WARNING, "Getter method was null during retrieve attempt");
throw new WPISuiteException("Null getter method.");
}
final int theGettersSize = theGetter.size();
int j = 0;
List<Model> fullresult = new ArrayList<Model>();
List<Model> result = new ArrayList<Model>();