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.contacts.util.TypeByValues;
27 import org.turro.jpa.entity.IDaoEntity;
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 description;
45 @Column(name=
"CONNECTOR_VALUE")
49 @JoinColumn(name=
"CONTACT_FK")
50 private org.turro.contacts.Contact contact;
63 protected void setId(String
id) {
80 this.onlyOwner = onlyOwner;
88 this.description = description;
104 this.contact = contact;
120 return Strings.isEmpty(description) || Strings.isEmpty(value);
127 return type ==
null ? description : type;