-
public class TransactionsFilter.BuilderA builder class for constructing a filter object. Follows the builder pattern.
Copyright 2017 Meniga Iceland Inc.
-
-
Constructor Summary
Constructors Constructor Description Builder()Builder(TransactionsFilter filter)
-
Method Summary
Modifier and Type Method Description static TransactionsFilter.BuildercreateBuilderFromExistingFilter(TransactionsFilter filterToCopy)Takes in an TransactionFilter and copies its properties to a new builder TransactionsFilter.Buildertype(String type)TransactionsFilter.BuilderorderBy(SeriesOrderBy order)TransactionsFilter.BuilderascendingOrder(boolean ascendingOrder)TransactionsFilter.Builderpage(int numPerPage, int pageIndex)How many results should be fetched in a page. TransactionsFilter.BuildersearchText(String searchText)A free-form text to filter by that searches through transaction description, merchant name, category name, currency, tags comments and transaction data. TransactionsFilter.BuilderhideExcluded(boolean hideExcluded)TransactionsFilter.BuilderuseExactMerchantTexts(boolean useExactMerchantTexts)A flag telling the selector to use exact merchant texts TransactionsFilter.BuilderuncertainOrFlagged(boolean uncertainOrFlagged)Whether or not to get uncertain categorization or flagged transactions TransactionsFilter.BuilderuseAbsoluteAmountSearch(boolean useAbsoluteAmountSearch)Whether or not to use absolute amount search. TransactionsFilter.BuilderuseAccentInsensitiveSearch(boolean useAccentInsensitiveSearch)Whether the search performed is accent insensitive or not. TransactionsFilter.BuilderuseAmountInCurrencySearch(boolean useAmountInCurrencySearch)Whether or not to search for amount in currency instead of amount. TransactionsFilter.BuilderuseAndSearchForTags(boolean useAndSearchForTags)Whether or not tags are searched with AND or OR. TransactionsFilter.BuilderuseEqualsSearchForBankId(boolean useEqualsSearchForBankId)Whether or not BankId is searched with EQUALS or LIKE. TransactionsFilter.BuilderuseExactDescription(boolean useExactDescription)If true, filters by exact (equals) description as opposed to contains (which is the default). TransactionsFilter.BuilderuseParentMerchantIds(boolean useParentMerchantIds)If set to true, parent and the parents children will be found for each merchant id provided in MerchantIds and in ExcludeMerchantIds and theyincluded in the filter.If the merchant has no parent then its children, if any, are added. TransactionsFilter.BuilderonlyUncategorized(boolean onlyUncategorized)Whether or not to only get uncategorized transactions. TransactionsFilter.Builderamounts(MenigaDecimal from, MenigaDecimal to)Amounts to search from and to. TransactionsFilter.Buildercategories(List<Long> categoryIds)A list of category ids to filter by. TransactionsFilter.Buildercategories(ArrayList<MenigaCategory> categories)A list of categories to filter by (will be converted to list of ids). TransactionsFilter.Buildercategory(long categoryId)A category id to filter by. TransactionsFilter.BuilderbankIds(List<String> bankIds)List of bankid's to filter by. TransactionsFilter.BuildercategoryTypes(List<CategoryType> categoryTypes)The category types to filter by. TransactionsFilter.BuildercategoryType(CategoryType categoryType)The category type to filter by. TransactionsFilter.Buildercomment(String comment)The transaction comment to filter by. TransactionsFilter.BuildercounterpartyAccountIdentifiers(List<String> counterpartyAccountIdentifiers)The counterparty account identifers to filter by. TransactionsFilter.Builderdescription(String description)The transaction description to filter by. TransactionsFilter.BuilderexcludeMerchantIds(List<Integer> excludeMerchantIds)The merchant IDs to exclude. TransactionsFilter.BuilderexcludeMerchantTexts(List<String> excludeMerchantTexts)The merchant texts to exclude. TransactionsFilter.Builderfields(List<String> fields)A comma seperated list of what fields should be returned. TransactionsFilter.BuilderinsertedBefore(DateTime insertedBefore)If set, will only return transactions that have insert time before the supplied value. TransactionsFilter.BuilderaccountIds(List<Long> accountIds)A list of account ids to filter by. TransactionsFilter.BuilderaccountTypeIds(List<Long> accountTypeIds)A list of account types to filter by (current accounts, credit cards, saving accounts etc. TransactionsFilter.Builderaccounts(List<MenigaAccount> accounts)A list of accounts to filter by. TransactionsFilter.Builderaccount(long accountId)A single account id to filter by. TransactionsFilter.BuilderaccountIdentifiers(List<String> accountIdentifiers)The account identifiers to filter by. TransactionsFilter.BuildermerchantIds(List<Long> merchantIds)A list of merchant ids to filter by. TransactionsFilter.BuildermerchantId(long merchantId)A single merchant id to filter by. TransactionsFilter.BuildermerchantTexts(List<String> merchantTexts)A list of merchant texts to filter by TransactionsFilter.BuilderdisableSkipTake()TransactionsFilter.BuildermerchantText(String merchantText)A single merchant text to filter by.Shorthand for using the merchantTexts method passing a list with a single entry. TransactionsFilter.Buildertags(List<String> tags)A list of tag strings to filter by. TransactionsFilter.Buildertag(String tag)A single tag to filter by TransactionsFilter.Builderperiod(DateTime periodFrom, DateTime periodTo)A period from and to, to filter by. TransactionsFilter.BuilderperiodFrom(DateTime periodFrom)A period from to filter by. TransactionsFilter.BuilderperiodTo(DateTime periodTo)A period to, to filter by. TransactionsFilter.BuilderoriginalPeriod(DateTime originalPeriodFrom, DateTime originalPeriodTo)An original period from and to, to filter by. TransactionsFilter.BuilderparsedData(String parsedData)The transaction data to filter by. TransactionsFilter.BuilderparsedDataExactKeys(List<String> parsedDataExactKeys)List of keys in parsed data that should only return a match if the value is exactly the same as supplied in ParsedData. TransactionsFilter.BuilderparsedDataNameToOrderBy(String parsedDataNameToOrderBy)The parsed data parameter to order by when orderBy = ByParsedData. TransactionsFilter.BuilderincludeAccounts(boolean includeAccounts)Flag for the option of getting the transaction accounts as a separate meta field TransactionsFilter.BuilderincludeMerchants(boolean includeMerchants)Flag for the option of getting the transaction merchants as a separate meta field TransactionsFilter.Buildertransactions(List<Long> transactionIds)A list of transaction ids to filter by. TransactionsFilter.BuilderonlyUnread(boolean onlyUnread)Filters transactions to only those that have been seen. TransactionsFilter.BuilderonlyFlagged(boolean onlyFlagged)Filters transactions to only those that have been flagged. TransactionsFilter.BuilderonlyUncertain(boolean onlyUncertain)Filters transactions to only those that are marked with uncertain categorization. TransactionsFilter.BuilderaddSortAscending(TransactionSortField field)TransactionsFilter.BuilderaddSortAscending(String field)TransactionsFilter.BuildersortAscending(List<TransactionSortField> fields)TransactionsFilter.BuilderaddSortDescending(TransactionSortField field)TransactionsFilter.BuilderaddSortDescending(String field)TransactionsFilter.BuildersortDescending(List<TransactionSortField> fields)TransactionsFilter.BuilderonlyUncleared(boolean onlyUncleared)TransactionsFilter.BuildermergeFilters(TransactionsFilter filter1, TransactionsFilter filter2)Merges all the non null fields of two existing filters into the builder TransactionsFilterbuild()Builds the transaction filter. -
-
Constructor Detail
-
Builder
Builder()
-
Builder
Builder(TransactionsFilter filter)
-
-
Method Detail
-
createBuilderFromExistingFilter
static TransactionsFilter.Builder createBuilderFromExistingFilter(TransactionsFilter filterToCopy)
Takes in an TransactionFilter and copies its properties to a new builder
- Parameters:
filterToCopy- existing transactionFilter
-
type
TransactionsFilter.Builder type(String type)
-
orderBy
TransactionsFilter.Builder orderBy(SeriesOrderBy order)
-
ascendingOrder
TransactionsFilter.Builder ascendingOrder(boolean ascendingOrder)
-
page
TransactionsFilter.Builder page(int numPerPage, int pageIndex)
How many results should be fetched in a page. Default value is 50
- Parameters:
numPerPage- The number of items in the resultpageIndex- The index of the page to retrieve
-
searchText
TransactionsFilter.Builder searchText(String searchText)
A free-form text to filter by that searches through transaction description, merchant name, category name, currency, tags comments and transaction data.
-
hideExcluded
TransactionsFilter.Builder hideExcluded(boolean hideExcluded)
-
useExactMerchantTexts
TransactionsFilter.Builder useExactMerchantTexts(boolean useExactMerchantTexts)
A flag telling the selector to use exact merchant texts
- Parameters:
useExactMerchantTexts- Boolean to use exact merchant texts
-
uncertainOrFlagged
TransactionsFilter.Builder uncertainOrFlagged(boolean uncertainOrFlagged)
Whether or not to get uncertain categorization or flagged transactions
-
useAbsoluteAmountSearch
TransactionsFilter.Builder useAbsoluteAmountSearch(boolean useAbsoluteAmountSearch)
Whether or not to use absolute amount search.
-
useAccentInsensitiveSearch
TransactionsFilter.Builder useAccentInsensitiveSearch(boolean useAccentInsensitiveSearch)
Whether the search performed is accent insensitive or not.
-
useAmountInCurrencySearch
TransactionsFilter.Builder useAmountInCurrencySearch(boolean useAmountInCurrencySearch)
Whether or not to search for amount in currency instead of amount.
-
useAndSearchForTags
TransactionsFilter.Builder useAndSearchForTags(boolean useAndSearchForTags)
Whether or not tags are searched with AND or OR.
-
useEqualsSearchForBankId
TransactionsFilter.Builder useEqualsSearchForBankId(boolean useEqualsSearchForBankId)
Whether or not BankId is searched with EQUALS or LIKE. If true, exact matches are found, otherwise matches that contain the search string for BankId.
-
useExactDescription
TransactionsFilter.Builder useExactDescription(boolean useExactDescription)
If true, filters by exact (equals) description as opposed to contains (which is the default).
-
useParentMerchantIds
TransactionsFilter.Builder useParentMerchantIds(boolean useParentMerchantIds)
If set to true, parent and the parents children will be found for each merchant id provided in MerchantIds and in ExcludeMerchantIds and theyincluded in the filter.If the merchant has no parent then its children, if any, are added.
-
onlyUncategorized
TransactionsFilter.Builder onlyUncategorized(boolean onlyUncategorized)
Whether or not to only get uncategorized transactions.
-
amounts
TransactionsFilter.Builder amounts(MenigaDecimal from, MenigaDecimal to)
Amounts to search from and to.
-
categories
TransactionsFilter.Builder categories(List<Long> categoryIds)
A list of category ids to filter by.
-
categories
TransactionsFilter.Builder categories(ArrayList<MenigaCategory> categories)
A list of categories to filter by (will be converted to list of ids).
-
category
TransactionsFilter.Builder category(long categoryId)
A category id to filter by.
-
bankIds
TransactionsFilter.Builder bankIds(List<String> bankIds)
List of bankid's to filter by.
-
categoryTypes
TransactionsFilter.Builder categoryTypes(List<CategoryType> categoryTypes)
The category types to filter by.
-
categoryType
TransactionsFilter.Builder categoryType(CategoryType categoryType)
The category type to filter by.
-
comment
TransactionsFilter.Builder comment(String comment)
The transaction comment to filter by. If it's null, it will be ignored. But it is possible to search for empty comments.
-
counterpartyAccountIdentifiers
TransactionsFilter.Builder counterpartyAccountIdentifiers(List<String> counterpartyAccountIdentifiers)
The counterparty account identifers to filter by.
-
description
TransactionsFilter.Builder description(String description)
The transaction description to filter by. If it's null, it will be ignored. But it is possible to search for empty descriptions.
-
excludeMerchantIds
TransactionsFilter.Builder excludeMerchantIds(List<Integer> excludeMerchantIds)
The merchant IDs to exclude.
-
excludeMerchantTexts
TransactionsFilter.Builder excludeMerchantTexts(List<String> excludeMerchantTexts)
The merchant texts to exclude.
-
fields
TransactionsFilter.Builder fields(List<String> fields)
A comma seperated list of what fields should be returned.
-
insertedBefore
TransactionsFilter.Builder insertedBefore(DateTime insertedBefore)
If set, will only return transactions that have insert time before the supplied value.
-
accountIds
TransactionsFilter.Builder accountIds(List<Long> accountIds)
A list of account ids to filter by.
-
accountTypeIds
TransactionsFilter.Builder accountTypeIds(List<Long> accountTypeIds)
A list of account types to filter by (current accounts, credit cards, saving accounts etc.)
-
accounts
TransactionsFilter.Builder accounts(List<MenigaAccount> accounts)
A list of accounts to filter by.
-
account
TransactionsFilter.Builder account(long accountId)
A single account id to filter by. Same as calling accounts with a singleton list
-
accountIdentifiers
TransactionsFilter.Builder accountIdentifiers(List<String> accountIdentifiers)
The account identifiers to filter by.
-
merchantIds
TransactionsFilter.Builder merchantIds(List<Long> merchantIds)
A list of merchant ids to filter by.
-
merchantId
TransactionsFilter.Builder merchantId(long merchantId)
A single merchant id to filter by.
-
merchantTexts
TransactionsFilter.Builder merchantTexts(List<String> merchantTexts)
A list of merchant texts to filter by
-
disableSkipTake
TransactionsFilter.Builder disableSkipTake()
-
merchantText
TransactionsFilter.Builder merchantText(String merchantText)
A single merchant text to filter by.Shorthand for using the merchantTexts method passing a list with a single entry.
-
tags
TransactionsFilter.Builder tags(List<String> tags)
A list of tag strings to filter by.
-
tag
TransactionsFilter.Builder tag(String tag)
A single tag to filter by
-
period
TransactionsFilter.Builder period(DateTime periodFrom, DateTime periodTo)
A period from and to, to filter by.
-
periodFrom
TransactionsFilter.Builder periodFrom(DateTime periodFrom)
A period from to filter by.
-
periodTo
TransactionsFilter.Builder periodTo(DateTime periodTo)
A period to, to filter by.
-
originalPeriod
TransactionsFilter.Builder originalPeriod(DateTime originalPeriodFrom, DateTime originalPeriodTo)
An original period from and to, to filter by.
-
parsedData
TransactionsFilter.Builder parsedData(String parsedData)
The transaction data to filter by.
-
parsedDataExactKeys
TransactionsFilter.Builder parsedDataExactKeys(List<String> parsedDataExactKeys)
List of keys in parsed data that should only return a match if the value is exactly the same as supplied in ParsedData.
-
parsedDataNameToOrderBy
TransactionsFilter.Builder parsedDataNameToOrderBy(String parsedDataNameToOrderBy)
The parsed data parameter to order by when orderBy = ByParsedData.
-
includeAccounts
TransactionsFilter.Builder includeAccounts(boolean includeAccounts)
Flag for the option of getting the transaction accounts as a separate meta field
-
includeMerchants
TransactionsFilter.Builder includeMerchants(boolean includeMerchants)
Flag for the option of getting the transaction merchants as a separate meta field
-
transactions
TransactionsFilter.Builder transactions(List<Long> transactionIds)
A list of transaction ids to filter by.
-
onlyUnread
TransactionsFilter.Builder onlyUnread(boolean onlyUnread)
Filters transactions to only those that have been seen.
-
onlyFlagged
TransactionsFilter.Builder onlyFlagged(boolean onlyFlagged)
Filters transactions to only those that have been flagged.
-
onlyUncertain
TransactionsFilter.Builder onlyUncertain(boolean onlyUncertain)
Filters transactions to only those that are marked with uncertain categorization.
-
addSortAscending
TransactionsFilter.Builder addSortAscending(TransactionSortField field)
-
addSortAscending
TransactionsFilter.Builder addSortAscending(String field)
-
sortAscending
TransactionsFilter.Builder sortAscending(List<TransactionSortField> fields)
-
addSortDescending
TransactionsFilter.Builder addSortDescending(TransactionSortField field)
-
addSortDescending
TransactionsFilter.Builder addSortDescending(String field)
-
sortDescending
TransactionsFilter.Builder sortDescending(List<TransactionSortField> fields)
-
onlyUncleared
TransactionsFilter.Builder onlyUncleared(boolean onlyUncleared)
-
mergeFilters
TransactionsFilter.Builder mergeFilters(TransactionsFilter filter1, TransactionsFilter filter2)
Merges all the non null fields of two existing filters into the builder
- Parameters:
filter1- Filter to merge non null fields number 1filter2- Filter to merge non null fields number 2
-
build
TransactionsFilter build()
Builds the transaction filter.
-
-
-
-