-
- 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>CREATORprotected longidprotected longtransactionIdprotected longpersonIdprotected Stringcommentprotected DateTimecreatedDate
-
Method Summary
Modifier and Type Method Description static voidsetOperator(MenigaCommentOperations operator)Sets the api operator for doing api calls MenigaCommentclone()intdescribeContents()voidwriteToParcel(Parcel dest, int flags)booleanequals(Object o)inthashCode()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. longgetId()longgetTransactionId()longgetPersonId()StringgetComment()DateTimegetCreatedDate()voidsetTransactionId(long transactionId)Sets a transaction id for the comment. voidsetComment(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.
-
-
-
-