/**
  * 検索条件の生成
  * @return Criteria
  */
 public function build()
 {
     $criteria = new Criteria();
     // タイトル検索
     if (!empty($this->title)) {
         $criteria->andWhere($criteria->expr()->contains('title', $this->title));
     }
     // ステータス検索
     if ($this->status instanceof TodoStatus) {
         $criteria->andWhere($criteria->expr()->eq('status.value', $this->status->getValue()));
     }
     return $criteria;
 }
 public function build()
 {
     $criteria = new Criteria();
     $status = new TodoStatus();
     $criteria->andWhere($criteria->expr()->eq('status.value', $status->getValue()));
     return $criteria;
 }