⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 product.java

📁 网上商店。提供网上销售
💻 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 + -