fr.paris.lutece.plugins.document.modules.comment.business
Class DocumentCommentHome

java.lang.Object
  extended by fr.paris.lutece.plugins.document.modules.comment.business.DocumentCommentHome

public final class DocumentCommentHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for DocumentComment objects


Method Summary
static int checkCommentNb(int strDocumentId)
          Return the nb of comment for a document
static DocumentComment create(DocumentComment documentComment)
          Create an instance of the DocumentComment class
static java.util.List<DocumentComment> findByDocument(int nDocumentId)
          Returns all the comments on an document
static DocumentComment findByPrimaryKey(int nDocumentCommentId)
          Returns an instance of an document comment whose identifier is specified in parameter
static java.util.List<DocumentComment> findPublishedByDocument(int nDocumentId)
          Returns all the published comments on an document
static void remove(int nDocumentCommentId)
          Remove from the master database the document comment whose identifier is specified in parameter
static void update(DocumentComment documentComment)
          Update of the document comment data specified in parameter
static void updateCommentStatus(int nCommentId, int nStatus)
          Update status from the comment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static DocumentComment create(DocumentComment documentComment)
Create an instance of the DocumentComment class

Parameters:
documentComment - the object to insert into the database
Returns:
the instance created with its primary key

update

public static void update(DocumentComment documentComment)
Update of the document comment data specified in parameter

Parameters:
documentComment - the instance of class which contains the data to store

remove

public static void remove(int nDocumentCommentId)
Remove from the master database the document comment whose identifier is specified in parameter

Parameters:
nDocumentCommentId - the article identifier

findByPrimaryKey

public static DocumentComment findByPrimaryKey(int nDocumentCommentId)
Returns an instance of an document comment whose identifier is specified in parameter

Parameters:
nDocumentCommentId - the document comment primary key
Returns:
the instance of the class DocumentComment

findByDocument

public static java.util.List<DocumentComment> findByDocument(int nDocumentId)
Returns all the comments on an document

Parameters:
nDocumentId - the identifier of the document
Returns:
the list of document comments

findPublishedByDocument

public static java.util.List<DocumentComment> findPublishedByDocument(int nDocumentId)
Returns all the published comments on an document

Parameters:
nDocumentId - the identifier of the document
Returns:
the list of document comments

updateCommentStatus

public static void updateCommentStatus(int nCommentId,
                                       int nStatus)
Update status from the comment

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

checkCommentNb

public static int checkCommentNb(int strDocumentId)
Return the nb of comment for a document

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


Copyright © 2010 Mairie de Paris. All Rights Reserved.