- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 43 of file ReportBody.java.
◆ ReportBody()
org.turro.financials.report.ReportBody.ReportBody |
( |
String |
name | ) |
|
◆ fill()
void org.turro.financials.report.ReportBody.fill |
( |
Date |
start, |
|
|
Date |
end |
|
) |
| |
Definition at line 95 of file ReportBody.java.
96 if(values !=
null) values.clear();
97 if(sum !=
null) sum.clear();
98 WhereClause wc =
new WhereClause();
99 wc.addClause(
"select e from RegisterEntry e");
100 wc.addClause(
"where e.register.registerDate >= :start");
101 wc.addClause(
"and e.register.registerDate <= :end");
102 wc.addNamedValue(
"start", start);
103 wc.addNamedValue(
"end", end);
104 try(Stream<RegisterEntry> entries =
new FinancialsPU().stream(RegisterEntry.class, wc)) {
105 entries.forEach((e) -> {
110 if(sum ==
null) sum =
new HashMap<>();
111 for(ReportRow row :
getRows()) {
113 sum.put(row.getGroup(),
new HashMap<>());
TreeSet< ReportRow > getRows()
◆ getColumns()
TreeSet<ReportColumn> org.turro.financials.report.ReportBody.getColumns |
( |
| ) |
|
Definition at line 65 of file ReportBody.java.
66 if(columns ==
null) columns =
new TreeSet<>();
◆ getFile()
File org.turro.financials.report.ReportBody.getFile |
( |
| ) |
|
◆ getName()
String org.turro.financials.report.ReportBody.getName |
( |
| ) |
|
◆ getRows()
TreeSet<ReportRow> org.turro.financials.report.ReportBody.getRows |
( |
| ) |
|
Definition at line 60 of file ReportBody.java.
61 if(rows ==
null) rows =
new TreeSet<>();
◆ getSum()
Double org.turro.financials.report.ReportBody.getSum |
( |
ReportRow |
row, |
|
|
ReportColumn |
column, |
|
|
String |
group |
|
) |
| |
Definition at line 80 of file ReportBody.java.
82 Double total = sum.get(group).get(generateKey(
null, column));
83 sum.get(group).put(generateKey(
null, column), 0.0);
85 return row.isNegate() ? -total : total;
◆ getValue()
Definition at line 70 of file ReportBody.java.
72 Double accumulate = values.get(generateKey(row, column));
73 if(accumulate !=
null) {
74 return formatAndAddSum(row, column, accumulate);
◆ hasValues()
boolean org.turro.financials.report.ReportBody.hasValues |
( |
| ) |
|
Definition at line 118 of file ReportBody.java.
119 return values !=
null && !values.isEmpty();
◆ load()
static ReportBody org.turro.financials.report.ReportBody.load |
( |
File |
file | ) |
|
|
static |
Definition at line 195 of file ReportBody.java.
199 JSONSerializer ser =
new JSONSerializer(
true);
200 body = ser.fromJson(FileUtil.getContent(file),
ReportBody.class);
202 }
catch (IOException ex) {
203 Logger.getLogger(
ReportBody.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ reports()
static List<ReportBody> org.turro.financials.report.ReportBody.reports |
( |
| ) |
|
|
static |
Definition at line 183 of file ReportBody.java.
184 File root =
new File(ElephantContext.getRealPath(dveRoot));
186 List<ReportBody>
reports =
new ArrayList<>();
187 for(File file : root.listFiles()) {
188 if(file.isFile() && !file.isHidden()) {
static List< ReportBody > reports()
The documentation for this class was generated from the following file: