id property
The Id aggregates all identifier attributes or parent references. If the concept has none, returns null.
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;
}