@Override
public Defect[] getEntity(Session s, String id) throws NotFoundException {
final int intId = Integer.parseInt(id);
if(intId < 1) {
throw new NotFoundException();
}
Defect[] defects = null;
try {
defects = db.retrieve(Defect.class, "id", intId, s.getProject()).toArray(new Defect[0]);
} catch (WPISuiteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(defects.length < 1 || defects[0] == null) {
throw new NotFoundException();
}
return defects;
}