KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > portlets > product > model > ProductPrice


1 package com.dotmarketing.portlets.product.model;
2
3 import com.dotmarketing.beans.Inode;
4 import com.dotmarketing.factories.InodeFactory;
5
6 import java.io.Serializable JavaDoc;
7
8 /**
9  *
10  * @author David
11  *
12  */

13 public class ProductPrice extends Inode implements Serializable JavaDoc {
14     
15     private static final long serialVersionUID = 1L;
16     private long productFormatInode; //persistent
17
private int minQty; //persistent
18
private int maxQty; //persistent
19
private float retailPrice; //persistent
20
private float partnerPrice; //persistent
21
private float retailPriceWithDiscount;
22     private float partnerPriceWithDiscount;
23
24     public ProductPrice(long productFormatInode, int minQty, int maxQty, float retailPrice, float partnerPrice)
25     {
26         this.productFormatInode = productFormatInode;
27         this.minQty = minQty;
28         this.maxQty = maxQty;
29         this.retailPrice = retailPrice;
30         this.partnerPrice = partnerPrice;
31     }
32
33     public ProductPrice() {
34         setType("ecom_product_price");
35     }
36
37     public ProductPrice(long productFormatInode, int retailPrice, int partnerPrice) {
38         this.productFormatInode = productFormatInode;
39         this.retailPrice = retailPrice;
40         this.partnerPrice = partnerPrice;
41     }
42
43     public long getProductFormatInode() {
44         return this.productFormatInode;
45     }
46
47     public void setProductFormatInode(long productFormatInode) {
48         this.productFormatInode = productFormatInode;
49     }
50     public int getMinQty() {
51         return this.minQty;
52     }
53
54     public void setMinQty(int minQty) {
55         this.minQty = minQty;
56     }
57     public int getMaxQty() {
58         return this.maxQty;
59     }
60
61     public void setMaxQty(int maxQty) {
62         this.maxQty = maxQty;
63     }
64     public float getRetailPrice() {
65         return this.retailPrice;
66     }
67
68     public void setRetailPrice(float retailPrice) {
69         this.retailPrice = retailPrice;
70     }
71     public float getPartnerPrice() {
72         return this.partnerPrice;
73     }
74
75     public void setPartnerPrice(float partnerPrice) {
76         this.partnerPrice = partnerPrice;
77     }
78     
79     public Product getProductFormat () {
80         return (Product)InodeFactory.getInode(productFormatInode, ProductFormat.class);
81     }
82
83     public float getPartnerPriceWithDiscount() {
84         return partnerPriceWithDiscount;
85     }
86
87     public void setPartnerPriceWithDiscount(float partnerPriceWithDiscount) {
88         this.partnerPriceWithDiscount = partnerPriceWithDiscount;
89     }
90
91     public float getRetailPriceWithDiscount() {
92         return retailPriceWithDiscount;
93     }
94
95     public void setRetailPriceWithDiscount(float retailPriceWithDiscount) {
96         this.retailPriceWithDiscount = retailPriceWithDiscount;
97     }
98     
99 }
100
Popular Tags