SHARE
TWEET

Untitled

a guest May 1st, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package entity;
  2.  
  3. import javax.persistence.Entity;
  4. import javax.persistence.GeneratedValue;
  5. import javax.persistence.GenerationType;
  6. import javax.persistence.Id;
  7. import java.sql.*;
  8.  
  9. @Entity
  10. public class Entity
  11. {
  12.     @Id
  13.     @GeneratedValue(strategy = GenerationType.IDENTITY)
  14.     private Long id;
  15.     private String name;
  16.     private String surname;
  17.     private int year;
  18.     private String email;
  19.  
  20.    
  21.     public Entity() {
  22.     }
  23.  
  24.     public Entity(Long id, String name, String surname, int year, String email) {
  25.         this.id = id;
  26.         this.name = name;
  27.         this.surname = surname;
  28.         this.year = year;
  29.         this.email = email;
  30.     }
  31.  
  32.     public Long getId() {
  33.         return id;
  34.     }
  35.  
  36.     public void setId(Long id) {
  37.         this.id = id;
  38.     }
  39.  
  40.     public String getName() {
  41.         return name;
  42.     }
  43.  
  44.     public void setName(String name) {
  45.         this.name = name;
  46.     }
  47.  
  48.     public String getSurname() {
  49.         return surname;
  50.     }
  51.  
  52.     public void setSurname(String surname) {
  53.         this.surname = surname;
  54.     }
  55.  
  56.     public int getYear() {
  57.         return year;
  58.     }
  59.  
  60.     public void setYear(int year) {
  61.         this.year = year;
  62.     }
  63.  
  64.     public String getEmail() {
  65.         return email;
  66.     }
  67.  
  68.     public void setEmail(String email) {
  69.         this.email = email;
  70.     }
  71.     @Override
  72.     public String toString() {
  73.         return "Entity{" + "id=" + id + ", name=" + name + ", surname=" + surname + ", year=" + year +", email=" + email + '}';
  74.     }
  75.    
  76.    
  77. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top