BrightSide Workbench Full Report + Source Code
CategorizedTask.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.HashSet;
21 import java.util.Set;
22 import javax.persistence.CascadeType;
23 import javax.persistence.Column;
24 import javax.persistence.Entity;
25 import javax.persistence.FetchType;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.GenerationType;
28 import javax.persistence.Id;
29 import javax.persistence.OneToMany;
30 
35 @Entity
36 public class CategorizedTask implements java.io.Serializable {
37 
38  @Id
39  @GeneratedValue(strategy=GenerationType.IDENTITY)
40  @Column(name="IDENTIFIER")
41  private long id;
42 
43  @Column(name="CATEGORIZEDTASK_NAME", unique = true, nullable = false)
44  private String name;
45 
46  @OneToMany(mappedBy = "categorizedTask", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE, orphanRemoval=true)
47  private Set<CategorizedUsage> categorizedUsage = new HashSet<CategorizedUsage>();
48 
49  public Set<CategorizedUsage> getCategorizedUsage() {
50  return categorizedUsage;
51  }
52 
53  public void setCategorizedUsage(Set<CategorizedUsage> categorizedUsage) {
54  this.categorizedUsage = categorizedUsage;
55  }
56 
57  public long getId() {
58  return id;
59  }
60 
61  public void setId(long id) {
62  this.id = id;
63  }
64 
65  public String getName() {
66  return name;
67  }
68 
69  public void setName(String name) {
70  this.name = name;
71  }
72 
73 }
Set< CategorizedUsage > getCategorizedUsage()
void setCategorizedUsage(Set< CategorizedUsage > categorizedUsage)