HM0003BaseModel.java 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. package com.miniframe.generate.business.system.model;
  2. import java.util.Map;
  3. import java.io.IOException;
  4. import java.util.LinkedHashMap;
  5. import com.miniframe.core.BaseMapModel;
  6. import com.miniframe.core.ext.UtilTools;
  7. import com.miniframe.core.ext.HttpMapFormater;
  8. import com.miniframe.generate.comm.system.A_SYSTEMHEAD;
  9. import com.miniframe.generate.comm.system.D_SYSTEMHEAD;
  10. import com.miniframe.generate.comm.system.A_HM0003;
  11. import com.miniframe.generate.comm.system.D_HM0003;
  12. /**
  13. * 系统服务,“密码修改”模型类(不要维护,重新生成将覆盖)。
  14. */
  15. @SuppressWarnings({ "rawtypes", "unchecked" })
  16. public class HM0003BaseModel extends BaseMapModel {
  17. private static final long serialVersionUID = -1326184831746814093L;
  18. A_SYSTEMHEAD a_systemhead;//上行头
  19. D_SYSTEMHEAD d_systemhead;//下行头
  20. A_HM0003 a_hm0003;//上行体
  21. D_HM0003 d_hm0003;//下行体
  22. public HM0003BaseModel(){
  23. a_systemhead=new A_SYSTEMHEAD();
  24. d_systemhead=new D_SYSTEMHEAD();
  25. a_hm0003=new A_HM0003();
  26. d_hm0003=new D_HM0003();
  27. }
  28. public void validater() throws Exception {
  29. this.a_systemhead.validater();
  30. this.a_hm0003.validater();
  31. }
  32. public void setTransMap(Map map) throws Exception {
  33. Map headMap = HttpMapFormater.format(map, A_SYSTEMHEAD.class);
  34. this.a_systemhead = UtilTools.map2Obj(headMap, A_SYSTEMHEAD.class);
  35. Map bodyMap = HttpMapFormater.format(map, A_HM0003.class);
  36. this.a_hm0003 = UtilTools.map2Obj(bodyMap, A_HM0003.class);
  37. }
  38. public Map getTransMap() throws Exception {
  39. Map reMap = new LinkedHashMap();
  40. reMap.putAll(UtilTools.obj2Map(this.d_systemhead));
  41. reMap.putAll(UtilTools.obj2Map(this.d_hm0003));
  42. return reMap;
  43. }
  44. public A_SYSTEMHEAD getA_systemhead() {
  45. return this.a_systemhead;
  46. }
  47. public void setA_systemhead(A_SYSTEMHEAD a_systemhead) {
  48. this.a_systemhead=a_systemhead;
  49. }
  50. public D_SYSTEMHEAD getD_systemhead() {
  51. return d_systemhead;
  52. }
  53. public void setD_systemhead(D_SYSTEMHEAD d_systemhead) {
  54. this.d_systemhead=d_systemhead;
  55. }
  56. public A_HM0003 getA_hm0003() {
  57. return a_hm0003;
  58. }
  59. public void setA_hm0003(A_HM0003 a_hm0003) {
  60. this.a_hm0003=a_hm0003;
  61. }
  62. public D_HM0003 getD_hm0003() {
  63. return this.d_hm0003;
  64. }
  65. public void setD_hm0003(D_HM0003 d_hm0003) {
  66. this.d_hm0003=d_hm0003;
  67. }
  68. @Override
  69. public String toString() {
  70. try {
  71. return UtilTools.obj2Json(this,true);
  72. } catch (IOException e) {
  73. return "";
  74. }
  75. }
  76. }