BrightSide Workbench Full Report + Source Code
org.turro.financials.treasury.m303.ModelEntry Class Reference
Inheritance diagram for org.turro.financials.treasury.m303.ModelEntry:
Collaboration diagram for org.turro.financials.treasury.m303.ModelEntry:

Public Member Functions

 ModelEntry (ModelSet set, ModelType type, int exercise)
 
Dao getDao ()
 
int getExercise ()
 
EntryQuarter getQuarter (int index)
 
ModelType getType ()
 
int compareTo (ModelEntry o)
 
Set< Integer > getPossibleVats ()
 

Detailed Description

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

Definition at line 30 of file m303/ModelEntry.java.

Constructor & Destructor Documentation

◆ ModelEntry()

org.turro.financials.treasury.m303.ModelEntry.ModelEntry ( ModelSet  set,
ModelType  type,
int  exercise 
)

Definition at line 38 of file m303/ModelEntry.java.

38  {
39  this.set = set;
40  this.type = type;
41  this.exercise = exercise;
42  quarter[0] = new EntryQuarter(this, 1);
43  quarter[1] = new EntryQuarter(this, 2);
44  quarter[2] = new EntryQuarter(this, 3);
45  quarter[3] = new EntryQuarter(this, 4);
46  }

Member Function Documentation

◆ compareTo()

int org.turro.financials.treasury.m303.ModelEntry.compareTo ( ModelEntry  o)

Definition at line 65 of file m303/ModelEntry.java.

65  {
66  return CompareUtil.compare(type.getOrder(), o.type.getOrder());
67  }
Here is the call graph for this function:

◆ getDao()

Dao org.turro.financials.treasury.m303.ModelEntry.getDao ( )

Definition at line 48 of file m303/ModelEntry.java.

48  {
49  return set.getDao();
50  }
Here is the caller graph for this function:

◆ getExercise()

int org.turro.financials.treasury.m303.ModelEntry.getExercise ( )

Definition at line 52 of file m303/ModelEntry.java.

52  {
53  return exercise;
54  }
Here is the caller graph for this function:

◆ getPossibleVats()

Set<Integer> org.turro.financials.treasury.m303.ModelEntry.getPossibleVats ( )

Definition at line 69 of file m303/ModelEntry.java.

69  {
70  if(vats == null) {
71  vats = new TreeSet<Integer>();
72  List<String> l = getDao().getResultList(
73  "select distinct e.account.id from RegisterEntry e " +
74  "where year(e.register.registerDate) = ? " +
75  "and e.register.view.id = 1 " +
76  "and (e.register.exclude = FALSE and e.register.closing = FALSE and e.register.regularizeVAT = FALSE) " +
77  "and e.account.id like ?",
78  new Object[] { getExercise(), getType().getVatAccount() });
79  for(String s : l) {
80  vats.add(Integer.valueOf(s.substring(7)));
81  }
82  }
83  return vats;
84  }
Here is the call graph for this function:

◆ getQuarter()

EntryQuarter org.turro.financials.treasury.m303.ModelEntry.getQuarter ( int  index)

Definition at line 56 of file m303/ModelEntry.java.

56  {
57  return quarter[index];
58  }
Here is the caller graph for this function:

◆ getType()

ModelType org.turro.financials.treasury.m303.ModelEntry.getType ( )

Definition at line 60 of file m303/ModelEntry.java.

60  {
61  return type;
62  }
Here is the caller graph for this function:

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