Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, 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 Nuno
- */
- @Entity
- public class Student implements Serializable {
- @Id
- private String username;
- private String password;
- private String name;
- private String email;
- public Student() {
- }
- public Student(String username, String password, String name, String email) {
- this.username = username;
- this.password = password;
- this.name = name;
- this.email = email;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public String getEmail() {
- return email;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- @Override
- public String toString() {
- return "Student{" + "username=" + username + ", password=" + password + '}';
- }
- @Override
- public int hashCode() {
- return super.hashCode(); //To change body of generated methods, choose Tools | Templates.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement