code: @SuppressWarnings("unchecked")
      public List<Instance> getInstances()
          throws EFapsException
      {
          final List<Instance> ret = new ArrayList<>();
          // no value select means, that the from select must be asked
          if (this.valueSelect == null) {
              ret.addAll(this.fromSelect.getMainOneSelect().getInstances());
          } else {
              // if an oid select was given the oid is evaluated
              if ("oid".equals(this.valueSelect.getValueType())) {
                  for (final Object object : this.objectList) {
                      final Instance inst = Instance.get((String) this.valueSelect.getValue(object));
                      if (inst.isValid()) {
                          ret.add(inst);
                      }
                  }
              } else {
                  final List<Long> idTmp;
                  if (this.valueSelect.getParentSelectPart() != null
                                  && this.valueSelect.getParentSelectPart() instanceof LinkToSelectPart) {
                      idTmp = (List<Long>) this.valueSelect.getParentSelectPart().getObject();
                  } else {
                      idTmp = this.idList;
                  }
                  for (final Long id : idTmp) {
                      if (id != null) {
                          ret.add(Instance.get(this.valueSelect.getAttribute().getParent(), String.valueOf(id)));
                      }
                  }
              }
          }
          return ret;
      }
docs: Method returns the instances this OneSelect has returned.
  
  @return Collection of Instances
  @throws EFapsException on error