Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
ArticleCommentDAO Class Reference
Inheritance diagram for ArticleCommentDAO:
DAO

Public Member Functions

_returnArticleCommentFromRow ($row)
 
 deleteArticleComment ($articleComment)
 
 deleteArticleCommentById ($commentId)
 
 deleteArticleComments ($articleId)
 
getArticleCommentById ($commentId)
 
getArticleComments ($articleId, $commentType=null, $assocId=null)
 
getArticleCommentsByUserId ($userId)
 
 getInsertArticleCommentId ()
 
 getMostRecentArticleComment ($articleId, $commentType=null, $assocId=null)
 
 insertArticleComment (&$articleComment)
 
 updateArticleComment ($articleComment)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying ArticleComment objects.

See Also
ArticleComment

Definition at line 19 of file ArticleCommentDAO.inc.php.

Member Function Documentation

& ArticleCommentDAO::_returnArticleCommentFromRow (   $row)

Creates and returns an article comment object from a row

Parameters
$rowarray
Returns
ArticleComment object

Definition at line 143 of file ArticleCommentDAO.inc.php.

References HookRegistry\call(), and DAO\datetimeFromDB().

Referenced by getArticleCommentById(), getArticleComments(), getArticleCommentsByUserId(), and getMostRecentArticleComment().

ArticleCommentDAO::deleteArticleComment (   $articleComment)

removes an article comment from article_comments table

Parameters
ArticleCommentobject

Definition at line 202 of file ArticleCommentDAO.inc.php.

References deleteArticleCommentById().

ArticleCommentDAO::deleteArticleCommentById (   $commentId)

removes an article note by id

Parameters
noteIdint

Definition at line 210 of file ArticleCommentDAO.inc.php.

References DAO\update().

Referenced by deleteArticleComment().

ArticleCommentDAO::deleteArticleComments (   $articleId)

Delete all comments for an article.

Parameters
$articleIdint

Definition at line 220 of file ArticleCommentDAO.inc.php.

References DAO\update().

& ArticleCommentDAO::getArticleCommentById (   $commentId)

Retrieve Article Comment by comment id

Parameters
$commentIdint
Returns
ArticleComment object

Definition at line 125 of file ArticleCommentDAO.inc.php.

References _returnArticleCommentFromRow(), and DAO\retrieve().

& ArticleCommentDAO::getArticleComments (   $articleId,
  $commentType = null,
  $assocId = null 
)

Retrieve ArticleComments by article id

Parameters
$articleIdint
$commentTypeint
Returns
ArticleComment objects array

Definition at line 26 of file ArticleCommentDAO.inc.php.

References _returnArticleCommentFromRow(), and DAO\retrieve().

& ArticleCommentDAO::getArticleCommentsByUserId (   $userId)

Retrieve ArticleComments by user id

Parameters
$userIdint
Returns
ArticleComment objects array

Definition at line 62 of file ArticleCommentDAO.inc.php.

References _returnArticleCommentFromRow(), and DAO\retrieve().

ArticleCommentDAO::getInsertArticleCommentId ( )

Get the ID of the last inserted article comment.

Returns
int

Definition at line 194 of file ArticleCommentDAO.inc.php.

References DAO\getInsertId().

Referenced by insertArticleComment().

ArticleCommentDAO::getMostRecentArticleComment (   $articleId,
  $commentType = null,
  $assocId = null 
)

Retrieve most recent ArticleComment

Parameters
$articleIdint
$commentTypeint
Returns
ArticleComment

Definition at line 86 of file ArticleCommentDAO.inc.php.

References _returnArticleCommentFromRow(), and DAO\retrieveLimit().

ArticleCommentDAO::insertArticleComment ( $articleComment)

inserts a new article comment into article_comments table

Parameters
ArticleCommentobject
Returns
Article Comment Id int

Definition at line 167 of file ArticleCommentDAO.inc.php.

References DAO\datetimeToDB(), getInsertArticleCommentId(), String\substr(), and DAO\update().

ArticleCommentDAO::updateArticleComment (   $articleComment)

updates an article comment

Parameters
ArticleCommentobject

Definition at line 230 of file ArticleCommentDAO.inc.php.

References DAO\datetimeToDB(), String\substr(), and DAO\update().


The documentation for this class was generated from the following file: