ENMLehrer.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.cast_de_nrw_schule_svws_core_data_enm_ENMLehrer = exports.ENMLehrer = void 0;
  4. const JavaObject_1 = require("../../../java/lang/JavaObject");
  5. class ENMLehrer extends JavaObject_1.JavaObject {
  6. id = 0;
  7. kuerzel = null;
  8. nachname = null;
  9. vorname = null;
  10. eMailDienstlich = null;
  11. constructor() {
  12. super();
  13. }
  14. isTranspiledInstanceOf(name) {
  15. return ['de.nrw.schule.svws.core.data.enm.ENMLehrer'].includes(name);
  16. }
  17. static transpilerFromJSON(json) {
  18. const obj = JSON.parse(json);
  19. const result = new ENMLehrer();
  20. if (typeof obj.id === "undefined")
  21. throw new Error('invalid json format, missing attribute id');
  22. result.id = obj.id;
  23. result.kuerzel = typeof obj.kuerzel === "undefined" ? null : obj.kuerzel;
  24. result.nachname = typeof obj.nachname === "undefined" ? null : obj.nachname;
  25. result.vorname = typeof obj.vorname === "undefined" ? null : obj.vorname;
  26. result.eMailDienstlich = typeof obj.eMailDienstlich === "undefined" ? null : obj.eMailDienstlich;
  27. return result;
  28. }
  29. static transpilerToJSON(obj) {
  30. let result = '{';
  31. result += '"id" : ' + obj.id + ',';
  32. result += '"kuerzel" : ' + ((!obj.kuerzel) ? 'null' : '"' + obj.kuerzel.valueOf() + '"') + ',';
  33. result += '"nachname" : ' + ((!obj.nachname) ? 'null' : '"' + obj.nachname.valueOf() + '"') + ',';
  34. result += '"vorname" : ' + ((!obj.vorname) ? 'null' : '"' + obj.vorname.valueOf() + '"') + ',';
  35. result += '"eMailDienstlich" : ' + ((!obj.eMailDienstlich) ? 'null' : '"' + obj.eMailDienstlich.valueOf() + '"') + ',';
  36. result = result.slice(0, -1);
  37. result += '}';
  38. return result;
  39. }
  40. static transpilerToJSONPatch(obj) {
  41. let result = '{';
  42. if (typeof obj.id !== "undefined") {
  43. result += '"id" : ' + obj.id + ',';
  44. }
  45. if (typeof obj.kuerzel !== "undefined") {
  46. result += '"kuerzel" : ' + ((!obj.kuerzel) ? 'null' : '"' + obj.kuerzel.valueOf() + '"') + ',';
  47. }
  48. if (typeof obj.nachname !== "undefined") {
  49. result += '"nachname" : ' + ((!obj.nachname) ? 'null' : '"' + obj.nachname.valueOf() + '"') + ',';
  50. }
  51. if (typeof obj.vorname !== "undefined") {
  52. result += '"vorname" : ' + ((!obj.vorname) ? 'null' : '"' + obj.vorname.valueOf() + '"') + ',';
  53. }
  54. if (typeof obj.eMailDienstlich !== "undefined") {
  55. result += '"eMailDienstlich" : ' + ((!obj.eMailDienstlich) ? 'null' : '"' + obj.eMailDienstlich.valueOf() + '"') + ',';
  56. }
  57. result = result.slice(0, -1);
  58. result += '}';
  59. return result;
  60. }
  61. }
  62. exports.ENMLehrer = ENMLehrer;
  63. function cast_de_nrw_schule_svws_core_data_enm_ENMLehrer(obj) {
  64. return obj;
  65. }
  66. exports.cast_de_nrw_schule_svws_core_data_enm_ENMLehrer = cast_de_nrw_schule_svws_core_data_enm_ENMLehrer;
  67. //# sourceMappingURL=ENMLehrer.js.map