1 /*
2 * MoneyWise: Finance Application
3 * Copyright 2012-2026. Tony Washer
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy
7 * of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17 package io.github.tonywasher.joceanus.moneywise.data.basic;
18
19 import java.util.Currency;
20
21 import io.github.tonywasher.joceanus.metis.data.MetisDataItem.MetisDataNamedItem;
22 import io.github.tonywasher.joceanus.moneywise.data.statics.MoneyWiseCurrency;
23 import io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem;
24
25 /**
26 * Interface for objects (Deposits, SecurityHoldings etc.) used in a transaction.
27 */
28 public interface MoneyWiseTransAsset
29 extends MetisDataNamedItem {
30 /**
31 * Obtain the asset id.
32 *
33 * @return the id
34 */
35 Long getExternalId();
36
37 @Override
38 String getName();
39
40 /**
41 * Is the asset closed?
42 *
43 * @return true/false
44 */
45 Boolean isClosed();
46
47 /**
48 * Obtain Asset Type.
49 *
50 * @return the Asset type
51 */
52 MoneyWiseAssetType getAssetType();
53
54 /**
55 * Obtain the parent.
56 *
57 * @return the parent
58 */
59 MoneyWiseAssetBase getParent();
60
61 /**
62 * Is the Asset taxFree?
63 *
64 * @return true/false
65 */
66 boolean isTaxFree();
67
68 /**
69 * Is the Asset gross?
70 *
71 * @return true/false
72 */
73 boolean isGross();
74
75 /**
76 * Is the Asset foreign?
77 *
78 * @return true/false
79 */
80 boolean isForeign();
81
82 /**
83 * Touch underlying item.
84 *
85 * @param pItem the object that is touching the item
86 */
87 void touchItem(PrometheusDataItem pItem);
88
89 /**
90 * Is the account capital?
91 *
92 * @return true/false
93 */
94 boolean isCapital();
95
96 /**
97 * Is the account shares?
98 *
99 * @return true/false
100 */
101 boolean isShares();
102
103 /**
104 * Is the account autoExpense?
105 *
106 * @return true/false
107 */
108 boolean isAutoExpense();
109
110 /**
111 * Is the asset hidden?
112 *
113 * @return true/false
114 */
115 boolean isHidden();
116
117 /**
118 * Obtain the currency of the Asset.
119 *
120 * @return the currency
121 */
122 MoneyWiseCurrency getAssetCurrency();
123
124 /**
125 * Obtain the currency of the Asset.
126 *
127 * @return the currency
128 */
129 Currency getCurrency();
130 }