コード例 #1
0
  public Collection<ObjRelationship> allRelationships() {
    if (subentities == null) {
      return entity.getRelationships();
    }

    Collection<ObjRelationship> c = new ArrayList<ObjRelationship>();
    appendDeclaredRelationships(c);

    // add base relationships if any
    ObjEntity superEntity = entity.getSuperEntity();
    if (superEntity != null) {
      c.addAll(superEntity.getRelationships());
    }

    return c;
  }
コード例 #2
0
  public Collection<ObjAttribute> allAttributes() {
    if (subentities == null) {
      return entity.getAttributes();
    }

    Collection<ObjAttribute> c = new ArrayList<ObjAttribute>();
    appendDeclaredAttributes(c);

    // add base attributes if any
    ObjEntity superEntity = entity.getSuperEntity();
    if (superEntity != null) {
      c.addAll(superEntity.getAttributes());
    }

    return c;
  }