GostBeratungslehrer.js 2.6 KB

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