account.java.netbeans-base
来自「Store Manager」· NETBEANS-BASE 代码 · 共 141 行
NETBEANS-BASE
141 行
/* * Account.java * * Created on 2007-6-1, 14:22:22 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */package com.studio009.store.entity;import java.io.Serializable;import java.math.BigDecimal;import java.util.Date;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.JoinColumn;import javax.persistence.ManyToOne;import javax.persistence.NamedQueries;import javax.persistence.NamedQuery;import javax.persistence.Table;import javax.persistence.Temporal;import javax.persistence.TemporalType;/** * * @author wangs */@Entity@Table(name = "account")@NamedQueries( {@NamedQuery(name = "Account.findByAccountID", query = "SELECT a FROM Account a WHERE a.accountID = :accountID"), @NamedQuery(name = "Account.findByAccountAmount", query = "SELECT a FROM Account a WHERE a.accountAmount = :accountAmount"), @NamedQuery(name = "Account.findByAccountTime", query = "SELECT a FROM Account a WHERE a.accountTime = :accountTime"), @NamedQuery(name = "Account.findByAccountNote", query = "SELECT a FROM Account a WHERE a.accountNote = :accountNote")})public class Account implements Serializable { @Id @Column(name = "accountID", nullable = false) @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer accountID; @Column(name = "accountAmount", nullable = false) private BigDecimal accountAmount; @Column(name = "accountTime", nullable = false) @Temporal(TemporalType.TIMESTAMP) private Date accountTime; @Column(name = "accountNote") private String accountNote; @JoinColumn(name = "accountCategoryName", referencedColumnName = "accountCategoryName") @ManyToOne private AccountCategory accountCategoryName; @JoinColumn(name = "operatorName", referencedColumnName = "operatorName") @ManyToOne private Operator operatorName; public Account() { } public Account(Integer accountID) { this.accountID = accountID; } public Account(Integer accountID, BigDecimal accountAmount, Date accountTime) { this.accountID = accountID; this.accountAmount = accountAmount; this.accountTime = accountTime; } public Integer getAccountID() { return accountID; } public void setAccountID(Integer accountID) { this.accountID = accountID; } public BigDecimal getAccountAmount() { return accountAmount; } public void setAccountAmount(BigDecimal accountAmount) { this.accountAmount = accountAmount; } public Date getAccountTime() { return accountTime; } public void setAccountTime(Date accountTime) { this.accountTime = accountTime; } public String getAccountNote() { return accountNote; } public void setAccountNote(String accountNote) { this.accountNote = accountNote; } public AccountCategory getAccountCategoryName() { return accountCategoryName; } public void setAccountCategoryName(AccountCategory accountCategoryName) { this.accountCategoryName = accountCategoryName; } public Operator getOperatorName() { return operatorName; } public void setOperatorName(Operator operatorName) { this.operatorName = operatorName; } @Override public int hashCode() { int hash = 0; hash += (accountID != null ? accountID.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 Account)) { return false; } Account other = (Account) object; if (this.accountID != other.accountID && (this.accountID == null || !this.accountID.equals(other.accountID))) { return false; } return true; } @Override public String toString() { return "com.studio009.store.entity.Account[accountID=" + accountID + "]"; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?