CommentDAO Class Reference
[Paper]

Operations for retrieving and modifying Comment objects. More...

List of all members.

Public Member Functions

& _returnCommentFromRow ($row, $childLevels=0)
 decrementChildCount ($commentId)
 deleteComment (&$comment, $isRecursing=false)
 deleteCommentsByPaper ($paperId)
& getComment ($commentId, $paperId, $childLevels=0)
& getCommentsByParentId ($parentId, $childLevels=0)
& getCommentsByUserId ($userId)
 getInsertCommentId ()
& getRootCommentsByPaperId ($paperId, $childLevels=0)
 incrementChildCount ($commentId)
 insertComment (&$comment)
 updateComment (&$comment)


Detailed Description

Operations for retrieving and modifying Comment objects.

See also:
Comment

Definition at line 22 of file CommentDAO.inc.php.


Member Function Documentation

& CommentDAO._returnCommentFromRow ( $  row,
$  childLevels = 0 
)

Creates and returns a paper comment object from a row

Parameters:
$row array
Returns:
Comment object

Definition at line 112 of file CommentDAO.inc.php.

References getCommentsByParentId().

Referenced by getComment(), getCommentsByParentId(), getCommentsByUserId(), and getRootCommentsByPaperId().

CommentDAO.decrementChildCount ( $  commentId  ) 

Decrease the current count of child comments for the specified comment.

Parameters:
commentId int

Definition at line 192 of file CommentDAO.inc.php.

Referenced by deleteComment().

CommentDAO.deleteComment ( &$  comment,
$  isRecursing = false 
)

removes a paper comment from paper_comments table

Parameters:
Comment object

Definition at line 200 of file CommentDAO.inc.php.

References decrementChildCount().

CommentDAO.deleteCommentsByPaper ( $  paperId  ) 

removes paper comments by paper ID

Parameters:
Comment object

Definition at line 212 of file CommentDAO.inc.php.

& CommentDAO.getComment ( $  commentId,
$  paperId,
$  childLevels = 0 
)

Retrieve Comment by comment id

Parameters:
$commentId int
Returns:
Comment object

Definition at line 91 of file CommentDAO.inc.php.

References _returnCommentFromRow().

& CommentDAO.getCommentsByParentId ( $  parentId,
$  childLevels = 0 
)

Retrieve Comments by parent comment id

Parameters:
$parentId int
Returns:
Comment objects array

Definition at line 49 of file CommentDAO.inc.php.

References _returnCommentFromRow().

Referenced by _returnCommentFromRow().

& CommentDAO.getCommentsByUserId ( $  userId  ) 

Retrieve comments by user id

Parameters:
$userId int
Returns:
Comment objects array

Definition at line 70 of file CommentDAO.inc.php.

References _returnCommentFromRow().

CommentDAO.getInsertCommentId (  ) 

Get the ID of the last inserted paper comment.

Returns:
int

Definition at line 176 of file CommentDAO.inc.php.

Referenced by insertComment().

& CommentDAO.getRootCommentsByPaperId ( $  paperId,
$  childLevels = 0 
)

Retrieve Comments by paper id

Parameters:
$paperId int
Returns:
Comment objects array

Definition at line 28 of file CommentDAO.inc.php.

References _returnCommentFromRow().

CommentDAO.incrementChildCount ( $  commentId  ) 

Increase the current count of child comments for the specified comment.

Parameters:
commentId int

Definition at line 184 of file CommentDAO.inc.php.

Referenced by insertComment().

CommentDAO.insertComment ( &$  comment  ) 

inserts a new paper comment into paper_comments table

Parameters:
Comment object
Returns:
int ID of new comment

Definition at line 142 of file CommentDAO.inc.php.

References getInsertCommentId(), and incrementChildCount().

CommentDAO.updateComment ( &$  comment  ) 

updates a comment

Parameters:
Comment object

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


The documentation for this class was generated from the following file:
Generated on 25 Jul 2013 for Open Conference Systems by  doxygen 1.4.7