private Entity getEntity(String entityName, Model model) { EList<Package> packages = model.getPackages(); for (Package pkg : packages) { for (Entity entity : pkg.getEntities()) {} } return null; }
private Entity searchEntity(Model model, String enitityName) { for (Package pkg : model.getPackages()) { for (Entity entity : pkg.getEntities()) { if (entity.getName().equals(enitityName)) return entity; } } throw new RuntimeException("No entity found with name " + enitityName); }
public List<String> idObjectsMDClasses(Model model) { EList<Package> packages = model.getPackages(); List<String> result = new ArrayList<String>(); for (Package pkg : packages) { for (Entity entity : pkg.getEntities()) { result.add(entity.getName() + "MD"); } } return result; }