BrightSide Workbench Full Report + Source Code
Formula.java
Go to the documentation of this file.
1 package org.turro.crm.entity;
2 
3 import javax.persistence.*;
4 import org.turro.string.Strings;
5 
10 @Entity
11 public class Formula implements java.io.Serializable {
12 
13  @Id
14  @GeneratedValue(strategy=GenerationType.IDENTITY)
15  @Column(name="IDENTIFIER")
16  private long id;
17 
18  private String name;
19 
20  private String formula;
21 
22  private FormulaType type;
23 
24  public String getFormula() {
25  return formula;
26  }
27 
28  public void setFormula(String formula) {
29  this.formula = formula;
30  }
31 
32  public long getId() {
33  return id;
34  }
35 
36  public void setId(long id) {
37  this.id = id;
38  }
39 
40  public String getName() {
41  return name;
42  }
43 
44  public void setName(String name) {
45  this.name = name;
46  }
47 
48  public FormulaType getType() {
49  return type;
50  }
51 
52  public void setType(FormulaType type) {
53  this.type = type;
54  }
55 
56  /* Helpers */
57 
58  public boolean isValid() {
59  return !Strings.isBlank(name) && !Strings.isBlank(formula);
60  }
61 
62 }
void setName(String name)
Definition: Formula.java:44
void setType(FormulaType type)
Definition: Formula.java:52
void setFormula(String formula)
Definition: Formula.java:28