BrightSide Workbench Full Report + Source Code
org.turro.financials.handshake.HandshakeProduct Class Reference
Collaboration diagram for org.turro.financials.handshake.HandshakeProduct:

Static Public Member Functions

static String createJsonFromProduct (Product product)
 
static HandshakeProduct createHandshakeFromProduct (Product product)
 
static Product getProductFromHandshake (HandshakeProduct hp)
 
static ProductByContractor getProductByContractorFromHandshake (HandshakeProduct hp)
 

Public Attributes

String code
 
String description
 
double price
 
double tax
 
transient Contract contract
 
transient String petitioner
 

Detailed Description

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

Definition at line 32 of file HandshakeProduct.java.

Member Function Documentation

◆ createHandshakeFromProduct()

static HandshakeProduct org.turro.financials.handshake.HandshakeProduct.createHandshakeFromProduct ( Product  product)
static

Definition at line 50 of file HandshakeProduct.java.

50  {
51  HandshakeProduct hp = new HandshakeProduct();
52  hp.code = product.getProductCode();
53  hp.description = product.getDescription();
54  hp.price = product.getPrice();
55  hp.tax = product.getTax();
56  return hp;
57  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createJsonFromProduct()

static String org.turro.financials.handshake.HandshakeProduct.createJsonFromProduct ( Product  product)
static

Definition at line 42 of file HandshakeProduct.java.

42  {
43  HandshakeProduct hp = createHandshakeFromProduct(product);
44  if(hp != null) {
45  return new Gson().toJson(hp);
46  }
47  return null;
48  }
static HandshakeProduct createHandshakeFromProduct(Product product)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProductByContractorFromHandshake()

static ProductByContractor org.turro.financials.handshake.HandshakeProduct.getProductByContractorFromHandshake ( HandshakeProduct  hp)
static

Definition at line 67 of file HandshakeProduct.java.

67  {
68  Dao dao = new FinancialsPU();
69  return (ProductByContractor) dao.getSingleResultOrNull(
70  "select pbc from ProductByContractor pbc " +
71  "where pbc.contract = ? " +
72  "and pbc.contractorCode = ?",
73  new Object[] {
74  hp.contract,
75  hp.code
76  });
77  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProductFromHandshake()

static Product org.turro.financials.handshake.HandshakeProduct.getProductFromHandshake ( HandshakeProduct  hp)
static

Definition at line 59 of file HandshakeProduct.java.

59  {
60  ProductByContractor pbc = getProductByContractorFromHandshake(hp);
61  if(pbc != null) {
62  return pbc.getProduct();
63  }
64  return null;
65  }
static ProductByContractor getProductByContractorFromHandshake(HandshakeProduct hp)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ code

String org.turro.financials.handshake.HandshakeProduct.code

Definition at line 34 of file HandshakeProduct.java.

◆ contract

transient Contract org.turro.financials.handshake.HandshakeProduct.contract

Definition at line 39 of file HandshakeProduct.java.

◆ description

String org.turro.financials.handshake.HandshakeProduct.description

Definition at line 35 of file HandshakeProduct.java.

◆ petitioner

transient String org.turro.financials.handshake.HandshakeProduct.petitioner

Definition at line 40 of file HandshakeProduct.java.

◆ price

double org.turro.financials.handshake.HandshakeProduct.price

Definition at line 36 of file HandshakeProduct.java.

◆ tax

double org.turro.financials.handshake.HandshakeProduct.tax

Definition at line 37 of file HandshakeProduct.java.


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