Interface ICommentDAO
-
- All Known Implementing Classes:
CommentDAO
public interface ICommentDAOICommentDAO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountByIdParent(int nIdParent, boolean bPublishedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the number of comments associated with a given parentvoiddelete(int nIdComment, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete.voiddeleteByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete by id hub resource.java.util.List<Comment>findByIdParent(int nIdParent, CommentFilter commentFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get comments from their parentjava.util.List<Comment>findCommentsByLuteceUserName(java.lang.String strLuteceUserName, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get comments of a lutece user.java.util.List<java.lang.Integer>findIdMostCommentedResources(java.lang.String strExtendableResourceType, boolean bPublishedOnly, int nItemsOffset, int nMaxItemsNumber, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the ids of resources ordered by their number of commentsjava.util.List<java.lang.Integer>findIdsByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, boolean bPublishedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select ids of comments associated with a given resourcejava.util.List<Comment>findParentCommentsByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, CommentFilter commentFilter, int nItemsOffset, int nMaxItemsNumber, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get comments of a given resource.intgetCommentNb(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, boolean bParentsOnly, boolean bPublishedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check comment nb.voidinsert(Comment comment, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert.Commentload(int nIdComment, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load.java.util.List<Comment>selectByListResource(java.util.List<java.lang.String> listIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load comment list by resourcejava.util.List<Comment>selectLastComments(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, int nNbComments, boolean bPublishedOnly, boolean bParentsOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin, boolean bSortedByDateCreation)Load last comments.voidstore(Comment comment, fr.paris.lutece.portal.service.plugin.Plugin plugin)Store.voidupdateCommentStatus(int nIdComment, boolean bPublished, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update comment status.
-
-
-
Method Detail
-
delete
void delete(int nIdComment, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete.- Parameters:
nIdComment- the n id commentplugin- the plugin
-
deleteByResource
void deleteByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete by id hub resource.- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource typeplugin- the plugin
-
insert
void insert(Comment comment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert.- Parameters:
comment- the commentplugin- the plugin
-
load
Comment load(int nIdComment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load.- Parameters:
nIdComment- the n id commentplugin- the plugin- Returns:
- the comment
-
store
void store(Comment comment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Store.- Parameters:
comment- the commentplugin- the plugin
-
updateCommentStatus
void updateCommentStatus(int nIdComment, boolean bPublished, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update comment status.- Parameters:
nIdComment- the n id commentbPublished- the b publishedplugin- the plugin
-
getCommentNb
int getCommentNb(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, boolean bParentsOnly, boolean bPublishedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check comment nb.- Parameters:
strIdExtendableResource- the id of the extendable resourcestrExtendableResourceType- the extendable resource typebParentsOnly- True to consider only comments with no parent, false otherwisebPublishedOnly- True to consider only published comments, false to consider every comments.plugin- the plugin- Returns:
- the number of comments
-
selectLastComments
java.util.List<Comment> selectLastComments(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, int nNbComments, boolean bPublishedOnly, boolean bParentsOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin, boolean bSortedByDateCreation)
Load last comments.- Parameters:
strIdExtendableResource- the id of the extendable resourcestrExtendableResourceType- the extendable resource typenNbComments- the number of commentsbPublishedOnly- the b published onlybParentsOnly- True to get only parent comments, false to get every comments.plugin- the pluginbSortedByDateCreation- true if is sorted by date creation- Returns:
- the list
-
selectByListResource
java.util.List<Comment> selectByListResource(java.util.List<java.lang.String> listIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load comment list by resource- Parameters:
strIdExtendableResource- the id of the extendable resourcestrExtendableResourceType- the extendable resource typeplugin- the plugin- Returns:
- list of comments
-
findParentCommentsByResource
java.util.List<Comment> findParentCommentsByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, CommentFilter commentFilter, int nItemsOffset, int nMaxItemsNumber, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get comments of a given resource. Only parents comments are returned.- Parameters:
strIdExtendableResource- The id of the resourcestrExtendableResourceType- The type of the resourceCommentFilter- The commentFilternItemsOffset- The offset of the items to get, or 0 to get items from the first onenMaxItemsNumber- The maximum number of items to return, or 0 to get every itemsplugin- The plugin- Returns:
- The list of comments associated with the given resource
-
findByIdParent
java.util.List<Comment> findByIdParent(int nIdParent, CommentFilter commentFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get comments from their parent- Parameters:
nIdParent- The id of the parent of comments to getcommentFilter- The comment filterplugin- The plugin- Returns:
- The list of comments associated with the given parent
-
countByIdParent
int countByIdParent(int nIdParent, boolean bPublishedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the number of comments associated with a given parent- Parameters:
nIdParent- The id of the parent of comments to count.bPublishedOnly- True to consider only published commentsplugin- The plugin- Returns:
- The number of comments associated with the given parent
-
findIdsByResource
java.util.List<java.lang.Integer> findIdsByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, boolean bPublishedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select ids of comments associated with a given resource- Parameters:
strIdExtendableResource- The id of the extendable resourcestrExtendableResourceType- The extendable resource typebPublishedOnly- True to consider only published comments, false to consider every commentplugin- The plugin- Returns:
- The list of comment ids, or an empty list if no comment is associated with the given resource
-
findIdMostCommentedResources
java.util.List<java.lang.Integer> findIdMostCommentedResources(java.lang.String strExtendableResourceType, boolean bPublishedOnly, int nItemsOffset, int nMaxItemsNumber, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the ids of resources ordered by their number of comments- Parameters:
strExtendableResourceType- The type of resources to considerbPublishedOnly- True to consider only published comments, false to consider every commentsnItemsOffset- The offset of the items to get, or 0 to get items from the first onenMaxItemsNumber- The maximum number of items to return, or 0 to get every itemsplugin- The plugin- Returns:
- The list of ids of resources ordered by the number of associated comments
-
findCommentsByLuteceUserName
java.util.List<Comment> findCommentsByLuteceUserName(java.lang.String strLuteceUserName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get comments of a lutece user. Only parents comments are returned.- Parameters:
strLuteceUserName- The name of the lutece usernItemsOffset- The offset of the items to get, or 0 to get items from the first onenMaxItemsNumber- The maximum number of items to return, or 0 to get every itemsplugin- The plugin- Returns:
- The list of comments associated with the given resource
-
-