/**
  *
  * @param ProjectModel $projectModel
  * @param int          $newerThanTimestamp
  */
 public function __construct($projectModel, $newerThanTimestamp = null)
 {
     if (!is_null($newerThanTimestamp)) {
         $startDate = new \MongoDate($newerThanTimestamp);
         parent::__construct(self::mapper($projectModel->databaseName()), array('dateModified' => array('$gte' => $startDate)), array());
     } else {
         parent::__construct(self::mapper($projectModel->databaseName()), array('name' => array('$regex' => '')));
     }
 }
 /**
  * @param ProjectModel $projectModel
  * @param string       $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->id = new Id();
     $this->content = '';
     $this->regarding = new SemDomTransFieldReference();
     $this->entryRef = new Id();
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }
 /**
  * @param ProjectModel $projectModel
  * @param string       $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->setReadOnlyProp('authorInfo');
     $this->setReadOnlyProp('replies');
     $this->setReadOnlyProp('score');
     $this->setReadOnlyProp('status');
     $this->setPrivateProp('isDeleted');
     $this->id = new Id();
     $this->entryRef = new IdReference();
     $this->isDeleted = false;
     $this->replies = new ArrayOf(function ($data) {
         return new LexCommentReply();
     });
     $this->status = self::STATUS_OPEN;
     $this->score = 0;
     $this->authorInfo = new AuthorInfo();
     $this->regarding = new LexCommentFieldReference();
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }