BrightSide Workbench Full Report + Source Code
ContractHandshake.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2015 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.OneToOne;
27 import org.turro.string.Strings;
28 
33 @Entity
34 public class ContractHandshake implements java.io.Serializable {
35 
36  @Id
37  @GeneratedValue(strategy=GenerationType.IDENTITY)
38  @Column(name="IDENTIFIER")
39  private long id;
40 
41  @OneToOne
42  private Contract contract;
43 
44  private long remoteId;
45 
46  private String remoteName;
47 
48  private String remoteServer;
49 
50  public long getId() {
51  return id;
52  }
53 
54  public void setId(long id) {
55  this.id = id;
56  }
57 
58  public Contract getContract() {
59  return contract;
60  }
61 
62  public void setContract(Contract contract) {
63  this.contract = contract;
64  }
65 
66  public long getRemoteId() {
67  return remoteId;
68  }
69 
70  public void setRemoteId(long remoteId) {
71  this.remoteId = remoteId;
72  }
73 
74  public String getRemoteName() {
75  return remoteName;
76  }
77 
78  public void setRemoteName(String remoteName) {
79  this.remoteName = remoteName;
80  }
81 
82  public String getRemoteServer() {
83  return remoteServer;
84  }
85 
86  public void setRemoteServer(String remoteServer) {
87  this.remoteServer = remoteServer;
88  }
89 
90  /* Helpers */
91 
92  public boolean isEmpty() {
93  return Strings.isBlank(remoteServer);
94  }
95 
96 }