Exemplo n.º 1
0
 public static Set<Entity> getSingletons(Resource res) {
   Set<Entity> singletons = new HashSet<Entity>();
   for (Entity entidad : ModelUtils.<Entity>getVisibleNodes(LedPackage.Literals.ENTITY, res)) {
     if (LedEntidadUtils.esSingleton(entidad)) singletons.add(entidad);
   }
   return singletons;
 }
Exemplo n.º 2
0
 public static List<Attribute> getAllDirectAttributes(Entity entidad) {
   List<Attribute> attrs = new ArrayList<Attribute>();
   while (entidad != null) {
     LedEntidadUtils.addId(entidad);
     for (Attribute attr : entidad.getAttributes()) {
       attrs.add(attr);
     }
     entidad = entidad.getExtends();
   }
   return attrs;
 }