Class UserComment
#include <UserComment.h >
Class to manage comments contributed by users. Comments fall into one of these categories:
DbRecNum id |
db table record id; 0 for empty record |
Constructor with optional db table record id.
const HashArray& data |
key-value pairs with property names as keys |
Constructor with input from HashArray.
Create an empty UserComment
Reset/clear the contents of this class
Determine if this is valid data or not
Return value: true if valid; flase if not vali
Get the value of the record id.
Return value: the value of id
Get the value of the User id who posted the Comment.
Return value: the value of UserId
Get the value of the one-line description of the comment.
Return value: the value of Title
Get the value of the type of comment, e.g. f=feature, b=bug, c=comment.
Return value: the value of CommentType
Check if this UserComment is a bug
Return value: true if it is a bug, false otherwise
Check if this UserComment is a feature
Return value: true if it is a feature, false otherwise
Check if this UserComment is a comment
Return value: true if it is a comment, false otherwise
Get the value of the text of the comment.
Return value: the value of Comment
Get the value of timestamp of when the user submitted the comment.
Return value: the value of PostTime
Get the value of timestamp of when someone replied to the user.
Return value: the value of ReplyTime
Get the value of the User id of the person who replied.
Return value: the value of ReplyUserId
Get the value of timestamp of when the issue was resolved.
Return value: the value of ResolveTime
Get the value of the User id of the person who resolved the issue.
Return value: the value of ResolveUserId
Get the value of the severity of the bug.
Return value: the value of Severity
Get the value of the priority of the bug/feature/sugestion.
Return value: the value of Priority
DbRecNum newUserId |
the new value for UserId |
Set the value of the User id who posted the Comment.
Return value: the updated instance of UserComment
const string& newTitle |
the new value for Title |
Set the value of the one-line description of the comment.
Return value: the updated instance of UserComment
Set the value of the type of comment to bug
Return value: the updated instance of UserComment
Set the value of the type of comment to feature
Return value: the updated instance of UserComment
Set the value of the type of comment to comment
Return value: the updated instance of UserComment
const string& newComment |
the new value for Comment |
Set the value of the text of the comment.
Return value: the updated instance of UserComment
time_t newPostTime |
the new value for PostTime |
Set the value of timestamp of when the user submitted the comment.
Return value: the updated instance of UserComment
time_t newReplyTime |
the new value for ReplyTime |
Set the value of timestamp of when someone replied to the user.
Return value: the updated instance of UserComment
DbRecNum newReplyUserId |
the new value for ReplyUserId |
Set the value of the User id of the person who replied.
Return value: the updated instance of UserComment
time_t newResolveTime |
the new value for ResolveTime |
Set the value of timestamp of when the issue was resolved.
Return value: the updated instance of UserComment
DbRecNum newResolveUserId |
the new value for ResolveUserId |
Set the value of the User id of the person who resolved the issue.
Return value: the updated instance of UserComment
int newSeverity |
the new value for Severity |
Set the value of the severity of the bug.
Return value: the updated instance of UserComment
int newPriority |
the new value for Priority |
Set the value of the priority of the bug/feature/sugestion.
Return value: the updated instance of UserComment
const HashArray& data |
Given a set of UserComment properties in key-value pairs, initialize this instance with them.
This is complementary to toHashArray().
bool forDB |
false to include Id; true to exclude Id, which is handy for sending to Datastore Default value: false |
Convert this instance's data into a HashArray.
This is the complement of set()
Return value: a HashArray of instance's properties
bool forDB |
false to include Id; true to exclude Id, which is handy for sending to Datastore Default value: false |
Convert this instance's data to XML.
Return value: a XMLData of instance's properties
Save this record to the Datastore.
If the data has not changed, it is not saved.
Return value: the Id upon success, 0 on failure
DbRecNum id |
the id of the record to load |
Load data from the Datastore with the provided Id.
Return value: true upon success; false upon faliure
DbRecNum id |
the record id |
DbRecNum UserId |
the User id who posted the Comment |
string Title |
the one-line description of the comment |
string CommentType |
the type of comment, e.g. f=feature, b=bug, c=comment. |
string Comment |
the text of the comment |
time_t PostTime |
timestamp of when the user submitted the comment |
time_t ReplyTime |
timestamp of when someone replied to the user |
DbRecNum ReplyUserId |
the User id of the person who replied |
time_t ResolveTime |
timestamp of when the issue was resolved |
DbRecNum ResolveUserId |
the User id of the person who resolved the issue |
int Severity |
the severity of the bug |
int Priority |
the priority of the bug/feature/sugestion |
bool changed |
Flag: true if any data in this instance has changed |
static Datastore db |
Our connection to DB table data |
Make sure we're connected to our table in the Datastore
Return value: true upon success, false upon failure
Add a new record to the Datastore.
If the Id is set, it will be used; if 0, a new Id will be assigned.
Return value: the new record's record Id
const string& newCommentType |