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

📄 orderitem.java

📁 该代码是Java数据库高级编程宝典中的重要的代码
💻 JAVA
字号:
package jdbcbook.shopping.form;

import org.apache.struts.action.ActionForm;

import java.math.BigDecimal;

import jdbcbook.shopping.database.OperateDB;

public class OrderItem extends ActionForm
{

	// 主键
	private		int	id;
	public int getId( )
	{
		return this.id;
	}
	public void setId( int id )
	{
		this.id = id;
	}

	// 订单
	private		int	ordersid;
	public int getOrdersid( )
	{
		return this.ordersid;
	}
	public void setOrdersid( int ordersid )
	{
		this.ordersid = ordersid;
	}

	// 商品
	private		int	productid;
	public int getProductid( )
	{
		return this.productid;
	}
	public void setProductid( int productid )
	{
		this.productid = productid;
	}
	public Product getProduct()
	{
		return (Product)OperateDB.getObjectByID( Product.class, getProductid() );
	}

	// 数量
	private		int	quantity;
	public int getQuantity( )
	{
		return this.quantity;
	}
	public void setQuantity( int quantity )
	{
		this.quantity = quantity;
	}

	// 价格
	private		BigDecimal	price;
	public BigDecimal getPrice( )
	{
		return this.price;
	}
	public void setPrice( BigDecimal price )
	{
		this.price = price;
	}

	// 总费用
	private		BigDecimal	totalfee;
	public BigDecimal getTotalfee( )
	{
		return this.totalfee;
	}
	public void setTotalfee( BigDecimal totalfee )
	{
		this.totalfee = totalfee;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -