BrightSide Workbench Full Report + Source Code
org.turro.financials.entity.MajorAccount Class Reference
Inheritance diagram for org.turro.financials.entity.MajorAccount:
Collaboration diagram for org.turro.financials.entity.MajorAccount:

Public Member Functions

String getAccount ()
 
void setAccount (String account)
 
BookDefinition getBookDefinition ()
 
void setBookDefinition (BookDefinition bookDefinition)
 
List< MajorAccountgetDescendants ()
 
String getDescription ()
 
void setDescription (String description)
 
long getId ()
 
void setId (long id)
 
MajorAccountType getType ()
 
void setType (MajorAccountType type)
 
MajorAccount getParent ()
 
List< AccountgetAccounts ()
 

Static Public Member Functions

static MajorAccount getMajor (String account)
 

Detailed Description

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

Definition at line 30 of file MajorAccount.java.

Member Function Documentation

◆ getAccount()

String org.turro.financials.entity.MajorAccount.getAccount ( )

Definition at line 46 of file MajorAccount.java.

46  {
47  return account;
48  }
Here is the caller graph for this function:

◆ getAccounts()

List<Account> org.turro.financials.entity.MajorAccount.getAccounts ( )

Definition at line 114 of file MajorAccount.java.

114  {
115  if(account != null) {
116  return new FinancialsPU().getResultList(
117  "select a from Account as a " +
118  "where exists ( " +
119  " select ma from MajorAccount as ma " +
120  " where ma.account = '" + account + "' " +
121  " and a.id like concat(ma.account, '_%') " +
122  " and not exists ( " +
123  " select ma2 from MajorAccount as ma2 " +
124  " where ma2.account like concat(ma.account, '0%') " +
125  " ) " +
126  ") " +
127  "order by a.id");
128  }
129  return Collections.EMPTY_LIST;
130  }

◆ getBookDefinition()

BookDefinition org.turro.financials.entity.MajorAccount.getBookDefinition ( )

Definition at line 54 of file MajorAccount.java.

54  {
55  return bookDefinition;
56  }
Here is the caller graph for this function:

◆ getDescendants()

List<MajorAccount> org.turro.financials.entity.MajorAccount.getDescendants ( )

Definition at line 62 of file MajorAccount.java.

62  {
63  if(account != null) {
64  return new FinancialsPU().getResultList(
65  "select m from MajorAccount as m " +
66  "where m.account like '" + account + "_' " +
67  "and exists ( " +
68  " select re from RegisterEntry as re " +
69  " where re.account.id like concat(m.account, '%') " +
70  ") " +
71  "order by m.account");
72  //account.substring(0, account.length() - 1)+ "?'"));
73  }
74  return Collections.EMPTY_LIST;
75  }
Here is the caller graph for this function:

◆ getDescription()

String org.turro.financials.entity.MajorAccount.getDescription ( )

Definition at line 77 of file MajorAccount.java.

77  {
78  return description;
79  }
Here is the caller graph for this function:

◆ getId()

long org.turro.financials.entity.MajorAccount.getId ( )

Definition at line 85 of file MajorAccount.java.

85  {
86  return id;
87  }

◆ getMajor()

static MajorAccount org.turro.financials.entity.MajorAccount.getMajor ( String  account)
static

Definition at line 132 of file MajorAccount.java.

132  {
133  if(account != null && account.length() > 1) {
134  return (MajorAccount) new FinancialsPU().getSingleResult(
135  "select m from MajorAccount as m where m.account = '" +
136  account + "'");
137  }
138  return null;
139  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParent()

MajorAccount org.turro.financials.entity.MajorAccount.getParent ( )

Definition at line 101 of file MajorAccount.java.

101  {
102  if(account != null && account.length() > 1) {
103  List l = new FinancialsPU().getResultList(
104  "select m from MajorAccount as m where m.account = '" +
105  account.substring(0, account.length() - 1)+ "' " +
106  "order by m.account");
107  if(!l.isEmpty()) {
108  return (MajorAccount) l.get(0);
109  }
110  }
111  return null;
112  }

◆ getType()

MajorAccountType org.turro.financials.entity.MajorAccount.getType ( )

Definition at line 93 of file MajorAccount.java.

93  {
94  return type;
95  }

◆ setAccount()

void org.turro.financials.entity.MajorAccount.setAccount ( String  account)

Definition at line 50 of file MajorAccount.java.

50  {
51  this.account = account;
52  }

◆ setBookDefinition()

void org.turro.financials.entity.MajorAccount.setBookDefinition ( BookDefinition  bookDefinition)

Definition at line 58 of file MajorAccount.java.

58  {
59  this.bookDefinition = bookDefinition;
60  }

◆ setDescription()

void org.turro.financials.entity.MajorAccount.setDescription ( String  description)

Definition at line 81 of file MajorAccount.java.

81  {
82  this.description = description;
83  }

◆ setId()

void org.turro.financials.entity.MajorAccount.setId ( long  id)

Definition at line 89 of file MajorAccount.java.

89  {
90  this.id = id;
91  }

◆ setType()

void org.turro.financials.entity.MajorAccount.setType ( MajorAccountType  type)

Definition at line 97 of file MajorAccount.java.

97  {
98  this.type = type;
99  }

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