fr.paris.lutece.plugins.document.modules.comment.business
Interface IDocumentCommentDAO

All Known Implementing Classes:
DocumentCommentDAO

public interface IDocumentCommentDAO

DocumentCommentDAO Interface


Method Summary
 int checkCommentNb(int nDocumentId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return the nb of comment for a document
 void delete(int nCommentId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(DocumentComment documentComment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 DocumentComment load(int nCommentId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of DocumentComment from the table
 java.util.List<DocumentComment> selectByDocument(int nDocumentId, boolean bPublishedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Gets all the comments for an document
 void store(DocumentComment documentComment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 void updateCommentStatus(int nCommentId, int nStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update status from the comment
 

Method Detail

delete

void delete(int nCommentId,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Parameters:
nCommentId - the documentComment identifier

insert

void insert(DocumentComment documentComment,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Parameters:
documentComment - The DocumentComment object

load

DocumentComment load(int nCommentId,
                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of DocumentComment from the table

Parameters:
nCommentId - The identifier of DocumentComment
Returns:
the instance of the DocumentComment

selectByDocument

java.util.List<DocumentComment> selectByDocument(int nDocumentId,
                                                 boolean bPublishedOnly,
                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Gets all the comments for an document

Parameters:
nDocumentId - the identifier of the Document
bPublishedOnly - set to true to return published comments only
Returns:
the list of comments, in chronological order for published comments, in reverse chronological order otherwise

store

void store(DocumentComment documentComment,
           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
documentComment - The reference of DdocumentComment

updateCommentStatus

void updateCommentStatus(int nCommentId,
                         int nStatus,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update status from the comment

Parameters:
nCommentId - The Comment identifier
nStatus - The published Status

checkCommentNb

int checkCommentNb(int nDocumentId,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the nb of comment for a document

Parameters:
nDocumentId - the document identifier
Returns:
the nb of document


Copyright © 2009 Mairie de Paris. All Rights Reserved.