📄 carentitybean.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package Entities;import java.io.Serializable;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;/** * * @author kiriashoo */@Entitypublic class CarEntityBean implements Serializable { private static final long serialVersionUID = 1L; private Integer id; private String make; private String model; private int year; private int price; private int status;// id, make, model, year, price, status public void setId(Integer id) { this.id = id; } @Id @GeneratedValue(strategy = GenerationType.AUTO) public Integer getId() { return id; }// make public void setMake(String make) { this.make = make; } public String getMake() { return make; } // model public void setModel(String model) { this.model = model; } public String getModel() { return model; } // year public void setYearOfFabr(int year) { this.year = year; } public int getYearOfFabr() { return year; } // price public void setPrice(int price) { this.price = price; } public int getPrice() { return price; } // status public void setStatus(int status) { this.status = status; } public int getStatus() { return status; } @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 CarEntityBean)) { return false; } CarEntityBean other = (CarEntityBean) 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.CarEntityBean[id=" + id + "]"; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -