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

Public Member Functions

Date getActionDate ()
 
void setActionDate (Date actionDate)
 
Set< String > getActionType ()
 
void setActionType (Set< String > actionType)
 
String getAddressId ()
 
void setAddressId (String addressId)
 
Set< String > getAttendees ()
 
void setAttendees (Set< String > attendees)
 
String getComment ()
 
void setComment (String comment)
 
Date getFinalDate ()
 
void setFinalDate (Date finalDate)
 
long getId ()
 
void setId (long id)
 
int getStatus ()
 
void setStatus (int status)
 
Set< TouchPointgetTouchPoints ()
 
void setTouchPoints (Set< TouchPoint > touchPoints)
 
VendorProspect getVendorProspect ()
 
void setVendorProspect (VendorProspect vendorProspect)
 
int compareTo (SaleAction o)
 
Object entityId ()
 
boolean isEmpty ()
 
void removeEmpties ()
 
boolean isOverdue (Date now)
 
void checkDate ()
 
Collection< IContactgetIAttendees ()
 
void setIAttendees (Collection< IContact > contacts)
 
Address getAddress ()
 
void setAddress (Address address)
 
Set< TouchPointgetProcessTouchPoints ()
 
void setProcessTouchPoints (Set< TouchPoint > stp)
 
TouchPoint getEndingTouchPoint ()
 
void setEndingTouchPoint (TouchPoint tp)
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default Collection< Collection > collections ()
 

Static Public Attributes

static final int SA_PENDING = 0
 

Detailed Description

Author
llturro

Definition at line 23 of file SaleAction.java.

Member Function Documentation

◆ checkDate()

void org.turro.crm.entity.SaleAction.checkDate ( )

Definition at line 181 of file SaleAction.java.

181  {
182  if(actionDate == null) {
183  actionDate = new Date();
184  finalDate = new Date();
185  }
186  if(CompareUtil.compare(actionDate, finalDate) > 0) {
187  finalDate.setTime(actionDate.getTime());
188  }
189  }

◆ compareTo()

int org.turro.crm.entity.SaleAction.compareTo ( SaleAction  o)

Definition at line 141 of file SaleAction.java.

141  {
142  return CompareUtil.compare(actionDate, o.actionDate);
143  }

◆ entityId()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 148 of file SaleAction.java.

148  {
149  return id;
150  }

◆ getActionDate()

Date org.turro.crm.entity.SaleAction.getActionDate ( )

Definition at line 58 of file SaleAction.java.

58  {
59  return actionDate;
60  }
Here is the caller graph for this function:

◆ getActionType()

Set<String> org.turro.crm.entity.SaleAction.getActionType ( )

Definition at line 66 of file SaleAction.java.

66  {
67  return actionType;
68  }

◆ getAddress()

Address org.turro.crm.entity.SaleAction.getAddress ( )

Definition at line 209 of file SaleAction.java.

209  {
210  return (!Strings.isBlank(addressId) ?
211  new ContactsPU().find(Address.class, addressId) : null);
212  }

◆ getAddressId()

String org.turro.crm.entity.SaleAction.getAddressId ( )

Definition at line 74 of file SaleAction.java.

74  {
75  return addressId;
76  }

◆ getAttendees()

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

Definition at line 82 of file SaleAction.java.

82  {
83  return attendees;
84  }

◆ getComment()

String org.turro.crm.entity.SaleAction.getComment ( )

Definition at line 90 of file SaleAction.java.

90  {
91  return comment;
92  }

◆ getEndingTouchPoint()

TouchPoint org.turro.crm.entity.SaleAction.getEndingTouchPoint ( )

Definition at line 238 of file SaleAction.java.

238  {
239  for(TouchPoint tp : getTouchPoints()) {
240  if(tp.isEndsSale()) {
241  return tp;
242  }
243  }
244  return null;
245  }
Set< TouchPoint > getTouchPoints()
Here is the call graph for this function:

◆ getFinalDate()

Date org.turro.crm.entity.SaleAction.getFinalDate ( )

Definition at line 98 of file SaleAction.java.

98  {
99  return finalDate;
100  }
Here is the caller graph for this function:

◆ getIAttendees()

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

Contact Helpers

Definition at line 193 of file SaleAction.java.

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

◆ getId()

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

Definition at line 106 of file SaleAction.java.

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

◆ getProcessTouchPoints()

Set<TouchPoint> org.turro.crm.entity.SaleAction.getProcessTouchPoints ( )

Definition at line 218 of file SaleAction.java.

218  {
219  HashSet<TouchPoint> hs = new HashSet<TouchPoint>();
220  for(TouchPoint tp : getTouchPoints()) {
221  if(!tp.isEndsSale()) {
222  hs.add(tp);
223  }
224  }
225  return hs;
226  }
Here is the call graph for this function:

◆ getStatus()

int org.turro.crm.entity.SaleAction.getStatus ( )

