?? product.java
字號:
package ydh.product;
import ydh.bike.Bike;
import ydh.catalog.Catalog;
import ydh.item.Item;
import java.util.*;
// default package
import org.apache.struts.upload.FormFile;
/**
* Product generated by MyEclipse Persistence Tools
*/
public class Product extends org.apache.struts.action.ActionForm implements java.io.Serializable {
// Fields
private Integer id;
private String productname;
private String img;
private String form;
private Float price;
private String description;
private Catalog catalog;
private Set<Bike> bike=new HashSet<Bike>(0);
private Set<Item> item=new HashSet<Item>(0);
private int quantity=1;
private int suq;
private float subtotal;
private float total=1;
private int totalqua=1;
private FormFile uploadimg;
// Constructors
public FormFile getUploadimg() {
return uploadimg;
}
public void setUploadimg(FormFile uploadimg) {
this.uploadimg = uploadimg;
}
public int getTotalqua() {
return totalqua;
}
public void setTotalqua(int totalqua) {
this.totalqua=totalqua+getQuantity();
this.totalqua = totalqua;
}
public float getTotal() {
return total;
}
public void setTotal(float total) {
total=total+getPrice();
this.total = total;
}
public float getSubtotal() {
subtotal=getPrice()*getQuantity();
return subtotal;
}
public void setSubtotal(float subto) {
//subtotal=subto;
// System.out.println("KJJJJJ"+subtotal);
subtotal=subtotal+subto;
}
public int getQuantity() {
// quantity=quantity+1;
return quantity;
}
public void setQuantity(int quantity) {
this.quantity =quantity;
}
public int getSuq() {
this.suq=suq+1;
return suq;
}
public void setSuq(int suq) {
this.suq = suq;
}
public Catalog getCatalog() {
return catalog;
}
public void setCatalog(Catalog catalog) {
this.catalog = catalog;
}
/** default constructor */
public Product() {
}
/** minimal constructor */
public Product(String productname) {
this.productname = productname;
}
/** full constructor */
public Product(String productname, String img, String form, Float price, String description) {
this.productname = productname;
this.img = img;
this.form = form;
this.price = price;
this.description = description;
}
// Property accessors
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getProductname() {
return this.productname;
}
public void setProductname(String productname) {
this.productname = productname;
}
public String getImg() {
return this.img;
}
public void setImg(String img) {
this.img = img;
}
public String getForm() {
return this.form;
}
public void setForm(String form) {
this.form = form;
}
public Float getPrice() {
return this.price;
}
public void setPrice(Float price) {
this.price = price;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public Set<Bike> getBike() {
return bike;
}
public void setBike(Set<Bike> bike) {
this.bike = bike;
}
public Set<Item> getItem() {
return item;
}
public void setItem(Set<Item> item) {
this.item = item;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -