18 package org.turro.contacts;
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.GeneratedValue;
23 import javax.persistence.Id;
24 import javax.persistence.JoinColumn;
25 import javax.persistence.ManyToOne;
26 import org.turro.jpa.entity.IDaoEntity;
27 import org.turro.util.PhraseBuilder;
28 import org.zkoss.lang.Strings;
31 @org.hibernate.annotations.GenericGenerator(name =
"hibernate-uuid", strategy =
"uuid")
35 @GeneratedValue(generator =
"hibernate-uuid")
36 @Column(name=
"IDENTIFIER")
41 private boolean onlyOwner;
43 private String street;
45 private String zipCode;
49 private String province;
51 @Column(name=
"ADDRESS_STATE")
54 private String description;
56 private double latitude, longitude;
59 @JoinColumn(name=
"CONTACT_FK")
60 private org.turro.contacts.Contact contact;
69 PhraseBuilder pb =
new PhraseBuilder();
82 protected void setId(String
id) {
99 this.onlyOwner = onlyOwner;
107 this.street = street;
115 this.zipCode = zipCode;
131 this.province = province;
147 this.description = description;
155 this.latitude = latitude;
163 this.longitude = longitude;
171 this.contact = contact;
187 return Strings.isEmpty(description) || Strings.isEmpty(street);