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

Public Member Functions

Date getControlDate ()
 
void setControlDate (Date controlDate)
 
String getCustomerCode ()
 
void setCustomerCode (String customerCode)
 
long getCustomerId ()
 
void setCustomerId (long customerId)
 
String getOrderId ()
 
void setOrderId (String orderId)
 
Date getDelivery ()
 
void setDelivery (Date delivery)
 
String getDescription ()
 
void setDescription (String description)
 
long getId ()
 
void setId (long id)
 
boolean isNoFraction ()
 
void setNoFraction (boolean noFraction)
 
Date getOrderDate ()
 
void setOrderDate (Date orderDate)
 
double getPrice ()
 
void setPrice (double price)
 
double getQuantity ()
 
void setQuantity (double quantity)
 
long getServiceId ()
 
void setServiceId (long service)
 
boolean isWantBudget ()
 
void setWantBudget (boolean wantBudget)
 
double getAmount ()
 
boolean isEmpty ()
 
void initFrom (OrderReference orderReference)
 
OrderReference getOrderReference ()
 
Contract getService ()
 
void setService (Contract service)
 
Contract getCustomer ()
 
void setCustomer (Contract customer)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 35 of file CustomerOrder.java.

Member Function Documentation

◆ getAmount()

double org.turro.erp.entity.CustomerOrder.getAmount ( )

Definition at line 178 of file CustomerOrder.java.

178  {
179  return (quantity == 0 ? 1 : quantity) * price;
180  }
Here is the caller graph for this function:

◆ getControlDate()

Date org.turro.erp.entity.CustomerOrder.getControlDate ( )

Definition at line 72 of file CustomerOrder.java.

72  {
73  return controlDate;
74  }
Here is the caller graph for this function:

◆ getCustomer()

Contract org.turro.erp.entity.CustomerOrder.getCustomer ( )

Definition at line 230 of file CustomerOrder.java.

230  {
231  return new DaoEntity<Contract, Long>() {
232  @Override
233  protected Dao createDao() {
234  return new FinancialsPU();
235  }
236  @Override
237  protected boolean shouldLog() {
238  return false;
239  }
240  }.find(customerId);
241  }
Here is the caller graph for this function:

◆ getCustomerCode()

String org.turro.erp.entity.CustomerOrder.getCustomerCode ( )

Definition at line 80 of file CustomerOrder.java.

80  {
81  return customerCode;
82  }
Here is the caller graph for this function:

◆ getCustomerId()

long org.turro.erp.entity.CustomerOrder.getCustomerId ( )

Definition at line 88 of file CustomerOrder.java.

88  {
89  return customerId;
90  }
Here is the caller graph for this function:

◆ getDelivery()

Date org.turro.erp.entity.CustomerOrder.getDelivery ( )

Definition at line 104 of file CustomerOrder.java.

104  {
105  return delivery;
106  }
Here is the caller graph for this function:

◆ getDescription()

String org.turro.erp.entity.CustomerOrder.getDescription ( )

Definition at line 112 of file CustomerOrder.java.

112  {
113  return description;
114  }
Here is the caller graph for this function:

◆ getId()

long org.turro.erp.entity.CustomerOrder.getId ( )

Definition at line 120 of file CustomerOrder.java.

120  {
121  return id;
122  }

◆ getOrderDate()

Date org.turro.erp.entity.CustomerOrder.getOrderDate ( )

Definition at line 136 of file CustomerOrder.java.

136  {
137  return orderDate;
138  }
Here is the caller graph for this function:

◆ getOrderId()

String org.turro.erp.entity.CustomerOrder.getOrderId ( )

Definition at line 96 of file CustomerOrder.java.

96  {
97  return orderId;
98  }
Here is the caller graph for this function:

◆ getOrderReference()

OrderReference org.turro.erp.entity.CustomerOrder.getOrderReference ( )

Definition at line 197 of file CustomerOrder.java.

