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

Public Member Functions

boolean isActive ()
 
void setActive (boolean active)
 
long getId ()
 
void setId (long id)
 
long getIdContract ()
 
void setIdContract (long idContract)
 
long getIdOperator ()
 
void setIdOperator (long idOperator)
 
double getMarketPrice ()
 
void setMarketPrice (double marketPrice)
 
String getName ()
 
void setName (String name)
 
double getCostHour ()
 
void setCostHour (double costHour)
 
List< OwnedAptitudegetOwnedAptitudes ()
 
void setOwnedAptitudes (List< OwnedAptitude > ownedAptitudes)
 
double getPriceHour ()
 
void setPriceHour (double priceHour)
 
Contract getContract ()
 
void setContract (Contract contract)
 
ContractParticipant getOperator ()
 
void setOperator (ContractParticipant operator)
 
boolean fits (IContact contact)
 
boolean fits (AptitudeDegree required, Date now)
 
void prepareForSaving ()
 
Collection< OwnedAptitudegetActiveAptitudes (Date date)
 
boolean isInternal ()
 
HumanResourceAptitude getDefaultHumanResourceAptitude (Date date)
 

Detailed Description

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

Definition at line 40 of file HumanResource.java.

Member Function Documentation

◆ fits() [1/2]

boolean org.turro.erp.entity.HumanResource.fits ( AptitudeDegree  required,
Date  now 
)

Definition at line 176 of file HumanResource.java.

176  {
177  return required.isIn(new AptituteDegreeAdapter(getActiveAptitudes(now)));
178  }
Collection< OwnedAptitude > getActiveAptitudes(Date date)
Here is the call graph for this function:

◆ fits() [2/2]

boolean org.turro.erp.entity.HumanResource.fits ( IContact  contact)

Helpers

Definition at line 168 of file HumanResource.java.

