-
- All Implemented Interfaces:
-
android.os.Parcelable
,java.io.Serializable
,java.lang.Cloneable
public class MenigaComment implements Parcelable, Serializable, Cloneable
A comment on a transaction.
Copyright 2017 Meniga Iceland Inc.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<MenigaComment>
CREATOR
protected long
id
protected long
transactionId
protected long
personId
protected String
comment
protected DateTime
createdDate
-
Method Summary
Modifier and Type Method Description static void
setOperator(MenigaCommentOperations operator)
Sets the api operator for doing api calls MenigaComment
clone()
int
describeContents()
void
writeToParcel(Parcel dest, int flags)
boolean
equals(Object o)
int
hashCode()
Result<Void>
update()
Updates the text of this comment object. Result<Void>
delete()
Delets this comment object static Result<MenigaComment>
create(long transactionId, String comment)
Creates a new comment for a given transaction. long
getId()
long
getTransactionId()
long
getPersonId()
String
getComment()
DateTime
getCreatedDate()
void
setTransactionId(long transactionId)
Sets a transaction id for the comment. void
setComment(String comment)
Updates the comment string in this comment object. -
-
Method Detail
-
setOperator
static void setOperator(MenigaCommentOperations operator)
Sets the api operator for doing api calls
- Parameters:
operator
- An object that implements the MenigaCommentOperations interface for carrying out api operations on this class.
-
clone
MenigaComment clone()
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
hashCode
int hashCode()
-
update
Result<Void> update()
Updates the text of this comment object. All hashtagged text (such as #tag) will cause a tagobject to be created. The removal of a hashtagged text will cause the tag that did exist to bedeleted.
-
create
static Result<MenigaComment> create(long transactionId, String comment)
Creates a new comment for a given transaction. All text in the comment that starts with the #character and ends with a space will cause a tag to be created (if the tag does not alreadyexist)
- Parameters:
transactionId
- The id of the transaction to which this comment belongscomment
- The text of the comment, hashtagged text (such as #tag) will cause a tag objectto be created.
-
getId
long getId()
-
getTransactionId
long getTransactionId()
-
getPersonId
long getPersonId()
-
getComment
String getComment()
-
getCreatedDate
DateTime getCreatedDate()
-
setTransactionId
void setTransactionId(long transactionId)
Sets a transaction id for the comment. This field can't be persisted to the API.
- Parameters:
transactionId
- the transaction id.
-
setComment
void setComment(String comment)
Updates the comment string in this comment object.
- Parameters:
comment
- The new comment.
-
-
-
-