BrightSide Workbench Full Report + Source Code
org.turro.crm.entity.SaleProspect Class Reference
Inheritance diagram for org.turro.crm.entity.SaleProspect:
Collaboration diagram for org.turro.crm.entity.SaleProspect:

Public Member Functions

Set< String > getAttendees ()
 
void setAttendees (Set< String > attendees)
 
double getBudget ()
 
void setBudget (double budget)
 
Campaign getCampaign ()
 
void setCampaign (Campaign campaign)
 
Date getClosingDate ()
 
void setClosingDate (Date closingDate)
 
Customer getCustomer ()
 
void setCustomer (Customer customer)
 
String getDescription ()
 
void setDescription (String description)
 
long getId ()
 
void setId (long id)
 
Date getProspectDate ()
 
void setProspectDate (Date prospectDate)
 
ProspectStage getStage ()
 
void setStage (ProspectStage stage)
 
ProspectType getType ()
 
void setType (ProspectType type)
 
Set< VendorProspectgetVendorProspects ()
 
void setVendorProspects (Set< VendorProspect > vendorProspects)
 
Object entityId ()
 
boolean isEmpty ()
 
Collection< Collection > collections ()
 
String getFullDescription ()
 
SaleActionSet getSaleActions ()
 
SaleAction getLastSaleAction ()
 
Set< VendorProspectgetUpdatedVendorProspects ()
 
ProspectStageWrapper getStageWrapper ()
 
Collection< IContactgetIAttendees ()
 
void setIAttendees (Collection< IContact > contacts)
 
void addCustomerOwner (CustomerOwner customerOwner)
 
void addCampaignVendor (CampaignVendor campaignVendor)
 
VendorProspect existsVendor (Vendor vendor)
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 

Detailed Description

Author
llturro

Definition at line 24 of file SaleProspect.java.

Member Function Documentation

◆ addCampaignVendor()

void org.turro.crm.entity.SaleProspect.addCampaignVendor ( CampaignVendor  campaignVendor)

Definition at line 222 of file SaleProspect.java.

222  {
223  VendorProspect vp = existsVendor(campaignVendor.getVendor());
224  if(vp == null) {
225  vp = new VendorProspect();
226  vp.setSaleProspect(this);
227  vp.setVendor(campaignVendor.getVendor());
228  getVendorProspects().add(vp);
229  }
230  vp.setComission(campaignVendor.getComission());
231  vp.setAlert(campaignVendor.getAlert());
232  }
Set< VendorProspect > getVendorProspects()
VendorProspect existsVendor(Vendor vendor)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCustomerOwner()

void org.turro.crm.entity.SaleProspect.addCustomerOwner ( CustomerOwner  customerOwner)

Definition at line 210 of file SaleProspect.java.

