📄 crmorderitem.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package entities;import java.io.Serializable;import javax.persistence.CascadeType;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.JoinColumn;import javax.persistence.ManyToOne;/** * * @author James */@Entitypublic class CrmOrderItem implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ManyToOne(cascade=CascadeType.REFRESH ,optional=false) @JoinColumn(name="crmorder_id",nullable=false) private CrmOrder crmorder; private String product; private float quatity; private float price; private float amount; public void setId(Long id) { this.id = id; } public Long getId() { return id; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof CrmOrderItem)) { return false; } CrmOrderItem other = (CrmOrderItem) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "entities.CrmOrderItem[id=" + id + "]"; } public CrmOrder getCrmorder() { return crmorder; } public void setCrmorder(CrmOrder crmorder) { this.crmorder = crmorder; } public String getProduct() { return product; } public void setProduct(String product) { this.product = product; } public float getQuatity() { return quatity; } public void setQuatity(float quatity) { this.quatity = quatity; } public float getPrice() { return price; } public void setPrice(float price) { this.price = price; } public float getAmount() { return amount; } public void setAmount(float amount) { this.amount = amount; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -