setAttributesFrom method

bool setAttributesFrom(
  1. Entity<Entity> entity
)

Implementation

bool setAttributesFrom(Entity entity) {
  bool allSet = true;
  if (entity.whenSet?.millisecondsSinceEpoch != null &&
      whenSet?.millisecondsSinceEpoch != null &&
      (whenSet!.millisecondsSinceEpoch <
          entity.whenSet!.millisecondsSinceEpoch)) {
    for (Attribute attribute in _concept!.nonIdentifierAttributes) {
      var newValue = entity.getAttribute(attribute.code!);
      var attributeSet = setAttribute(attribute.code!, newValue);
      if (!attributeSet) {
        allSet = false;
      }
    }
  } else {
    allSet = false;
  }
  return allSet;
}