BrightSide Workbench Full Report + Source Code
OwnedAptitude.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.erp.entity;
19 
20 import java.util.Date;
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.GeneratedValue;
24 import javax.persistence.GenerationType;
25 import javax.persistence.Id;
26 import javax.persistence.ManyToOne;
27 import javax.persistence.Temporal;
28 import javax.persistence.TemporalType;
29 
34 @Entity
35 public class OwnedAptitude implements java.io.Serializable {
36 
37  @Id
38  @GeneratedValue(strategy= GenerationType.IDENTITY)
39  @Column(name="IDENTIFIER")
40  private long id;
41 
42  @Temporal(value = TemporalType.DATE)
43  private Date initialDate;
44 
45  @Temporal(value = TemporalType.DATE)
46  private Date finalDate;
47 
48  @ManyToOne
49  private HumanResource humanResource;
50 
51  @ManyToOne
52  private AptitudeDegree aptitudeDegree;
53 
54  private boolean defaultDegree;
55 
56  public boolean isDefaultDegree() {
57  return defaultDegree;
58  }
59 
60  public void setDefaultDegree(boolean defaultDegree) {
61  this.defaultDegree = defaultDegree;
62  }
63 
64  public Date getFinalDate() {
65  return finalDate;
66  }
67 
68  public void setFinalDate(Date finalDate) {
69  this.finalDate = finalDate;
70  }
71 
73  return humanResource;
74  }
75 
76  public void setHumanResource(HumanResource humanResource) {
77  this.humanResource = humanResource;
78  }
79 
80  public long getId() {
81  return id;
82  }
83 
84  public void setId(long id) {
85  this.id = id;
86  }
87 
88  public Date getInitialDate() {
89  return initialDate;
90  }
91 
92  public void setInitialDate(Date initialDate) {
93  this.initialDate = initialDate;
94  }
95 
97  return aptitudeDegree;
98  }
99 
100  public void setAptitudeDegree(AptitudeDegree aptitudeDegree) {
101  this.aptitudeDegree = aptitudeDegree;
102  }
103 
104  /* Helpers */
105 
106  public String getName() {
107  return humanResource.getName() +
108  " - " +
109  aptitudeDegree.getFullName();
110  }
111 }
void setDefaultDegree(boolean defaultDegree)
void setInitialDate(Date initialDate)
void setHumanResource(HumanResource humanResource)
void setAptitudeDegree(AptitudeDegree aptitudeDegree)