id property

  1. @override
Id? id
override

Implementation

@override
Id? get id {
  if (_concept == null) {
    return null;
    // throw new ConceptException('Entity concept is not defined.');
  }
  Id id = Id(_concept!);
  for (Parent p in _concept!.parents.whereType<Parent>()) {
    if (p.identifier) {
      id.setReference(p.code!, _referenceMap[p.code!]);
    }
  }
  for (Attribute a in _concept!.attributes.whereType<Attribute>()) {
    if (a.identifier) {
      id.setAttribute(a.code!, _attributeMap[a.code!]);
    }
  }
  if (id.length == 0) {
    return null;
  }
  return id;
}