BrightSide Workbench Full Report + Source Code
TimeControl.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2012 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 
19 package org.turro.erp.entity;
20 
21 import java.util.Date;
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.GenerationType;
26 import javax.persistence.Id;
27 import javax.persistence.ManyToOne;
28 import javax.persistence.Temporal;
29 import javax.persistence.TemporalType;
30 
35 @Entity
36 public class TimeControl implements java.io.Serializable {
37 
38  @Id
39  @GeneratedValue(strategy=GenerationType.IDENTITY)
40  @Column(name="IDENTIFIER")
41  private long id;
42 
43  @ManyToOne
44  private HumanResource humanResource;
45 
46  @ManyToOne
47  private Task task;
48 
49  @Column(name="START_TIME")
50  @Temporal(value = TemporalType.TIMESTAMP)
51  private Date startTime;
52 
53  @Column(name="END_TIME")
54  @Temporal(value = TemporalType.TIMESTAMP)
55  private Date endTime;
56 
57  private boolean startManual, endManual;
58 
59  public long getId() {
60  return id;
61  }
62 
63  public void setId(long id) {
64  this.id = id;
65  }
66 
68  return humanResource;
69  }
70 
71  public void setHumanResource(HumanResource humanResource) {
72  this.humanResource = humanResource;
73  }
74 
75  public Task getTask() {
76  return task;
77  }
78 
79  public void setTask(Task task) {
80  this.task = task;
81  }
82 
83  public Date getStartTime() {
84  return startTime;
85  }
86 
87  public void setStartTime(Date startTime) {
88  this.startTime = startTime;
89  }
90 
91  public Date getEndTime() {
92  return endTime;
93  }
94 
95  public void setEndTime(Date endTime) {
96  this.endTime = endTime;
97  }
98 
99  public boolean isStartManual() {
100  return startManual;
101  }
102 
103  public void setStartManual(boolean startManual) {
104  this.startManual = startManual;
105  }
106 
107  public boolean isEndManual() {
108  return endManual;
109  }
110 
111  public void setEndManual(boolean endManual) {
112  this.endManual = endManual;
113  }
114 
115 }
void setEndManual(boolean endManual)
void setHumanResource(HumanResource humanResource)
void setStartTime(Date startTime)
void setStartManual(boolean startManual)