BrightSide Workbench Full Report + Source Code
ContractDefinitionNotes.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2013 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.financials.entity;
20 
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.Lob;
27 import javax.persistence.OneToOne;
28 import org.turro.html.HtmlContent;
29 
34 @Entity
35 public class ContractDefinitionNotes implements java.io.Serializable {
36 
37  @Id
38  @GeneratedValue(strategy=GenerationType.IDENTITY)
39  @Column(name="IDENTIFIER")
40  private long id;
41 
42  @OneToOne
43  private ContractDefinition contractDefinition;
44 
45  @Lob
46  @Column(length=4096)
47  private String notes;
48 
49  public long getId() {
50  return id;
51  }
52 
53  public void setId(long id) {
54  this.id = id;
55  }
56 
58  return contractDefinition;
59  }
60 
61  public void setContractDefinition(ContractDefinition contractDefinition) {
62  this.contractDefinition = contractDefinition;
63  }
64 
65  public String getNotes() {
66  return notes;
67  }
68 
69  public void setNotes(String notes) {
70  this.notes = notes;
71  }
72 
73  public String getPlainNotes() {
74  return HtmlContent.plain(notes, 500);
75  }
76 
77 }
void setContractDefinition(ContractDefinition contractDefinition)