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

java.lang.Object
  extended by fr.paris.lutece.plugins.extend.modules.comment.business.Comment

public class Comment
extends Object

Comment


Constructor Summary
Comment()
           
 
Method Summary
 String getBBCodeComment()
          Get the content of the comment interpreted as BBCode
 String getComment()
          Returns the comment
 Timestamp getDateComment()
          Returns the date of the comment
 Timestamp getDateLastModif()
          Get the date of last modification of the comment
 String getEmail()
          Returns the email of the user
 String getExtendableResourceType()
           
 int getFirstUnpublishedSubComment()
          Get the id of the first unpublished sub comment of this comment
 int getIdComment()
          Returns the identifier of the object
 String getIdExtendableResource()
           
 int getIdParentComment()
          Get the id of the parent comment of this comment
 String getIpAddress()
          Returns the IP address of the user
 boolean getIsAdminComment()
          Check if the comment has been written by an admin or by a front office user
 List<Comment> getListSubComments()
          Get the list of sub comments of this comment
 String getName()
          Returns the name of the user
 int getNumberSubComments()
          Get the number of sub comments of this comment
 boolean isPublished()
          Gets the checks if is published.
 void setComment(String strComment)
          Sets the comment
 void setDateComment(Timestamp dateComment)
          Sets the date of the comment
 void setDateLastModif(Timestamp dateLastModif)
          Set the date of last modification of the comment
 void setEmail(String strEmail)
          Sets the email of the user
 void setExtendableResourceType(String strExtendableResourceType)
           
 void setIdComment(int nIdComment)
          Sets the identifier of the object
 void setIdExtendableResource(String strIdExtendableResource)
           
 void setIdParentComment(int nIdParentComment)
          Set the id of the parent comment of this comment
 void setIpAddress(String strIpAddress)
          Sets the IP address of the user
 void setIsAdminComment(boolean bIsAdminComment)
          Set the admin written status of this comment
 void setListSubComments(List<Comment> listSubComments)
          Set the list of sub comments of this comment, and update the number of sub comments.
 void setName(String strName)
          Sets the name of the user
 void setNumberSubComments(int nNumberSubComments)
          Set the number of sub comments of this comment
 void setPublished(boolean bIsPublished)
          Sets the published.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comment

public Comment()
Method Detail

getIdExtendableResource

public String getIdExtendableResource()
Returns:
the strIdExtendableResource

setIdExtendableResource

public void setIdExtendableResource(String strIdExtendableResource)
Parameters:
strIdExtendableResource - the strIdExtendableResource to set

getExtendableResourceType

public String getExtendableResourceType()
Returns:
the extendableResourceType

setExtendableResourceType

public void setExtendableResourceType(String strExtendableResourceType)
Parameters:
strExtendableResourceType - the extendableResourceType to set

getDateComment

public Timestamp getDateComment()
Returns the date of the comment

Returns:
the date of the comment

setDateComment

public void setDateComment(Timestamp dateComment)
Sets the date of the comment

Parameters:
dateComment - the new date

getDateLastModif

public Timestamp getDateLastModif()
Get the date of last modification of the comment

Returns:
The date of last modification of the comment

setDateLastModif

public void setDateLastModif(Timestamp dateLastModif)
Set the date of last modification of the comment

Parameters:
dateLastModif - The date of last modification of the comment

getIdComment

public int getIdComment()
Returns the identifier of the object

Returns:
The identifier of the object

setIdComment

public void setIdComment(int nIdComment)
Sets the identifier of the object

Parameters:
nIdComment - the new identifier

isPublished

public boolean isPublished()
Gets the checks if is published.

Returns:
the checks if is published

setPublished

public void setPublished(boolean bIsPublished)
Sets the published.

Parameters:
bIsPublished - the new published

getComment

public String getComment()
Returns the comment

Returns:
the comment

setComment

public void setComment(String strComment)
Sets the comment

Parameters:
strComment - the new comment

getBBCodeComment

public String getBBCodeComment()
Get the content of the comment interpreted as BBCode

Returns:
The content of the comment interpreted as BBCode

getEmail

public String getEmail()
Returns the email of the user

Returns:
the email of the user

setEmail

public void setEmail(String strEmail)
Sets the email of the user

Parameters:
strEmail - the new email

getIpAddress

public String getIpAddress()
Returns the IP address of the user

Returns:
the IP address of the user

setIpAddress

public void setIpAddress(String strIpAddress)
Sets the IP address of the user

Parameters:
strIpAddress - the new IP address

getName

public String getName()
Returns the name of the user

Returns:
the name of the user

setName

public void setName(String strName)
Sets the name of the user

Parameters:
strName - the new name

getIdParentComment

public int getIdParentComment()
Get the id of the parent comment of this comment

Returns:
The id of the parent comment of this comment

setIdParentComment

public void setIdParentComment(int nIdParentComment)
Set the id of the parent comment of this comment

Parameters:
nIdParentComment - The id of the parent comment of this comment

getListSubComments

public List<Comment> getListSubComments()
Get the list of sub comments of this comment

Returns:
The list of sub comments of this comment. An empty list means that this comment has no sub comment. A null value means that the sub comment list has not been initialized.

setListSubComments

public void setListSubComments(List<Comment> listSubComments)
Set the list of sub comments of this comment, and update the number of sub comments.

Parameters:
listSubComments - The list of sub comments of this comment.

getNumberSubComments

public int getNumberSubComments()
Get the number of sub comments of this comment

Returns:
the number of sub comments of this comment, or -1 if this information is not known.

setNumberSubComments

public void setNumberSubComments(int nNumberSubComments)
Set the number of sub comments of this comment

Parameters:
nNumberSubComments - the number of sub comments of this comment, or -1 if this information is not known.

getIsAdminComment

public boolean getIsAdminComment()
Check if the comment has been written by an admin or by a front office user

Returns:
True if the comment has been written by an admin, false otherwise

setIsAdminComment

public void setIsAdminComment(boolean bIsAdminComment)
Set the admin written status of this comment

Parameters:
bIsAdminComment - True if the comment has been written by an admin, false otherwise

getFirstUnpublishedSubComment

public int getFirstUnpublishedSubComment()
Get the id of the first unpublished sub comment of this comment

Returns:
The id of the first unpublished sub comment, or 0 if it has no sub comments or no unpublished sub comments. 0 is also returned if sub comments of this comment have not been fetched.


Copyright © 2013 Mairie de Paris. All Rights Reserved.