1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
| package com.xiaoguan.pojo;
import java.io.Serializable; import java.util.Objects;
public class Car implements Serializable { private Long id; private String carNum; private String brand; private Double guidePrice; private String produceTime; private String carType;
public Car() { }
public Car(Long id, String carNum, String brand, Double guidePrice, String produceTime, String carType) { this.id = id; this.carNum = carNum; this.brand = brand; this.guidePrice = guidePrice; this.produceTime = produceTime; this.carType = carType; }
@Override public String toString() { return "Car{" + "id=" + id + ", carNum='" + carNum + '\'' + ", brand='" + brand + '\'' + ", guidePrice=" + guidePrice + ", produceTime='" + produceTime + '\'' + ", carType='" + carType + '\'' + '}'; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Car car = (Car) o; return Objects.equals(getId(), car.getId()) && Objects.equals(getCarNum(), car.getCarNum()) && Objects.equals(getBrand(), car.getBrand()) && Objects.equals(getGuidePrice(), car.getGuidePrice()) && Objects.equals(getProduceTime(), car.getProduceTime()) && Objects.equals(getCarType(), car.getCarType()); }
@Override public int hashCode() { return Objects.hash(getId(), getCarNum(), getBrand(), getGuidePrice(), getProduceTime(), getCarType()); }
public Long getId() { return id; }
public void setId(Long id) { this.id = id; }
public String getCarNum() { return carNum; }
public void setCarNum(String carNum) { this.carNum = carNum; }
public String getBrand() { return brand; }
public void setBrand(String brand) { this.brand = brand; }
public Double getGuidePrice() { return guidePrice; }
public void setGuidePrice(Double guidePrice) { this.guidePrice = guidePrice; }
public String getProduceTime() { return produceTime; }
public void setProduceTime(String produceTime) { this.produceTime = produceTime; }
public String getCarType() { return carType; }
public void setCarType(String carType) { this.carType = carType; } }
|