BrightSide Workbench Full Report + Source Code
CampaignVendor.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.crm.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.ManyToOne;
27 import org.turro.jpa.entity.IDaoEntity;
28 
33 @Entity
34 public class CampaignVendor implements java.io.Serializable, IDaoEntity {
35 
36  @Id
37  @GeneratedValue(strategy=GenerationType.IDENTITY)
38  @Column(name="IDENTIFIER")
39  private long id;
40 
41  @ManyToOne
42  private Vendor vendor;
43 
44  @ManyToOne
45  private Campaign campaign;
46 
47  @ManyToOne
48  private Formula comission;
49 
50  @ManyToOne
51  private Formula alert;
52 
53  public long getId() {
54  return id;
55  }
56 
57  public void setId(long id) {
58  this.id = id;
59  }
60 
61  public Vendor getVendor() {
62  return vendor;
63  }
64 
65  public void setVendor(Vendor vendor) {
66  this.vendor = vendor;
67  }
68 
69  public Campaign getCampaign() {
70  return campaign;
71  }
72 
73  public void setCampaign(Campaign campaign) {
74  this.campaign = campaign;
75  }
76 
77  public Formula getComission() {
78  return comission;
79  }
80 
81  public void setComission(Formula comission) {
82  this.comission = comission;
83  }
84 
85  public Formula getAlert() {
86  return alert;
87  }
88 
89  public void setAlert(Formula alert) {
90  this.alert = alert;
91  }
92 
93  /* IDaoEntity */
94 
95  @Override
96  public Object entityId() {
97  return id;
98  }
99 
100  @Override
101  public boolean isEmpty() {
102  return campaign == null || vendor == null ||
103  comission == null || alert == null;
104  }
105 
106 }
void setCampaign(Campaign campaign)
void setComission(Formula comission)