trade.java

来自「基于netbeans的java桌面应用程序合集」· Java 代码 · 共 70 行

JAVA
70
字号
package entities;

import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity()
public class Trade implements java.io.Serializable {

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    private Long id;
    @ManyToOne
    private Stock stock;
    private long shareNum;
    private double price;
    @ManyToOne
    private TradeType type;
    
    /** Creates a new instance of Trade */
    public Trade() {
    }

    public Long getId() {
        return id;
    }

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

    public Stock getStock() {
        return stock;
    }

    public void setStock(Stock stock) {
        this.stock = stock;
    }

    public long getShareNum() {
        return shareNum;
    }

    public void setShareNum(long shareNum) {
        this.shareNum = shareNum;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
    
    public TradeType getType() {
        return type;
    }

    public void setType(TradeType type) {
        this.type = type;
    }
    
}

⌨️ 快捷键说明

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