1 package org.turro.crm.entity;
3 import java.util.HashSet;
5 import javax.persistence.*;
6 import org.turro.string.Strings;
7 import org.turro.action.Contacts;
8 import org.turro.crm.db.CrmPU;
9 import org.turro.jpa.Dao;
10 import org.turro.jpa.entity.IDaoEntity;
11 import org.turro.plugin.contacts.IContact;
20 @GeneratedValue(strategy=GenerationType.IDENTITY)
21 @Column(name=
"IDENTIFIER")
26 private String idContact;
28 @OneToMany(mappedBy =
"vendor", fetch = FetchType.LAZY)
29 private Set<CustomerOwner> customerOwned =
new HashSet<CustomerOwner>();
31 @OneToMany(mappedBy =
"vendor", fetch = FetchType.LAZY)
32 private Set<VendorProspect> vendorProspects =
new HashSet<VendorProspect>();
37 customerOwned = dao.lazyLoader(
Vendor.class,
this,
"customerOwned").customerOwned;
43 this.customerOwned = customerOwned;
59 this.idContact = idContact;
75 vendorProspects = dao.lazyLoader(
Vendor.class,
this,
"vendorProspects").vendorProspects;
77 return vendorProspects;
81 this.vendorProspects = vendorProspects;
93 return Strings.isBlank(idContact);
101 if(_contact ==
null) {
109 idContact = _contact !=
null ? _contact.
getId() :
null;
110 name = _contact !=
null ? _contact.
getName() :
null;
113 private void resetIContact() {
void setName(String name)
void setCustomerOwned(Set< CustomerOwner > customerOwned)
void setIdContact(String idContact)
Set< CustomerOwner > getCustomerOwned()
Set< VendorProspect > getVendorProspects()
void setVendorProspects(Set< VendorProspect > vendorProspects)
void setIContact(IContact contact)
boolean isNotLoaded(Object o, String attribute)