00001 <?php
00002
00015
00016
00017
00019 define('COMMENT_TYPE_PEER_REVIEW', 0x01);
00020 define('COMMENT_TYPE_EDITOR_DECISION', 0x02);
00021 define('COMMENT_TYPE_COPYEDIT', 0x03);
00022 define('COMMENT_TYPE_LAYOUT', 0x04);
00023 define('COMMENT_TYPE_PROOFREAD', 0x05);
00024
00025 class ArticleComment extends DataObject {
00026
00030 function ArticleComment() {
00031 parent::DataObject();
00032 }
00033
00038 function getCommentId() {
00039 return $this->getData('commentId');
00040 }
00041
00046 function setCommentId($commentId) {
00047 return $this->setData('commentId', $commentId);
00048 }
00049
00054 function getCommentType() {
00055 return $this->getData('commentType');
00056 }
00057
00062 function setCommentType($commentType) {
00063 return $this->setData('commentType', $commentType);
00064 }
00065
00070 function getRoleId() {
00071 return $this->getData('roleId');
00072 }
00073
00078 function setRoleId($roleId) {
00079 return $this->setData('roleId', $roleId);
00080 }
00081
00086 function getRoleName() {
00087 $roleDao = &DAORegistry::getDAO('RoleDAO');
00088 $roleName = $roleDao->getRoleName($this->getData('roleId'));
00089
00090 return $roleName;
00091 }
00092
00097 function getArticleId() {
00098 return $this->getData('articleId');
00099 }
00100
00105 function setArticleId($articleId) {
00106 return $this->setData('articleId', $articleId);
00107 }
00108
00113 function getAssocId() {
00114 return $this->getData('assocId');
00115 }
00116
00121 function setAssocId($assocId) {
00122 return $this->setData('assocId', $assocId);
00123 }
00124
00129 function getAuthorId() {
00130 return $this->getData('authorId');
00131 }
00132
00137 function setAuthorId($authorId) {
00138 return $this->setData('authorId', $authorId);
00139 }
00140
00145 function getAuthorName() {
00146 $authorFullName =& $this->getData('authorFullName');
00147
00148 if(!isset($authorFullName)) {
00149 $userDao = &DAORegistry::getDAO('UserDAO');
00150 $authorFullName = $userDao->getUserFullName($this->getAuthorId(), true);
00151 }
00152
00153 return $authorFullName ? $authorFullName : '';
00154 }
00155
00160 function getAuthorEmail() {
00161 $authorEmail =& $this->getData('authorEmail');
00162
00163 if(!isset($authorEmail)) {
00164 $userDao = &DAORegistry::getDAO('UserDAO');
00165 $authorEmail = $userDao->getUserEmail($this->getAuthorId(), true);
00166 }
00167
00168 return $authorEmail ? $authorEmail : '';
00169 }
00170
00175 function getCommentTitle() {
00176 return $this->getData('commentTitle');
00177 }
00178
00183 function setCommentTitle($commentTitle) {
00184 return $this->setData('commentTitle', $commentTitle);
00185 }
00186
00191 function getComments() {
00192 return $this->getData('comments');
00193 }
00194
00199 function setComments($comments) {
00200 return $this->setData('comments', $comments);
00201 }
00202
00207 function getDatePosted() {
00208 return $this->getData('datePosted');
00209 }
00210
00215 function setDatePosted($datePosted) {
00216 return $this->setData('datePosted', $datePosted);
00217 }
00218
00223 function getDateModified() {
00224 return $this->getData('dateModified');
00225 }
00226
00231 function setDateModified($dateModified) {
00232 return $this->setData('dateModified', $dateModified);
00233 }
00234
00239 function getViewable() {
00240 return $this->getData('viewable');
00241 }
00242
00247 function setViewable($viewable) {
00248 return $this->setData('viewable', $viewable);
00249 }
00250 }
00251
00252 ?>