◆ AccountReportItem()
org.turro.financials.report.AccountReportItem.AccountReportItem |
( |
String |
label | ) |
|
◆ addItem() [1/2]
◆ addItem() [2/2]
AccountReportItem org.turro.financials.report.AccountReportItem.addItem |
( |
String |
label | ) |
|
Definition at line 46 of file AccountReportItem.java.
AccountReportItem(String label)
AccountReportItem addItem(String label)
◆ addPattern()
void org.turro.financials.report.AccountReportItem.addPattern |
( |
String |
pattern | ) |
|
◆ getAccumulatedFor()
double org.turro.financials.report.AccountReportItem.getAccumulatedFor |
( |
AccountReportPeriod |
period | ) |
|
Definition at line 217 of file AccountReportItem.java.
218 AccountReportPeriod p = period ==
null ? null :
getPeriodFor(period);
219 double accumulated = p ==
null ? 0.0 : p.getValue();
221 accumulated += item.getAccumulatedFor(period);
AccountReportPeriod getPeriodFor(AccountReportPeriod accountReportPeriod)
◆ getChildren()
List<AccountReportItem> org.turro.financials.report.AccountReportItem.getChildren |
( |
| ) |
|
◆ getItem()
AccountReportItem org.turro.financials.report.AccountReportItem.getItem |
( |
String |
label | ) |
|
Definition at line 124 of file AccountReportItem.java.
125 if(!Strings.isBlank(label)) {
127 if(label.equals(ari.getLabel())) {
◆ getLabel()
String org.turro.financials.report.AccountReportItem.getLabel |
( |
| ) |
|
◆ getMode()
ItemMode org.turro.financials.report.AccountReportItem.getMode |
( |
| ) |
|
◆ getParent()
◆ getPeriodFor()
Definition at line 162 of file AccountReportItem.java.
163 for(AccountReportPeriod period :
getPeriods()) {
164 if(period.getYear() == accountReportPeriod.getYear() && period.getMonth() == accountReportPeriod.getMonth()) {
◆ getPeriods()
PeriodSet org.turro.financials.report.AccountReportItem.getPeriods |
( |
| ) |
|
◆ getReport()
AccountReport org.turro.financials.report.AccountReportItem.getReport |
( |
| ) |
|
◆ getTotalItem()
Definition at line 202 of file AccountReportItem.java.
205 total.setParent(parent);
206 total.setReport(report);
207 total.setTotalItem(
true);
208 for(AccountReportPeriod period : periods) {
209 AccountReportPeriod arp =
new AccountReportPeriod(period.getYear(), period.getMonth());
212 total.getPeriods().add(arp);
double getAccumulatedFor(AccountReportPeriod period)
◆ isShowTotal()
boolean org.turro.financials.report.AccountReportItem.isShowTotal |
( |
| ) |
|
◆ isTitleItem()
boolean org.turro.financials.report.AccountReportItem.isTitleItem |
( |
| ) |
|
◆ isTotalItem()
boolean org.turro.financials.report.AccountReportItem.isTotalItem |
( |
| ) |
|
◆ loadData()
PeriodSet org.turro.financials.report.AccountReportItem.loadData |
( |
PeriodSet |
existingPeriods | ) |
|
Definition at line 139 of file AccountReportItem.java.
140 if(periods ==
null) {
141 periods =
new PeriodSet();
142 if(!patterns.isEmpty()) {
143 String sqlQuery = getSQLQuery();
144 if(!sqlQuery.contains(
"in ()")) {
146 for(Object[] o : (List<Object[]>) l) {
147 AccountReportPeriod arp =
new AccountReportPeriod((Integer) o[0], (Integer) o[1]);
148 arp.setValue((Double) o[2]);
151 existingPeriods.add(arp);
156 ari.loadData(existingPeriods);
AccountReport getReport()
◆ regularizeMode()
void org.turro.financials.report.AccountReportItem.regularizeMode |
( |
PeriodSet |
existingPeriods | ) |
|
Definition at line 171 of file AccountReportItem.java.
172 for(AccountReportPeriod period : existingPeriods) {
173 AccountReportPeriod arp =
new AccountReportPeriod(period.getYear(), period.getMonth());
177 if(mode == ItemMode.BY_YEAR) {
178 double acumulated = 0;
180 for(AccountReportPeriod period :
getPeriods()) {
181 if(period.getYear() == year) {
182 acumulated += period.getValue();
184 acumulated = period.getValue();
185 year = period.getYear();
187 period.setValue(acumulated);
189 }
else if(mode == ItemMode.BY_TAM) {
190 TamBuffer tam =
new TamBuffer();
191 for(AccountReportPeriod period :
getPeriods()) {
192 tam.add(period.getValue());
193 period.setValue(tam.getTotal());
198 ari.regularizeMode(existingPeriods);
◆ setLabel()
void org.turro.financials.report.AccountReportItem.setLabel |
( |
String |
label | ) |
|
◆ setMode()
void org.turro.financials.report.AccountReportItem.setMode |
( |
ItemMode |
mode | ) |
|
◆ setParent()
void org.turro.financials.report.AccountReportItem.setParent |
( |
AccountReportItem |
parent | ) |
|
◆ setReport()
void org.turro.financials.report.AccountReportItem.setReport |
( |
AccountReport |
report | ) |
|
◆ setShowTotal()
void org.turro.financials.report.AccountReportItem.setShowTotal |
( |
boolean |
showTotal | ) |
|
◆ setTotalItem()
void org.turro.financials.report.AccountReportItem.setTotalItem |
( |
boolean |
totalItem | ) |
|
The documentation for this class was generated from the following file: