3 final class PhabricatorCalendarEventInviteeQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery
{
12 public function withIDs(array $ids) {
17 public function withEventPHIDs(array $phids) {
18 $this->eventPHIDs
= $phids;
22 public function withInviteePHIDs(array $phids) {
23 $this->inviteePHIDs
= $phids;
27 public function withInviterPHIDs(array $phids) {
28 $this->inviterPHIDs
= $phids;
32 public function withStatuses(array $statuses) {
33 $this->statuses
= $statuses;
37 protected function loadPage() {
38 $table = new PhabricatorCalendarEventInvitee();
39 $conn_r = $table->establishConnection('r');
43 'SELECT * FROM %T %Q %Q %Q',
44 $table->getTableName(),
45 $this->buildWhereClause($conn_r),
46 $this->buildOrderClause($conn_r),
47 $this->buildLimitClause($conn_r));
49 return $table->loadAllFromArray($data);
52 protected function buildWhereClause(AphrontDatabaseConnection
$conn) {
55 if ($this->ids
!== null) {
62 if ($this->eventPHIDs
!== null) {
69 if ($this->inviteePHIDs
!== null) {
72 'inviteePHID IN (%Ls)',
76 if ($this->inviterPHIDs
!== null) {
79 'inviterPHID IN (%Ls)',
83 if ($this->statuses
!== null) {
90 $where[] = $this->buildPagingClause($conn);
92 return $this->formatWhereClause($conn, $where);
95 public function getQueryApplicationClass() {
96 return 'PhabricatorCalendarApplication';