BrightSide Workbench Full Report + Source Code
org.turro.financials.cart.delivery.AbstractDeliveryContext Class Referenceabstract
Inheritance diagram for org.turro.financials.cart.delivery.AbstractDeliveryContext:
Collaboration diagram for org.turro.financials.cart.delivery.AbstractDeliveryContext:

Public Member Functions

 AbstractDeliveryContext (Long productId, Long storeId, String logistic)
 
IContact getLogistic ()
 
Contract getStore ()
 
Product getDeliveryProduct ()
 
- Public Member Functions inherited from org.turro.financials.cart.delivery.DeliveryContext
boolean match (String data)
 

Protected Attributes

final Long productId
 
final IContact logistic
 

Detailed Description

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

Definition at line 31 of file AbstractDeliveryContext.java.

Constructor & Destructor Documentation

◆ AbstractDeliveryContext()

org.turro.financials.cart.delivery.AbstractDeliveryContext.AbstractDeliveryContext ( Long  productId,
Long  storeId,
String  logistic 
)

Definition at line 36 of file AbstractDeliveryContext.java.

36  {
37  this.productId = productId;
38  this.storeId = storeId;
39  this.logistic = Contacts.getContactById(logistic);
40  }
Here is the call graph for this function:

Member Function Documentation

◆ getDeliveryProduct()

Product org.turro.financials.cart.delivery.AbstractDeliveryContext.getDeliveryProduct ( )

Implements org.turro.financials.cart.delivery.DeliveryContext.

Definition at line 56 of file AbstractDeliveryContext.java.

56  {
57  if(productId != null && productId > 0) {
58  return new FinancialsPU().find(Product.class, productId);
59  }
60  return null;
61  }

◆ getLogistic()

IContact org.turro.financials.cart.delivery.AbstractDeliveryContext.getLogistic ( )

Implements org.turro.financials.cart.delivery.DeliveryContext.

Definition at line 43 of file AbstractDeliveryContext.java.

43  {
44  return (logistic != null && logistic.isWebUser()) ? logistic : null;
45  }
Here is the call graph for this function:

◆ getStore()

Contract org.turro.financials.cart.delivery.AbstractDeliveryContext.getStore ( )

Implements org.turro.financials.cart.delivery.DeliveryContext.

Definition at line 48 of file AbstractDeliveryContext.java.

48  {
49  if(storeId != null && storeId > 0) {
50  return new FinancialsPU().find(Contract.class, storeId);
51  }
52  return null;
53  }

Member Data Documentation

◆ logistic

final IContact org.turro.financials.cart.delivery.AbstractDeliveryContext.logistic
protected

Definition at line 34 of file AbstractDeliveryContext.java.

◆ productId

final Long org.turro.financials.cart.delivery.AbstractDeliveryContext.productId
protected

Definition at line 33 of file AbstractDeliveryContext.java.


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