}
$adList = new AdList();
- $adList->getConditionBuilder()->add('ad.adID IN (?)', array($this->parameters['data']['structure'][0]));
+ $adList->setObjectIDs($this->parameters['data']['structure'][0]);
if ($adList->countObjects() != count($this->parameters['data']['structure'][0])) {
throw new UserInputException('structure');
}
// get attachments from database (check thumbnail status)
$attachmentList = new AttachmentList();
- $attachmentList->getConditionBuilder()->add('attachment.attachmentID IN (?)', array($attachmentIDs));
+ $attachmentList->setObjectIDs($attachmentIDs);
$attachmentList->readObjects();
foreach ($attachmentList as $attachment) {
// fetch comments
$commentList = new CommentList();
- $commentList->getConditionBuilder()->add("comment.commentID IN (?)", array($commentIDs));
+ $commentList->setObjectIDs($commentIDs);
$commentList->readObjects();
$comments = $commentList->getObjects();
// fetch last responses
if (!empty($responseIDs)) {
$responseList = new CommentResponseList();
- $responseList->getConditionBuilder()->add("comment_response.responseID IN (?)", array(array_keys($responseIDs)));
+ $responseList->setObjectIDs(array_keys($responseIDs));
$responseList->readObjects();
foreach ($responseList as $response) {
}
$commentList = new CommentList();
- $commentList->getConditionBuilder()->add("comment.commentID IN (?)", array($commentIDs));
+ $commentList->setObjectIDs($commentIDs);
$commentList->readObjects();
$comments = $commentList->getObjects();
}
$noticeList = new NoticeList();
- $noticeList->getConditionBuilder()->add('notice.noticeID IN (?)', array($this->parameters['data']['structure'][0]));
+ $noticeList->setObjectIDs($this->parameters['data']['structure'][0]);
if ($noticeList->countObjects() != count($this->parameters['data']['structure'][0])) {
throw new UserInputException('structure');
}
*/
public static function getUsers(array $userIDs) {
$userList = new UserList();
- $userList->getConditionBuilder()->add("user_table.userID IN (?)", array($userIDs));
+ $userList->setObjectIDs($userIDs);
$userList->readObjects();
return $userList->getObjects();
$userIDs = $responses = array();
if (!empty($responseIDs)) {
$responseList = new CommentResponseList();
- $responseList->getConditionBuilder()->add("comment_response.responseID IN (?)", array($responseIDs));
+ $responseList->setObjectIDs($responseIDs);
$responseList->readObjects();
$responses = $responseList->getObjects();
// fetch comments
$commentList = new CommentList();
- $commentList->getConditionBuilder()->add("comment.commentID IN (?)", array($commentIDs));
+ $commentList->setObjectIDs($commentIDs);
$commentList->readObjects();
$comments = $commentList->getObjects();
// fetch comments
$commentList = new CommentList();
- $commentList->getConditionBuilder()->add("comment.commentID IN (?)", array($objectIDs));
+ $commentList->setObjectIDs($objectIDs);
$commentList->readObjects();
$comments = $commentList->getObjects();
// fetch responses
$responseList = new CommentResponseList();
- $responseList->getConditionBuilder()->add("comment_response.responseID IN (?)", array($objectIDs));
+ $responseList->setObjectIDs($objectIDs);
$responseList->readObjects();
$responses = $responseList->getObjects();
if (!empty($commentIDs)) {
$commentList = new CommentList();
- $commentList->getConditionBuilder()->add("comment.commentID IN (?)", array($commentIDs));
+ $commentList->setObjectIDs($commentIDs);
$commentList->readObjects();
$comments = $commentList->getObjects();
}
*/
public function getPolls(array $pollIDs) {
$pollList = new PollList();
- $pollList->getConditionBuilder()->add("poll.pollID IN (?)", array($pollIDs));
+ $pollList->setObjectIDs($pollIDs);
$pollList->readObjects();
$polls = $pollList->getObjects();
// fetch user id and username
$userList = new UserList();
- $userList->getConditionBuilder()->add("user_table.userID IN (?)", array($objectIDs));
+ $userList->setObjectIDs($objectIDs);
$userList->readObjects();
$users = $userList->getObjects();
// fetch responses
$responseList = new CommentResponseList();
- $responseList->getConditionBuilder()->add("comment_response.responseID IN (?)", array($responseIDs));
+ $responseList->setObjectIDs($responseIDs);
$responseList->readObjects();
$responses = $responseList->getObjects();
}
if (!empty($commentIDs)) {
$commentList = new CommentList();
- $commentList->getConditionBuilder()->add("comment.commentID IN (?)", array($commentIDs));
+ $commentList->setObjectIDs($commentIDs);
$commentList->readObjects();
$comments = $commentList->getObjects();
}
}
if (!empty($userIDs)) {
$userList = new UserProfileList();
- $userList->getConditionBuilder()->add("user_table.userID IN (?)", array($userIDs));
+ $userList->setObjectIDs($userIDs);
$userList->readObjects();
$users = $userList->getObjects();
}
// fetch comments
$commentList = new CommentList();
- $commentList->getConditionBuilder()->add("comment.commentID IN (?)", array($commentIDs));
+ $commentList->setObjectIDs($commentIDs);
$commentList->readObjects();
$comments = $commentList->getObjects();
}
if (!empty($userIDs)) {
$userList = new UserProfileList();
- $userList->getConditionBuilder()->add("user_table.userID IN (?)", array($userIDs));
+ $userList->setObjectIDs($userIDs);
$userList->readObjects();
$users = $userList->getObjects();
}
if (empty($userIDs)) return;
$userList = new UserList();
- $userList->getConditionBuilder()->add('user_table.userID IN (?)', array($userIDs));
+ $userList->setObjectIDs($userIDs);
$userList->readObjects();
$assignments = UserGroupAssignmentCacheBuilder::getInstance()->getData();
$this->userIDs = array_unique($this->userIDs);
$userList = new UserList();
- $userList->getConditionBuilder()->add('user_table.userID IN (?)', array($this->userIDs));
+ $userList->setObjectIDs($this->userIDs);
$userList->readObjects();
$this->users = $userList->getObjects();
}