-
- 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>
CREATOR
protected long
id
protected String
name
protected String
otherCategoryName
protected String
categoryDisplay
protected Long
parentCategoryId
protected Boolean
isPublic
protected Boolean
isFixedExpenses
protected CategoryType
categoryType
protected String
categoryRank
protected Integer
budgetGenerationType
protected List<MenigaCategory>
children
protected MenigaCategory
parent
protected Integer
categoryContextId
protected Integer
orderId
protected String
displayData
protected String
fixedIcon
-
Method Summary
Modifier and Type Method Description static void
setOperator(MenigaCategoryOperations operator)
Sets the api operator for doing api calls String
toString()
int
describeContents()
boolean
equals(Object o)
int
hashCode()
void
writeToParcel(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. long
getId()
String
getName()
String
getOtherCategoryName()
String
getCategoryDisplay()
Long
getParentCategoryId()
Boolean
getIsPublic()
Boolean
getIsFixedExpenses()
CategoryType
getCategoryType()
String
getCategoryRank()
Integer
getBudgetGenerationType()
List<MenigaCategory>
getChildren()
MenigaCategory
getParent()
Integer
getCategoryContextId()
Integer
getOrderId()
String
getDisplayData()
String
getFixedIcon()
-
-
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()
-
-
-
-