car.java

来自「hibernate 简单的例子」· Java 代码 · 共 44 行

JAVA
44
字号
package org.itfuture.www.vo;

import java.io.Serializable;

import org.itfuture.www.po.Item;

public class Car implements Serializable {
	private Item item;

	private Integer quantity;

	public Car() {

	}

	public Car(Item item, Integer quantity) {
		super();
		this.item = item;
		this.quantity = quantity;
	}

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}
    public void identity(){
    	quantity++;
    }
    public void addQuantity(Integer num){
    	this.quantity+= num;
    }
}

⌨️ 快捷键说明

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