- package com.rookie.bigdata.domain;
- /**
- * @author
- * @date 2018/10/9
- */
- public class Student {
- private Long stuNo;
- private String name;
- private Integer age;
- public Long getStuNo() {
- return stuNo;
- }
- public void setStuNo(Long stuNo) {
- this.stuNo = stuNo;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public Integer getAge() {
- return age;
- }
- public void setAge(Integer age) {
- this.age = age;
- }
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- Student student = (Student) o;
- if (stuNo != null ? !stuNo.equals(student.stuNo) : student.stuNo != null) return false;
- if (name != null ? !name.equals(student.name) : student.name != null) return false;
- return age != null ? age.equals(student.age) : student.age == null;
- }
- @Override
- public int hashCode() {
- int result = stuNo != null ? stuNo.hashCode() : 0;
- result = 31 * result + (name != null ? name.hashCode() : 0);
- result = 31 * result + (age != null ? age.hashCode() : 0);
- return result;
- }
- @Override
- public String toString() {
- return "Student{" +
- "stuNo=" + stuNo +
- ", name='" + name + '\'' +
- ", age=" + age +
- '}';
- }
- }