⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wuser.java

📁 SUN的JAVA EE5源代码java_ee_sdk-5_03-preview-samples
💻 JAVA
字号:
/* * The contents of this file are subject to the terms * of the Common Development and Distribution License * (the License). You may not use this file except in * compliance with the License. * * You can obtain a copy of the License at * https://javaserverfaces.dev.java.net/CDDL.html or * legal/CDDLv1.0.txt. * See the License for the specific language governing * permission and limitations under the License. * * When distributing Covered Code, include this CDDL * Header Notice in each file and include the License file * at legal/CDDLv1.0.txt. * If applicable, add the following below the CDDL Header, * with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * [Name of File] [$Id: Wuser.java,v 1.1.1.1 2006/08/10 01:09:25 msreddy Exp $] [Date] * * Copyright 2006 Sun Microsystems Inc. All Rights Reserved */package enterprise.jsf_jpa_war;import java.io.Serializable;import java.util.Date;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.Id;import javax.persistence.NamedQueries;import javax.persistence.NamedQuery;import javax.persistence.Table;import javax.persistence.Temporal;import javax.persistence.TemporalType;import static javax.persistence.GenerationType.IDENTITY;/** * <p>This entity provides a very basic representation of a web application * user.</p> * * <p>This code was generated by NetBeans 5.5 DEV.</p> * * @author rlubke */@Entity@Table(name = "WUSER")@NamedQueries( {@NamedQuery(name = "Wuser.findById", query = "SELECT w FROM Wuser w WHERE w.id = :id"), @NamedQuery(name = "Wuser.findByFirstname", query = "SELECT w FROM Wuser w WHERE w.firstname = :firstname"), @NamedQuery(name = "Wuser.findByLastname", query = "SELECT w FROM Wuser w WHERE w.lastname = :lastname"), @NamedQuery(name = "Wuser.findByUsername", query = "SELECT w FROM Wuser w WHERE w.username = :username"), @NamedQuery(name = "Wuser.findByPassword", query = "SELECT w FROM Wuser w WHERE w.password = :password"), @NamedQuery(name = "Wuser.findBySince", query = "SELECT w FROM Wuser w WHERE w.since = :since")})public class Wuser implements Serializable {    @Id    @GeneratedValue(strategy=IDENTITY)    @Column(name = "ID", nullable = false)    private Integer id;    @Column(name = "FIRSTNAME", nullable = false)    private String firstname;    @Column(name = "LASTNAME", nullable = false)    private String lastname;    @Column(name = "USERNAME", nullable = false)    private String username;    @Column(name = "PASSWORD", nullable = false)    private String password;    @Column(name = "SINCE")    @Temporal(TemporalType.TIMESTAMP)    private Date since;        /** Creates a new instance of Wuser */    public Wuser() {    }    public Wuser(Integer id) {        this.id = id;    }    public Wuser(Integer id, String firstname, String lastname, String username, String password) {        this.id = id;        this.firstname = firstname;        this.lastname = lastname;        this.username = username;        this.password = password;    }    public Integer getId() {        return this.id;    }    public void setId(Integer id) {        this.id = id;    }    public String getFirstname() {        return this.firstname;    }    public void setFirstname(String firstname) {        this.firstname = firstname;    }    public String getLastname() {        return this.lastname;    }    public void setLastname(String lastname) {        this.lastname = lastname;    }    public String getUsername() {        return this.username;    }    public void setUsername(String username) {        this.username = username;    }    public String getPassword() {        return this.password;    }    public void setPassword(String password) {        this.password = password;    }    public Date getSince() {        return this.since;    }    public void setSince(Date since) {        this.since = since;    }    public int hashCode() {        int hash = 0;        hash += (this.id != null ? this.id.hashCode() : 0);        return hash;    }    public boolean equals(Object object) {        if (object == null || !this.getClass().equals(object.getClass())) {            return false;        }        Wuser other = (Wuser)object;        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) return false;        return true;    }    public String toString() {        //TODO change toString() implementation to return a better display name        return "" + this.id;    }    }

⌨️ 快捷键说明

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