197  {
198  if(id == 0) {
199  return null;
200  }
201  return (OrderReference) new ErpPU().getSingleResultOrNull(
202  "select o from OrderReference as o " +
203  "where o.customerOrder = ?",
204  new Object[] { this });
205  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPrice()

double org.turro.erp.entity.CustomerOrder.getPrice ( )

Definition at line 144 of file CustomerOrder.java.

144  {
145  return price;
146  }
Here is the caller graph for this function:

◆ getQuantity()

double org.turro.erp.entity.CustomerOrder.getQuantity ( )

Definition at line 152 of file CustomerOrder.java.

152  {
153  return quantity;
154  }
Here is the caller graph for this function:

◆ getService()

Contract org.turro.erp.entity.CustomerOrder.getService ( )

Definition at line 209 of file CustomerOrder.java.

209  {
210  return new DaoEntity<Contract, Long>() {
211  @Override
212  protected Dao createDao() {
213  return new FinancialsPU();
214  }
215  @Override
216  protected boolean shouldLog() {
217  return false;
218  }
219  }.find(serviceId);
220  }

◆ getServiceId()

long org.turro.erp.entity.CustomerOrder.getServiceId ( )

Definition at line 160 of file CustomerOrder.java.

160  {
161  return serviceId;
162  }
Here is the caller graph for this function:

◆ initFrom()

void org.turro.erp.entity.CustomerOrder.initFrom ( OrderReference  orderReference)

Definition at line 187 of file CustomerOrder.java.

187  {
188  setDescription(orderReference.getDescription());
189  if(orderReference.getProduct() != null) {
190  ProductFactory.setContractorProduct(orderReference.getProduct(), orderReference.getWorkOrder().getContractId());
191  if(orderReference.getProduct().getProductByContractor() != null) {
192  setCustomerCode(orderReference.getProduct().getProductByContractor().getContractorCode());
193  }
194  }
195  }
void setDescription(String description)
void setCustomerCode(String customerCode)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.erp.entity.CustomerOrder.isEmpty ( )

Definition at line 182 of file CustomerOrder.java.

182  {
183  return Strings.isBlank(description) ||
184  customerId <= 0;
185  }
Here is the caller graph for this function:

◆ isNoFraction()

boolean org.turro.erp.entity.CustomerOrder.isNoFraction ( )

Definition at line 128 of file CustomerOrder.java.

128  {
129  return noFraction;
130  }
Here is the caller graph for this function:

◆ isWantBudget()

boolean org.turro.erp.entity.CustomerOrder.isWantBudget ( )

Definition at line 168 of file CustomerOrder.java.

168  {
169  return wantBudget;
170  }
Here is the caller graph for this function:

◆ setControlDate()

void org.turro.erp.entity.CustomerOrder.setControlDate ( Date  controlDate)

Definition at line 76 of file CustomerOrder.java.

76  {
77  this.controlDate = controlDate;
78  }
Here is the caller graph for this function:

◆ setCustomer()

void org.turro.erp.entity.CustomerOrder.setCustomer ( Contract  customer)

Definition at line 243 of file CustomerOrder.java.

243  {
244  if(customer != null) {
245  customerId = customer.getId();
246  } else {
247  customerId = 0;
248  }
249  }
Here is the call graph for this function:

◆ setCustomerCode()

void org.turro.erp.entity.CustomerOrder.setCustomerCode ( String  customerCode)

Definition at line 84 of file CustomerOrder.java.

84  {
85  this.customerCode = customerCode;
86  }
Here is the caller graph for this function:

◆ setCustomerId()

void org.turro.erp.entity.CustomerOrder.setCustomerId ( long  customerId)

Definition at line 92 of file CustomerOrder.java.

92  {
93  this.customerId = customerId;
94  }
Here is the caller graph for this function:

◆ setDelivery()

void org.turro.erp.entity.CustomerOrder.setDelivery ( Date  delivery)

Definition at line 108 of file CustomerOrder.java.

108  {
109  this.delivery = delivery;
110  }
Here is the caller graph for this function:

◆ setDescription()

void org.turro.erp.entity.CustomerOrder.setDescription ( String  description)

Definition at line 116 of file CustomerOrder.java.

116  {
117  this.description = description;
118  }
Here is the caller graph for this function:

◆ setId()

void org.turro.erp.entity.CustomerOrder.setId ( long  id)

Definition at line 124 of file CustomerOrder.java.

124  {
125  this.id = id;
126  }

◆ setNoFraction()

void org.turro.erp.entity.CustomerOrder.setNoFraction ( boolean  noFraction)

Definition at line 132 of file CustomerOrder.java.

132  {
133  this.noFraction = noFraction;
134  }

◆ setOrderDate()

void org.turro.erp.entity.CustomerOrder.setOrderDate ( Date  orderDate)

Definition at line 140 of file CustomerOrder.java.

140  {
141  this.orderDate = orderDate;
142  }
Here is the caller graph for this function:

◆ setOrderId()

void org.turro.erp.entity.CustomerOrder.setOrderId ( String  orderId)

Definition at line 100 of file CustomerOrder.java.

100  {
101  this.orderId = orderId;
102  }
Here is the caller graph for this function:

◆ setPrice()

void org.turro.erp.entity.CustomerOrder.setPrice ( double  price)

Definition at line 148 of file CustomerOrder.java.

148  {
149  this.price = price;
150  }
Here is the caller graph for this function:

◆ setQuantity()

void org.turro.erp.entity.CustomerOrder.setQuantity ( double  quantity)

Definition at line 156 of file CustomerOrder.java.

156  {
157  this.quantity = quantity;
158  }
Here is the caller graph for this function:

◆ setService()

void org.turro.erp.entity.CustomerOrder.setService ( Contract  service)

Definition at line 222 of file CustomerOrder.java.

222  {
223  if(service != null) {
224  serviceId = service.getId();
225  } else {
226  serviceId = 0;
227  }
228  }
Here is the call graph for this function:

◆ setServiceId()

void org.turro.erp.entity.CustomerOrder.setServiceId ( long  service)

Definition at line 164 of file CustomerOrder.java.

164  {
165  this.serviceId = service;
166  }
Here is the caller graph for this function:

◆ setWantBudget()

void org.turro.erp.entity.CustomerOrder.setWantBudget ( boolean  wantBudget)

Definition at line 172 of file CustomerOrder.java.

172  {
173  this.wantBudget = wantBudget;
174  }
Here is the caller graph for this function:

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