order.java

来自「hibernate的源码1 struts+hibernate+spring」· Java 代码 · 共 50 行

JAVA
50
字号
package mypack;
public class Order {
    private Long id;
    private String orderNumber;
    private double price;
    private Customer customer;

    /** 完整的构造方法 */
    public Order(String orderNumber, double price,mypack.Customer customer) {
        this.orderNumber = orderNumber;
        this.price=price;
        this.customer = customer;
    }

    /** 默认构造方法 */
    public Order() {}

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderNumber() {
        return this.orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public double getPrice() {
        return this.price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
    public Customer getCustomer() {
        return this.customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }
 }

⌨️ 快捷键说明

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