private VSSnellen retrieveCodeFromID(String id) { VSSnellenCollection coll = LookupHelper.getVSSnellen(domain.getLookupService()); VSSnellen type = null; Integer val = null; try { val = Integer.valueOf(id); } catch (NumberFormatException e) { return null; } for (int i = 0; i < coll.size(); i++) { type = coll.get(i); if (type.getID() == val.intValue()) break; } return type; }
VSSnellen retrieveCodeFromID(String id) { VSSnellenCollection coll = LookupHelper.getVSSnellen(domain.getLookupService()); VSSnellen type = null; Integer val = null; try { val = Integer.valueOf(id); } catch(NumberFormatException e) { return null; } for(int i=0;i<coll.size();i++) { type = coll.get(i); if(type.getID() == val.intValue()) break; } return type; }
VSSnellen retrieveCodeFromText(String text) { VSSnellenCollection coll = LookupHelper.getVSSnellen(domain.getLookupService()); VSSnellen type = null; for (int i = 0; i < coll.size(); i++) { type = coll.get(i); if (type.getText().equals(text)) break; } return type; }