|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICommentService
ICommentService.
| Method Summary | |
|---|---|
int |
countByIdParent(int nIdParent,
boolean bPublishedOnly)
Get the number of comments associated with a given parent |
void |
create(Comment comment)
Insert. |
List<Comment> |
findByIdParent(int nIdParent,
boolean bPublishedOnly)
Get comments from their parent |
List<Comment> |
findByIdParent(int nIdParent,
boolean bPublishedOnly,
String strSortedAttributeName,
boolean bAscSort)
Get comments from their parent |
Comment |
findByPrimaryKey(int nIdComment)
Load. |
List<Comment> |
findByResource(String strIdExtendableResource,
String strExtendableResourceType,
boolean bPublishedOnly,
boolean bAscSort)
Select by resource. |
List<Comment> |
findByResource(String strIdExtendableResource,
String strExtendableResourceType,
boolean bPublishedOnly,
String strSortedAttributeName,
boolean bAscSort,
int nItemsOffset,
int nMaxItemsNumber,
boolean bLoadSubComments)
Get comments of a given resource |
List<Integer> |
findIdMostCommentedResources(String strExtendableResourceType,
boolean bPublishedOnly,
int nItemsOffset,
int nMaxItemsNumber)
Get the ids of resources ordered by their number of comments |
List<Integer> |
findIdsByResource(String strIdExtendableResource,
String strExtendableResourceType,
boolean bPublishedOnly)
Select ids of comments associated with a given resource |
List<Comment> |
findLastComments(String strIdExtendableResource,
String strExtendableResourceType,
int nNbComments,
boolean bPublishedOnly,
boolean bParentsOnly,
boolean bGetNumberSubComments)
Load last comments. |
int |
getCommentNb(String strIdExtendableResource,
String strExtendableResourceType,
boolean bParentsOnly,
boolean bPublishedOnly)
Get the number of comment |
void |
remove(int nIdComment)
Delete. |
void |
removeByResource(String strIdExtendableResource,
String strExtendableResourceType)
Delete by resource |
void |
update(Comment comment)
Store. |
void |
updateCommentStatus(int nIdComment,
boolean bPublished)
Update comment status. |
| Method Detail |
|---|
@Transactional(value="extend-comment.transactionManager") void remove(int nIdComment)
nIdComment - the n id comment
@Transactional(value="extend-comment.transactionManager")
void removeByResource(String strIdExtendableResource,
String strExtendableResourceType)
strIdExtendableResource - the str id extendable resourcestrExtendableResourceType - the str extendable resource type@Transactional(value="extend-comment.transactionManager") void create(Comment comment)
comment - the comment@Transactional(value="extend-comment.transactionManager") void update(Comment comment)
comment - the comment
@Transactional(value="extend-comment.transactionManager")
void updateCommentStatus(int nIdComment,
boolean bPublished)
nIdComment - the n id commentbPublished - the b publishedComment findByPrimaryKey(int nIdComment)
nIdComment - the n id comment
List<Integer> findIdsByResource(String strIdExtendableResource,
String strExtendableResourceType,
boolean bPublishedOnly)
strIdExtendableResource - The id of the extendable resourcestrExtendableResourceType - The extendable resource typebPublishedOnly - True to consider only published comments, false to
consider every comment
List<Comment> findByResource(String strIdExtendableResource,
String strExtendableResourceType,
boolean bPublishedOnly,
boolean bAscSort)
strIdExtendableResource - the id of the extendable resourcestrExtendableResourceType - the extendable resource typebPublishedOnly - Get only published commentsbAscSort - True if comments should be sorted ascendantly, false
otherwise
int getCommentNb(String strIdExtendableResource,
String strExtendableResourceType,
boolean bParentsOnly,
boolean bPublishedOnly)
strIdExtendableResource - the id of the extendable resourcestrExtendableResourceType - the extendable resource typebParentsOnly - True to consider only comments with no parent, false
otherwisebPublishedOnly - True to get only published comments, false to get
every comments
List<Comment> findLastComments(String strIdExtendableResource,
String strExtendableResourceType,
int nNbComments,
boolean bPublishedOnly,
boolean bParentsOnly,
boolean bGetNumberSubComments)
strIdExtendableResource - the id of the extendable resourcestrExtendableResourceType - the extendable resource typenNbComments - the number of commentsbPublishedOnly - True to get only published comments, false to get
every commentsbParentsOnly - True to get only parent comments, false to get every
comments.bGetNumberSubComments - True to get the number of sub comments of
each comment, false otherwise
List<Comment> findByResource(String strIdExtendableResource,
String strExtendableResourceType,
boolean bPublishedOnly,
String strSortedAttributeName,
boolean bAscSort,
int nItemsOffset,
int nMaxItemsNumber,
boolean bLoadSubComments)
strIdExtendableResource - The id of the resourcestrExtendableResourceType - The type of the resourcebPublishedOnly - True to consider only published commentsstrSortedAttributeName - The name of the attribute to sort, or null
if no sort should be donebAscSort - True to sort ascendantly, false otherwisenItemsOffset - 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 itemsbLoadSubComments - True if sub comments should be loaded, false if
they should be ignored
List<Comment> findByIdParent(int nIdParent,
boolean bPublishedOnly)
nIdParent - The id of the parent of comments to getbPublishedOnly - True to consider only published comments
List<Comment> findByIdParent(int nIdParent,
boolean bPublishedOnly,
String strSortedAttributeName,
boolean bAscSort)
nIdParent - The id of the parent of comments to getbPublishedOnly - True to consider only published commentsstrSortedAttributeName - The name of the attribute to sort, or null
if no sort should be donebAscSort - True to sort ascendantly, false otherwise
int countByIdParent(int nIdParent,
boolean bPublishedOnly)
nIdParent - The id of the parent of comments to count.bPublishedOnly - True to consider only published comments
List<Integer> findIdMostCommentedResources(String strExtendableResourceType,
boolean bPublishedOnly,
int nItemsOffset,
int nMaxItemsNumber)
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 items
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||