/**
  * @param string[] $row
  * @param Header|null $obj
  * @return Header
  */
 public static function fromStorageRow(array $row, $obj = null)
 {
     /** @var $obj Header */
     $obj = parent::fromStorageRow($row, $obj);
     $obj->workflowId = UUID::create($row['rev_type_id']);
     return $obj;
 }
 /**
  * @var string[] $row
  * @var PostRevision|null $obj
  * @return PostRevision
  * @throws DataModelException
  */
 public static function fromStorageRow(array $row, $obj = null)
 {
     /** @var $obj PostRevision */
     $obj = parent::fromStorageRow($row, $obj);
     $treeRevId = UUID::create($row['tree_rev_id']);
     if (!$obj->revId->equals($treeRevId)) {
         throw new DataModelException('tree revision doesn\'t match provided revision: ' . $treeRevId->getAlphadecimal() . ' != ' . $obj->revId->getAlphadecimal(), 'process-data');
     }
     $obj->replyToId = UUID::create($row['tree_parent_id']);
     $obj->postId = UUID::create($row['rev_type_id']);
     $obj->origUser = UserTuple::newFromArray($row, 'tree_orig_user_');
     if (!$obj->origUser) {
         throw new DataModelException('Could not create UserTuple for tree_orig_user_');
     }
     return $obj;
 }