Definition at line 114 of file SaleAction.java.

114  {
115  return status;
116  }
Here is the caller graph for this function:

◆ getTouchPoints()

Set<TouchPoint> org.turro.crm.entity.SaleAction.getTouchPoints ( )

Definition at line 122 of file SaleAction.java.

122  {
123  return touchPoints;
124  }
Here is the caller graph for this function:

◆ getVendorProspect()

VendorProspect org.turro.crm.entity.SaleAction.getVendorProspect ( )

Definition at line 130 of file SaleAction.java.

130  {
131  return vendorProspect;
132  }
Here is the caller graph for this function:

◆ isEmpty()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 153 of file SaleAction.java.

153  {
154  return actionDate == null ||
155  finalDate == null ||
156  actionDate.after(finalDate) ||
157  Strings.isBlank(comment) ||
158  vendorProspect == null ||
159  actionType.isEmpty();
160  }
Here is the caller graph for this function:

◆ isOverdue()

boolean org.turro.crm.entity.SaleAction.isOverdue ( Date  now)

Definition at line 176 of file SaleAction.java.

176  {
177  return actionDate != null &&
178  actionDate.after(now);
179  }

◆ removeEmpties()

void org.turro.crm.entity.SaleAction.removeEmpties ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 163 of file SaleAction.java.

163  {
164  IDaoEntity.super.removeEmpties();
165  Iterator<String> it = attendees.iterator();
166  while(it.hasNext()) {
167  if(Strings.isBlank(it.next())) {
168  it.remove();
169  }
170  }
171  }
Here is the call graph for this function:

◆ setActionDate()

void org.turro.crm.entity.SaleAction.setActionDate ( Date  actionDate)

Definition at line 62 of file SaleAction.java.

62  {
63  this.actionDate = actionDate;
64  }
Here is the caller graph for this function:

◆ setActionType()

void org.turro.crm.entity.SaleAction.setActionType ( Set< String >  actionType)

Definition at line 70 of file SaleAction.java.

70  {
71  this.actionType = actionType;
72  }
Here is the caller graph for this function:

◆ setAddress()

void org.turro.crm.entity.SaleAction.setAddress ( Address  address)

Definition at line 214 of file SaleAction.java.

214  {
215  addressId = (address != null ? address.getId() : null);
216  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAddressId()

void org.turro.crm.entity.SaleAction.setAddressId ( String  addressId)

Definition at line 78 of file SaleAction.java.

78  {
79  this.addressId = addressId;
80  }

◆ setAttendees()

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

Definition at line 86 of file SaleAction.java.

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

◆ setComment()

void org.turro.crm.entity.SaleAction.setComment ( String  comment)

Definition at line 94 of file SaleAction.java.

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

◆ setEndingTouchPoint()

void org.turro.crm.entity.SaleAction.setEndingTouchPoint ( TouchPoint  tp)

Definition at line 247 of file SaleAction.java.

247  {
248  Iterator<TouchPoint> it = getTouchPoints().iterator();
249  while(it.hasNext()) {
250  if(it.next().isEndsSale()) {
251  it.remove();
252  }
253  }
254  if(tp != null) {
255  getTouchPoints().add(tp);
256  }
257  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFinalDate()

void org.turro.crm.entity.SaleAction.setFinalDate ( Date  finalDate)

Definition at line 102 of file SaleAction.java.

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

◆ setIAttendees()

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

Definition at line 202 of file SaleAction.java.

202  {
203  attendees.clear();
204  for(IContact c : contacts) {
205  if(c.isValid()) attendees.add(c.getId());
206  }
207  }

◆ setId()

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

Definition at line 110 of file SaleAction.java.

110  {
111  this.id = id;
112  }

◆ setProcessTouchPoints()

void org.turro.crm.entity.SaleAction.setProcessTouchPoints ( Set< TouchPoint stp)

Definition at line 228 of file SaleAction.java.

228  {
229  Iterator<TouchPoint> it = getTouchPoints().iterator();
230  while(it.hasNext()) {
231  if(!it.next().isEndsSale()) {
232  it.remove();
233  }
234  }
235  getTouchPoints().addAll(stp);
236  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStatus()

void org.turro.crm.entity.SaleAction.setStatus ( int  status)

Definition at line 118 of file SaleAction.java.

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

◆ setTouchPoints()

void org.turro.crm.entity.SaleAction.setTouchPoints ( Set< TouchPoint touchPoints)

Definition at line 126 of file SaleAction.java.

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

◆ setVendorProspect()

void org.turro.crm.entity.SaleAction.setVendorProspect ( VendorProspect  vendorProspect)

Definition at line 134 of file SaleAction.java.

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

Member Data Documentation

◆ SA_PENDING

final int org.turro.crm.entity.SaleAction.SA_PENDING = 0
static

Definition at line 25 of file SaleAction.java.


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