210  {
211  VendorProspect vp = existsVendor(customerOwner.getVendor());
212  if(vp == null) {
213  vp = new VendorProspect();
214  vp.setSaleProspect(this);
215  vp.setVendor(customerOwner.getVendor());
216  getVendorProspects().add(vp);
217  }
218  vp.setComission(customerOwner.getComission());
219  vp.setAlert(customerOwner.getAlert());
220  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ collections()

Collection<Collection> org.turro.crm.entity.SaleProspect.collections ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 160 of file SaleProspect.java.

160  {
161  return List.of(vendorProspects);
162  }

◆ entityId()

Object org.turro.crm.entity.SaleProspect.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 150 of file SaleProspect.java.

150  {
151  return id;
152  }

◆ existsVendor()

VendorProspect org.turro.crm.entity.SaleProspect.existsVendor ( Vendor  vendor)

Definition at line 234 of file SaleProspect.java.

234  {
235  if(vendor != null) {
236  for(VendorProspect vp : vendorProspects) {
237  if(vp.getVendor() != null && vp.getVendor().getId() == vendor.getId()) {
238  return vp;
239  }
240  }
241  }
242  return null;
243  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttendees()

Set<String> org.turro.crm.entity.SaleProspect.getAttendees ( )

Definition at line 59 of file SaleProspect.java.

59  {
60  return attendees;
61  }
Here is the caller graph for this function:

◆ getBudget()

double org.turro.crm.entity.SaleProspect.getBudget ( )

Definition at line 67 of file SaleProspect.java.

67  {
68  return budget;
69  }

◆ getCampaign()

Campaign org.turro.crm.entity.SaleProspect.getCampaign ( )

Definition at line 75 of file SaleProspect.java.

75  {
76  return campaign;
77  }

◆ getClosingDate()

Date org.turro.crm.entity.SaleProspect.getClosingDate ( )

Definition at line 83 of file SaleProspect.java.

83  {
84  return closingDate;
85  }

◆ getCustomer()

Customer org.turro.crm.entity.SaleProspect.getCustomer ( )

Definition at line 91 of file SaleProspect.java.

91  {
92  return customer;
93  }
Here is the caller graph for this function:

◆ getDescription()

String org.turro.crm.entity.SaleProspect.getDescription ( )

Definition at line 99 of file SaleProspect.java.

99  {
100  return description;
101  }
Here is the caller graph for this function:

◆ getFullDescription()

String org.turro.crm.entity.SaleProspect.getFullDescription ( )

Definition at line 166 of file SaleProspect.java.

166  {
167  return Strings.truncateAndWarn(description, 50) +
168  (customer == null ? "" : " (" + customer.getName() + ")");
169  }
Here is the caller graph for this function:

◆ getIAttendees()

Collection<IContact> org.turro.crm.entity.SaleProspect.getIAttendees ( )

Contact Helpers

Definition at line 194 of file SaleProspect.java.

194  {
195  ArrayList<IContact> list = new ArrayList<IContact>();
196  for(String s : attendees) {
197  IContact c = Contacts.getContactById(s);
198  if(c.isValid()) list.add(c);
199  }
200  return list;
201  }
Here is the call graph for this function:

◆ getId()

long org.turro.crm.entity.SaleProspect.getId ( )

Definition at line 107 of file SaleProspect.java.

107  {
108  return id;
109  }
Here is the caller graph for this function:

◆ getLastSaleAction()

SaleAction org.turro.crm.entity.SaleProspect.getLastSaleAction ( )

Definition at line 175 of file SaleProspect.java.

175  {
176  SaleActionSet set = getSaleActions();
177  return (set != null && !set.isEmpty()) ? set.last() : null;
178  }
Here is the call graph for this function:

◆ getProspectDate()

Date org.turro.crm.entity.SaleProspect.getProspectDate ( )

Definition at line 115 of file SaleProspect.java.

115  {
116  return prospectDate;
117  }

◆ getSaleActions()

SaleActionSet org.turro.crm.entity.SaleProspect.getSaleActions ( )

Definition at line 171 of file SaleProspect.java.

171  {
172  return new SaleActionSet(this);
173  }
Here is the caller graph for this function:

◆ getStage()

ProspectStage org.turro.crm.entity.SaleProspect.getStage ( )

Definition at line 123 of file SaleProspect.java.

123  {
124  return stage;
125  }
Here is the caller graph for this function:

◆ getStageWrapper()

ProspectStageWrapper org.turro.crm.entity.SaleProspect.getStageWrapper ( )

Definition at line 188 of file SaleProspect.java.

188  {
189  return new ProspectStageWrapper(this, new Date());
190  }

◆ getType()

ProspectType org.turro.crm.entity.SaleProspect.getType ( )

Definition at line 131 of file SaleProspect.java.

131  {
132  return type;
133  }
Here is the caller graph for this function:

◆ getUpdatedVendorProspects()

Set<VendorProspect> org.turro.crm.entity.SaleProspect.getUpdatedVendorProspects ( )

Definition at line 180 of file SaleProspect.java.

180  {
181  if(id > 0) {
182  Dao dao = new CrmPU();
183  return dao.lazyLoader(SaleProspect.class, this, "vendorProspects").vendorProspects;
184  }
185  return vendorProspects;
186  }
Here is the caller graph for this function:

◆ getVendorProspects()

Set<VendorProspect> org.turro.crm.entity.SaleProspect.getVendorProspects ( )

Definition at line 139 of file SaleProspect.java.

139  {
140  return vendorProspects;
141  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.crm.entity.SaleProspect.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 155 of file SaleProspect.java.

155  {
156  return Strings.isBlank(description) || customer == null;
157  }
Here is the caller graph for this function:

◆ setAttendees()

void org.turro.crm.entity.SaleProspect.setAttendees ( Set< String >  attendees)

Definition at line 63 of file SaleProspect.java.

63  {
64  this.attendees = attendees;
65  }

◆ setBudget()

void org.turro.crm.entity.SaleProspect.setBudget ( double  budget)

Definition at line 71 of file SaleProspect.java.

71  {
72  this.budget = budget;
73  }

◆ setCampaign()

void org.turro.crm.entity.SaleProspect.setCampaign ( Campaign  campaign)

Definition at line 79 of file SaleProspect.java.

79  {
80  this.campaign = campaign;
81  }
Here is the caller graph for this function:

◆ setClosingDate()

void org.turro.crm.entity.SaleProspect.setClosingDate ( Date  closingDate)

Definition at line 87 of file SaleProspect.java.

87  {
88  this.closingDate = closingDate;
89  }
Here is the caller graph for this function:

◆ setCustomer()

void org.turro.crm.entity.SaleProspect.setCustomer ( Customer  customer)

Definition at line 95 of file SaleProspect.java.

95  {
96  this.customer = customer;
97  }
Here is the caller graph for this function:

◆ setDescription()

void org.turro.crm.entity.SaleProspect.setDescription ( String  description)

Definition at line 103 of file SaleProspect.java.

103  {
104  this.description = description;
105  }
Here is the caller graph for this function:

◆ setIAttendees()

void org.turro.crm.entity.SaleProspect.setIAttendees ( Collection< IContact contacts)

Definition at line 203 of file SaleProspect.java.

203  {
204  attendees.clear();
205  for(IContact c : contacts) {
206  if(c.isValid()) attendees.add(c.getId());
207  }
208  }
Here is the caller graph for this function:

◆ setId()

void org.turro.crm.entity.SaleProspect.setId ( long  id)

Definition at line 111 of file SaleProspect.java.

111  {
112  this.id = id;
113  }

◆ setProspectDate()

void org.turro.crm.entity.SaleProspect.setProspectDate ( Date  prospectDate)

Definition at line 119 of file SaleProspect.java.

119  {
120  this.prospectDate = prospectDate;
121  }
Here is the caller graph for this function:

◆ setStage()

void org.turro.crm.entity.SaleProspect.setStage ( ProspectStage  stage)

Definition at line 127 of file SaleProspect.java.

127  {
128  this.stage = stage;
129  }
Here is the caller graph for this function:

◆ setType()

void org.turro.crm.entity.SaleProspect.setType ( ProspectType  type)

Definition at line 135 of file SaleProspect.java.

135  {
136  this.type = type;
137  }
Here is the caller graph for this function:

◆ setVendorProspects()

void org.turro.crm.entity.SaleProspect.setVendorProspects ( Set< VendorProspect vendorProspects)

Definition at line 143 of file SaleProspect.java.

143  {
144  this.vendorProspects = vendorProspects;
145  }

The documentation for this class was generated from the following file: