Changeset View
Changeset View
Standalone View
Standalone View
src/applications/nuance/query/NuanceItemCommandQuery.php
<?php | <?php | ||||
final class NuanceItemCommandQuery | final class NuanceItemCommandQuery | ||||
extends NuanceQuery { | extends NuanceQuery { | ||||
private $ids; | private $ids; | ||||
private $itemPHIDs; | private $itemPHIDs; | ||||
private $statuses; | |||||
public function withIDs(array $ids) { | public function withIDs(array $ids) { | ||||
$this->ids = $ids; | $this->ids = $ids; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withItemPHIDs(array $item_phids) { | public function withItemPHIDs(array $item_phids) { | ||||
$this->itemPHIDs = $item_phids; | $this->itemPHIDs = $item_phids; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withStatuses(array $statuses) { | |||||
$this->statuses = $statuses; | |||||
return $this; | |||||
} | |||||
public function newResultObject() { | public function newResultObject() { | ||||
return new NuanceItemCommand(); | return new NuanceItemCommand(); | ||||
} | } | ||||
protected function loadPage() { | protected function loadPage() { | ||||
return $this->loadStandardPage($this->newResultObject()); | return $this->loadStandardPage($this->newResultObject()); | ||||
} | } | ||||
Show All 9 Lines | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
if ($this->itemPHIDs !== null) { | if ($this->itemPHIDs !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'itemPHID IN (%Ls)', | 'itemPHID IN (%Ls)', | ||||
$this->itemPHIDs); | $this->itemPHIDs); | ||||
} | } | ||||
if ($this->statuses !== null) { | |||||
$where[] = qsprintf( | |||||
$conn, | |||||
'status IN (%Ls)', | |||||
$this->statuses); | |||||
} | |||||
return $where; | return $where; | ||||
} | } | ||||
} | } |