GostFachwahl.js 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.cast_de_nrw_schule_svws_core_data_gost_GostFachwahl = exports.GostFachwahl = void 0;
  4. const JavaObject_1 = require("../../../java/lang/JavaObject");
  5. class GostFachwahl extends JavaObject_1.JavaObject {
  6. id = -1;
  7. fachID = -1;
  8. halbjahrID = -1;
  9. schuelerID = -1;
  10. schuelerNachname = "";
  11. schuelerVorname = "";
  12. kursartID = -1;
  13. constructor() {
  14. super();
  15. }
  16. isTranspiledInstanceOf(name) {
  17. return ['de.nrw.schule.svws.core.data.gost.GostFachwahl'].includes(name);
  18. }
  19. static transpilerFromJSON(json) {
  20. const obj = JSON.parse(json);
  21. const result = new GostFachwahl();
  22. if (typeof obj.id === "undefined")
  23. throw new Error('invalid json format, missing attribute id');
  24. result.id = obj.id;
  25. if (typeof obj.fachID === "undefined")
  26. throw new Error('invalid json format, missing attribute fachID');
  27. result.fachID = obj.fachID;
  28. if (typeof obj.halbjahrID === "undefined")
  29. throw new Error('invalid json format, missing attribute halbjahrID');
  30. result.halbjahrID = obj.halbjahrID;
  31. if (typeof obj.schuelerID === "undefined")
  32. throw new Error('invalid json format, missing attribute schuelerID');
  33. result.schuelerID = obj.schuelerID;
  34. if (typeof obj.schuelerNachname === "undefined")
  35. throw new Error('invalid json format, missing attribute schuelerNachname');
  36. result.schuelerNachname = obj.schuelerNachname;
  37. if (typeof obj.schuelerVorname === "undefined")
  38. throw new Error('invalid json format, missing attribute schuelerVorname');
  39. result.schuelerVorname = obj.schuelerVorname;
  40. if (typeof obj.kursartID === "undefined")
  41. throw new Error('invalid json format, missing attribute kursartID');
  42. result.kursartID = obj.kursartID;
  43. return result;
  44. }
  45. static transpilerToJSON(obj) {
  46. let result = '{';
  47. result += '"id" : ' + obj.id + ',';
  48. result += '"fachID" : ' + obj.fachID + ',';
  49. result += '"halbjahrID" : ' + obj.halbjahrID + ',';
  50. result += '"schuelerID" : ' + obj.schuelerID + ',';
  51. result += '"schuelerNachname" : ' + '"' + obj.schuelerNachname.valueOf() + '"' + ',';
  52. result += '"schuelerVorname" : ' + '"' + obj.schuelerVorname.valueOf() + '"' + ',';
  53. result += '"kursartID" : ' + obj.kursartID + ',';
  54. result = result.slice(0, -1);
  55. result += '}';
  56. return result;
  57. }
  58. static transpilerToJSONPatch(obj) {
  59. let result = '{';
  60. if (typeof obj.id !== "undefined") {
  61. result += '"id" : ' + obj.id + ',';
  62. }
  63. if (typeof obj.fachID !== "undefined") {
  64. result += '"fachID" : ' + obj.fachID + ',';
  65. }
  66. if (typeof obj.halbjahrID !== "undefined") {
  67. result += '"halbjahrID" : ' + obj.halbjahrID + ',';
  68. }
  69. if (typeof obj.schuelerID !== "undefined") {
  70. result += '"schuelerID" : ' + obj.schuelerID + ',';
  71. }
  72. if (typeof obj.schuelerNachname !== "undefined") {
  73. result += '"schuelerNachname" : ' + '"' + obj.schuelerNachname.valueOf() + '"' + ',';
  74. }
  75. if (typeof obj.schuelerVorname !== "undefined") {
  76. result += '"schuelerVorname" : ' + '"' + obj.schuelerVorname.valueOf() + '"' + ',';
  77. }
  78. if (typeof obj.kursartID !== "undefined") {
  79. result += '"kursartID" : ' + obj.kursartID + ',';
  80. }
  81. result = result.slice(0, -1);
  82. result += '}';
  83. return result;
  84. }
  85. }
  86. exports.GostFachwahl = GostFachwahl;
  87. function cast_de_nrw_schule_svws_core_data_gost_GostFachwahl(obj) {
  88. return obj;
  89. }
  90. exports.cast_de_nrw_schule_svws_core_data_gost_GostFachwahl = cast_de_nrw_schule_svws_core_data_gost_GostFachwahl;
  91. //# sourceMappingURL=GostFachwahl.js.map