-
- All Implemented Interfaces:
-
android.os.Parcelable,java.io.Serializable,java.lang.Cloneable
public class MenigaCategory implements Parcelable, Serializable, Cloneable
Category information object. Every transaction includes a category that is mapped within the Meniga system.
Copyright 2017 Meniga Iceland Inc.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<MenigaCategory>CREATORprotected longidprotected Stringnameprotected StringotherCategoryNameprotected StringcategoryDisplayprotected LongparentCategoryIdprotected BooleanisPublicprotected BooleanisFixedExpensesprotected CategoryTypecategoryTypeprotected StringcategoryRankprotected IntegerbudgetGenerationTypeprotected List<MenigaCategory>childrenprotected MenigaCategoryparentprotected IntegercategoryContextIdprotected IntegerorderIdprotected StringdisplayDataprotected StringfixedIcon
-
Method Summary
Modifier and Type Method Description static voidsetOperator(MenigaCategoryOperations operator)Sets the api operator for doing api calls StringtoString()intdescribeContents()booleanequals(Object o)inthashCode()voidwriteToParcel(Parcel dest, int flags)static Result<List<MenigaCategory>>fetch()Retrieves all categories including user created categories in a specified culture (language). static Result<List<MenigaCategory>>fetchTree(CategoryRequest type)Retrieves all categories including user created categories in a tree structure with parent categoriescontaining their children in this.children. static Result<List<MenigaCategory>>fetch(CategoryRequest type)Retrieves all public categories and optionally user created categories. static Result<MenigaCategory>fetch(long id)Returns a category by id. longgetId()StringgetName()StringgetOtherCategoryName()StringgetCategoryDisplay()LonggetParentCategoryId()BooleangetIsPublic()BooleangetIsFixedExpenses()CategoryTypegetCategoryType()StringgetCategoryRank()IntegergetBudgetGenerationType()List<MenigaCategory>getChildren()MenigaCategorygetParent()IntegergetCategoryContextId()IntegergetOrderId()StringgetDisplayData()StringgetFixedIcon()-
-
Method Detail
-
setOperator
static void setOperator(MenigaCategoryOperations operator)
Sets the api operator for doing api calls
- Parameters:
operator- An object that implements the MenigaCategoryOperations interface for carrying out api operations on this class.
-
describeContents
int describeContents()
-
hashCode
int hashCode()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
fetch
static Result<List<MenigaCategory>> fetch()
Retrieves all categories including user created categories in a specified culture (language).Some of the entries in the list might be of type MenigaUserCategory
-
fetchTree
static Result<List<MenigaCategory>> fetchTree(CategoryRequest type)
Retrieves all categories including user created categories in a tree structure with parent categoriescontaining their children in this.children. Some of the entries in the list might beof type MenigaUserCategory
- Parameters:
type- Get only public categories or both public and user created at the same time
-
fetch
static Result<List<MenigaCategory>> fetch(CategoryRequest type)
Retrieves all public categories and optionally user created categories. Some of the entries in the list might beof type MenigaUserCategory
- Parameters:
type- Get only public categories or both public and user created at the same time
-
fetch
static Result<MenigaCategory> fetch(long id)
Returns a category by id. If this is a user created category, the actual return type will be MenigaUserCategory
- Parameters:
id- id of the category to fetch
-
getId
long getId()
-
getOtherCategoryName
String getOtherCategoryName()
-
getCategoryDisplay
String getCategoryDisplay()
-
getParentCategoryId
Long getParentCategoryId()
-
getIsPublic
Boolean getIsPublic()
-
getIsFixedExpenses
Boolean getIsFixedExpenses()
-
getCategoryType
CategoryType getCategoryType()
-
getCategoryRank
String getCategoryRank()
-
getBudgetGenerationType
Integer getBudgetGenerationType()
-
getChildren
List<MenigaCategory> getChildren()
-
getParent
MenigaCategory getParent()
-
getCategoryContextId
Integer getCategoryContextId()
-
getOrderId
Integer getOrderId()
-
getDisplayData
String getDisplayData()
-
getFixedIcon
String getFixedIcon()
-
-
-
-