SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.pig.database.databasedemo.entity;
  2.  
  3. import java.util.Date;
  4.  
  5. public class Person {
  6.     private int id;
  7.     private String name;
  8.     private String location;
  9.     private Date birthDate;
  10.    
  11.     public Person() {
  12.        
  13.     }
  14.    
  15.    
  16.     //弄個Constructor
  17.     public Person(int id, String name, String location, Date birthDate) {
  18.         super();
  19.         this.id = id;
  20.         this.name = name;
  21.         this.location = location;
  22.         this.birthDate = birthDate;
  23.     }
  24.    
  25.    
  26.     //全部的get setter
  27.     public int getId() {
  28.         return id;
  29.     }
  30.     public void setId(int id) {
  31.         this.id = id;
  32.     }
  33.     public String getName() {
  34.         return name;
  35.     }
  36.     public void setName(String name) {
  37.         this.name = name;
  38.     }
  39.     public String getLocation() {
  40.         return location;
  41.     }
  42.     public void setLocation(String location) {
  43.         this.location = location;
  44.     }
  45.     public Date getBirthDate() {
  46.         return birthDate;
  47.     }
  48.     public void setBirthDate(Date birthDate) {
  49.         this.birthDate = birthDate;
  50.     }
  51.  
  52.  
  53.     @Override
  54.     public String toString() {
  55.         return "\nPerson [id=" + id + ", name=" + name + ", location=" + location + ", birthDate=" + birthDate + "]";
  56.     }
  57.    
  58.  
  59. }
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