168  {
169  Contract contract = getContract();
170  ContractParticipant participant = getOperator();
171  return contact != null &&
172  ((contract != null && contract.getContractor().equals(contact.getId())) ||
173  (participant != null && participant.getIdContact().equals(contact.getId())));
174  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getActiveAptitudes()

Collection<OwnedAptitude> org.turro.erp.entity.HumanResource.getActiveAptitudes ( Date  date)

Definition at line 189 of file HumanResource.java.

189  {
190  CheckDate cd = new CheckDate(date);
191  ArrayList<OwnedAptitude> soo = new ArrayList<OwnedAptitude>();
192  for(OwnedAptitude oo : getOwnedAptitudes()) {
193  if(cd.isDateActive(oo.getInitialDate(), oo.getFinalDate())) {
194  soo.add(oo);
195  }
196  }
197  return soo;
198  }
List< OwnedAptitude > getOwnedAptitudes()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getContract()

Contract org.turro.erp.entity.HumanResource.getContract ( )

Definition at line 142 of file HumanResource.java.

142  {
143  return contract.getEntity(idContract);
144  }
Here is the caller graph for this function:

◆ getCostHour()

double org.turro.erp.entity.HumanResource.getCostHour ( )

Definition at line 108 of file HumanResource.java.

108  {
109  return costHour;
110  }
Here is the caller graph for this function:

◆ getDefaultHumanResourceAptitude()

HumanResourceAptitude org.turro.erp.entity.HumanResource.getDefaultHumanResourceAptitude ( Date  date)

Definition at line 208 of file HumanResource.java.

208  {
209  HumanResourceAptitude hra = null;
210  for(OwnedAptitude oo : getActiveAptitudes(date)) {
211  hra = new HumanResourceAptitude(this, false, oo.getAptitudeDegree());
212  if(oo.isDefaultDegree()) break;
213  }
214  return hra;
215  }
Here is the call graph for this function:

◆ getId()

long org.turro.erp.entity.HumanResource.getId ( )

Definition at line 68 of file HumanResource.java.

68  {
69  return id;
70  }
Here is the caller graph for this function:

◆ getIdContract()

long org.turro.erp.entity.HumanResource.getIdContract ( )

Definition at line 76 of file HumanResource.java.

76  {
77  return idContract;
78  }
Here is the caller graph for this function:

◆ getIdOperator()

long org.turro.erp.entity.HumanResource.getIdOperator ( )

Definition at line 84 of file HumanResource.java.

84  {
85  return idOperator;
86  }

◆ getMarketPrice()

double org.turro.erp.entity.HumanResource.getMarketPrice ( )

Definition at line 92 of file HumanResource.java.

92  {
93  return marketPrice;
94  }
Here is the caller graph for this function:

◆ getName()

String org.turro.erp.entity.HumanResource.getName ( )

Definition at line 100 of file HumanResource.java.

100  {
101  return name;
102  }
Here is the caller graph for this function:

◆ getOperator()

ContractParticipant org.turro.erp.entity.HumanResource.getOperator ( )

Definition at line 158 of file HumanResource.java.

158  {
159  return operator.getEntity(idOperator);
160  }
Here is the caller graph for this function:

◆ getOwnedAptitudes()

List<OwnedAptitude> org.turro.erp.entity.HumanResource.getOwnedAptitudes ( )

Definition at line 116 of file HumanResource.java.

116  {
117  return ownedAptitudes;
118  }
Here is the caller graph for this function:

◆ getPriceHour()

double org.turro.erp.entity.HumanResource.getPriceHour ( )

Definition at line 124 of file HumanResource.java.

124  {
125  return priceHour;
126  }
Here is the caller graph for this function:

◆ isActive()

boolean org.turro.erp.entity.HumanResource.isActive ( )

Definition at line 60 of file HumanResource.java.

60  {
61  return active;
62  }

◆ isInternal()

boolean org.turro.erp.entity.HumanResource.isInternal ( )

Definition at line 200 of file HumanResource.java.

200  {
201  Contract c = getContract();
202  if(c != null) {
203  return c.getContractDefinition().getId() == 26;
204  }
205  return true;
206  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareForSaving()

void org.turro.erp.entity.HumanResource.prepareForSaving ( )

Definition at line 180 of file HumanResource.java.

180  {
181  Contract c = getContract();
182  name = c.getIContractor().getName();
183  ContractParticipant cp = getOperator();
184  if(cp != null) {
185  name = cp.getName() + " - " + name;
186  }
187  }
Here is the call graph for this function:

◆ setActive()

void org.turro.erp.entity.HumanResource.setActive ( boolean  active)

Definition at line 64 of file HumanResource.java.

64  {
65  this.active = active;
66  }

◆ setContract()

void org.turro.erp.entity.HumanResource.setContract ( Contract  contract)

Definition at line 146 of file HumanResource.java.

146  {
147  idContract = this.contract.setEntity(contract);
148  }

◆ setCostHour()

void org.turro.erp.entity.HumanResource.setCostHour ( double  costHour)

Definition at line 112 of file HumanResource.java.

112  {
113  this.costHour = costHour;
114  }

◆ setId()

void org.turro.erp.entity.HumanResource.setId ( long  id)

Definition at line 72 of file HumanResource.java.

72  {
73  this.id = id;
74  }

◆ setIdContract()

void org.turro.erp.entity.HumanResource.setIdContract ( long  idContract)

Definition at line 80 of file HumanResource.java.

80  {
81  this.idContract = idContract;
82  }

◆ setIdOperator()

void org.turro.erp.entity.HumanResource.setIdOperator ( long  idOperator)

Definition at line 88 of file HumanResource.java.

88  {
89  this.idOperator = idOperator;
90  }

◆ setMarketPrice()

void org.turro.erp.entity.HumanResource.setMarketPrice ( double  marketPrice)

Definition at line 96 of file HumanResource.java.

96  {
97  this.marketPrice = marketPrice;
98  }

◆ setName()

void org.turro.erp.entity.HumanResource.setName ( String  name)

Definition at line 104 of file HumanResource.java.

104  {
105  this.name = name;
106  }

◆ setOperator()

void org.turro.erp.entity.HumanResource.setOperator ( ContractParticipant  operator)

Definition at line 162 of file HumanResource.java.

162  {
163  idOperator = this.operator.setEntity(operator);
164  }

◆ setOwnedAptitudes()

void org.turro.erp.entity.HumanResource.setOwnedAptitudes ( List< OwnedAptitude ownedAptitudes)

Definition at line 120 of file HumanResource.java.

120  {
121  this.ownedAptitudes = ownedAptitudes;
122  }

◆ setPriceHour()

void org.turro.erp.entity.HumanResource.setPriceHour ( double  priceHour)

Definition at line 128 of file HumanResource.java.

128  {
129  this.priceHour = priceHour;
130  }

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