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

Public Member Functions

 ModelEntry (ModelSet set, ModelType type, int exercise)
 
Dao getDao ()
 
int getExercise ()
 
EntryMonth getMonth (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 32 of file m303m/ModelEntry.java.

Constructor & Destructor Documentation

◆ ModelEntry()

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

Definition at line 40 of file m303m/ModelEntry.java.

40  {
41  this.set = set;
42  this.type = type;
43  this.exercise = exercise;
44  month[0] = new EntryMonth(this, 1);
45  month[1] = new EntryMonth(this, 2);
46  month[2] = new EntryMonth(this, 3);
47  month[3] = new EntryMonth(this, 4);
48  month[4] = new EntryMonth(this, 5);
49  month[5] = new EntryMonth(this, 6);
50  month[6] = new EntryMonth(this, 7);
51  month[7] = new EntryMonth(this, 8);
52  month[8] = new EntryMonth(this, 9);
53  month[9] = new EntryMonth(this, 10);
54  month[10] = new EntryMonth(this, 11);
55  month[11] = new EntryMonth(this, 12);
56  }

Member Function Documentation

◆ compareTo()

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

Definition at line 75 of file m303m/ModelEntry.java.

75  {
76  return CompareUtil.compare(type.getOrder(), o.type.getOrder());
77  }
Here is the call graph for this function:

◆ getDao()

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

Definition at line 58 of file m303m/ModelEntry.java.

58  {
59  return set.getDao();
60  }
Here is the caller graph for this function:

◆ getExercise()

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

Definition at line 62 of file m303m/ModelEntry.java.

62  {
63  return exercise;
64  }
Here is the caller graph for this function:

◆ getMonth()

EntryMonth org.turro.financials.treasury.m303m.ModelEntry.getMonth ( int  index)

Definition at line 66 of file m303m/ModelEntry.java.

66  {
67  return month[index];
68  }
Here is the caller graph for this function:

◆ getPossibleVats()

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

Definition at line 79 of file m303m/ModelEntry.java.

79  {
80  if(vats == null) {
81  vats = new TreeSet<Integer>();
82  List<String> l = getDao().getResultList(
83  "select distinct e.account.id from RegisterEntry e " +
84  "where year(e.register.registerDate) = ? " +
85  "and e.register.view.id = 1 " +
86  "and (e.register.exclude = FALSE and e.register.closing = FALSE and e.register.regularizeVAT = FALSE) " +
87  "and e.account.id like ?",
88  new Object[] { getExercise(), getType().getVatAccount() });
89  for(String s : l) {
90  vats.add(Integer.valueOf(s.substring(7)));
91  }
92  }
93  return vats;
94  }
Here is the call graph for this function:

◆ getType()

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

Definition at line 70 of file m303m/ModelEntry.java.

70  {
71  return type;
72  }
Here is the caller graph for this function:

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