public static AppModule findByName(String name) throws ElementNotFoundException, NotEmptyException, DataLengthException { if (name == null || name.length() == 0) throw new NotEmptyException("name cannot be empty"); if (name.length() > 100) throw new DataLengthException("ident parameter is too long (max: 100 carac)"); List<AppModule> elements = AppModule.findAllAppModules(); for (AppModule element : elements) if (element.getName().compareToIgnoreCase(name) == 0) return element; throw new ElementNotFoundException("No Module Object found with name: " + name); }