DictDataBean.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. package com.fxy.bean;
  2. import android.os.Parcel;
  3. import android.os.Parcelable;
  4. /**
  5. * 数据字典对象
  6. * @author James.Jiang
  7. * @date 2020-01-13
  8. */
  9. public class DictDataBean implements Parcelable {
  10. private Integer key;
  11. private String code;
  12. private String name;
  13. private String description;
  14. @Override
  15. public String toString() {
  16. return "DictDataBean{" +
  17. "key=" + key +
  18. "code=" + code +
  19. ", name=" + name +
  20. ", description=" + description +
  21. '}';
  22. }
  23. @Override
  24. public int describeContents() {
  25. return 0;
  26. }
  27. @Override
  28. public void writeToParcel(Parcel dest, int flags) {
  29. dest.writeInt(this.key);
  30. dest.writeString(this.code);
  31. dest.writeString(this.name);
  32. dest.writeString(this.description);
  33. }
  34. public DictDataBean() {
  35. }
  36. public DictDataBean(String code,String name,String description) {
  37. this.code = code;
  38. this.name = name;
  39. this.description = description;
  40. }
  41. public DictDataBean(String code,String name) {
  42. this.code = code;
  43. this.name = name;
  44. }
  45. public DictDataBean(Integer key,String name) {
  46. this.key = key;
  47. this.name = name;
  48. }
  49. protected DictDataBean(Parcel in) {
  50. this.key = in.readInt();
  51. this.code = in.readString();
  52. this.name = in.readString();
  53. }
  54. public static final Creator<DictDataBean> CREATOR = new Creator<DictDataBean>() {
  55. @Override
  56. public DictDataBean createFromParcel(Parcel source) {
  57. return new DictDataBean(source);
  58. }
  59. @Override
  60. public DictDataBean[] newArray(int size) {
  61. return new DictDataBean[size];
  62. }
  63. };
  64. public String getCode() {
  65. return code;
  66. }
  67. public Integer getKey() {
  68. return key;
  69. }
  70. public String getDescription() {
  71. return description;
  72. }
  73. public void setDescription(String description) {
  74. this.description = description;
  75. }
  76. public void setKey(Integer key) {
  77. this.key = key;
  78. }
  79. public void setCode(String code) {
  80. this.code = code;
  81. }
  82. public String getName() {
  83. return name;
  84. }
  85. public void setName(String name) {
  86. this.name = name;
  87. }
  88. }