Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.pig.database.databasedemo.entity;
- import java.util.Date;
- public class Person {
- private int id;
- private String name;
- private String location;
- private Date birthDate;
- public Person() {
- }
- //弄個Constructor
- public Person(int id, String name, String location, Date birthDate) {
- super();
- this.id = id;
- this.name = name;
- this.location = location;
- this.birthDate = birthDate;
- }
- //全部的get setter
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getLocation() {
- return location;
- }
- public void setLocation(String location) {
- this.location = location;
- }
- public Date getBirthDate() {
- return birthDate;
- }
- public void setBirthDate(Date birthDate) {
- this.birthDate = birthDate;
- }
- @Override
- public String toString() {
- return "\nPerson [id=" + id + ", name=" + name + ", location=" + location + ", birthDate=" + birthDate + "]";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement