BrightSide Workbench Full Report + Source Code
org.turro.financials.product.CachedIProduct Class Reference

Public Member Functions

IProduct getIProduct (IProductKey productKey)
 
IProductKey setIProduct (IProduct product)
 

Detailed Description

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

Definition at line 28 of file CachedIProduct.java.

Member Function Documentation

◆ getIProduct()

IProduct org.turro.financials.product.CachedIProduct.getIProduct ( IProductKey  productKey)

Definition at line 33 of file CachedIProduct.java.

33  {
34  if(!productKey.equals(lastIProductKey)) {
35  iproduct = ProductFactory.getProduct(productKey);
36  }
37  lastIProductKey = productKey;
38  return iproduct;
39  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIProduct()

IProductKey org.turro.financials.product.CachedIProduct.setIProduct ( IProduct  product)

Definition at line 41 of file CachedIProduct.java.

41  {
42  IProductKey productKey = new IProductKey();
43  if(product != null) {
44  if(product.isUncoded()) {
45  productKey.setProductId(0);
46  productKey.setProductDescription(product.getProductCodeStr());
47  } else {
48  productKey.setProductId(((Product) product).getId());
49  ProductByContractor pbc = product.getProductByContractor();
50  if(pbc != null) {
51  productKey.setProviderId(pbc.getContract().getId());
52  productKey.setProviderProductId(pbc.getId());
53  }
54  }
55  }
56  return productKey;
57  }
Here is the call graph for this function:
Here is the caller graph for this function:

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