fr.paris.lutece.plugins.extend.modules.comment.business
Class CommentDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.extend.modules.comment.business.CommentDAO
All Implemented Interfaces:
ICommentDAO

public class CommentDAO
extends java.lang.Object
implements ICommentDAO

This class provides Data Access methods for Comment objects.


Constructor Summary
CommentDAO()
           
 
Method Summary
 void delete(int nIdComment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete.
 void deleteByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete by id hub resource.
 int getCommentNb(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check comment nb.
 void insert(Comment comment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert.
 Comment load(int nIdComment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load.
 java.util.List<Comment> selectByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, boolean bPublishedOnly, boolean bAscSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select by id hub resource.
 java.util.List<Comment> selectLastComments(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, int nNbComments, boolean bPublishedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load last comments.
 void store(Comment comment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Store.
 void updateCommentStatus(int nIdComment, boolean bPublished, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update comment status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentDAO

public CommentDAO()
Method Detail

insert

public void insert(Comment comment,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert.

Specified by:
insert in interface ICommentDAO
Parameters:
comment - the comment
plugin - the plugin

load

public Comment load(int nIdComment,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load.

Specified by:
load in interface ICommentDAO
Parameters:
nIdComment - the n id comment
plugin - the plugin
Returns:
the comment

delete

public void delete(int nIdComment,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete.

Specified by:
delete in interface ICommentDAO
Parameters:
nIdComment - the n id comment
plugin - the plugin

deleteByResource

public void deleteByResource(java.lang.String strIdExtendableResource,
                             java.lang.String strExtendableResourceType,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete by id hub resource.

Specified by:
deleteByResource in interface ICommentDAO
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
plugin - the plugin

store

public void store(Comment comment,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Store.

Specified by:
store in interface ICommentDAO
Parameters:
comment - the comment
plugin - the plugin

selectByResource

public java.util.List<Comment> selectByResource(java.lang.String strIdExtendableResource,
                                                java.lang.String strExtendableResourceType,
                                                boolean bPublishedOnly,
                                                boolean bAscSort,
                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select by id hub resource.

Specified by:
selectByResource in interface ICommentDAO
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
bPublishedOnly - the b published
bAscSort - True if comments should be sorted ascendantly, false otherwise
plugin - the plugin
Returns:
the list

updateCommentStatus

public void updateCommentStatus(int nIdComment,
                                boolean bPublished,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update comment status.

Specified by:
updateCommentStatus in interface ICommentDAO
Parameters:
nIdComment - the n id comment
bPublished - the b published
plugin - the plugin

getCommentNb

public int getCommentNb(java.lang.String strIdExtendableResource,
                        java.lang.String strExtendableResourceType,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check comment nb.

Specified by:
getCommentNb in interface ICommentDAO
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
plugin - the plugin
Returns:
the int

selectLastComments

public java.util.List<Comment> selectLastComments(java.lang.String strIdExtendableResource,
                                                  java.lang.String strExtendableResourceType,
                                                  int nNbComments,
                                                  boolean bPublishedOnly,
                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load last comments.

Specified by:
selectLastComments in interface ICommentDAO
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
nNbComments - the n nb comments
bPublishedOnly - the b published only
plugin - the plugin
Returns:
the list


Copyright © 2012 Mairie de Paris. All Rights Reserved.