BrightSide Workbench Full Report + Source Code
org.turro.financials.account.logic.BankAccounts Class Reference

Static Public Member Functions

static Collection< StatementEntrygetMovements (String account, Date start, Date end)
 
static void importN43 (final Contract contract)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 59 of file BankAccounts.java.

Member Function Documentation

◆ getMovements()

static Collection<StatementEntry> org.turro.financials.account.logic.BankAccounts.getMovements ( String  account,
Date  start,
Date  end 
)
static

Definition at line 63 of file BankAccounts.java.

63  {
64  Contract contract = null;
65  if(!Strings.isBlank(account) && account.length() == 10) {
66  contract = getContract(account);
67  }
68  ArrayList<StatementEntry> list = new ArrayList<>();
69  if(contract != null) {
70  Dao dao = new FinancialsPU();
71  for(BankAccount ba : (List<BankAccount>) dao.getResultList(
72  "select ba from BankAccount ba " +
73  "where ba.contract = ? " +
74  "and ba.transactionDate >= ? " +
75  "and ba.transactionDate <= ?",
76  new Object[] {
77  contract, start, end
78  })) {
79  list.add(new BankEntry(ba));
80  }
81  }
82  return list;
83  }
Here is the caller graph for this function:

◆ importN43()

static void org.turro.financials.account.logic.BankAccounts.importN43 ( final Contract  contract)
static

Definition at line 85 of file BankAccounts.java.

85  {
86  final File n43 = new File(ElephantContext.getRealPath(BANK_IMPORT));
87  FileWrapper fw = new FileWrapper(n43);
88  fw.uploadContent(new Command() {
89  @Override
90  public Object execute(Context context) {
91  if(!importFromXls(contract, n43)) {
92  try {
93  importFromFile(contract, n43);
94  } catch (IOException ex) {
95  Logger.getLogger(BankAccounts.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
96  }
97  }
98  return null;
99  }
100 
101  });
102  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: