ENMNote.js 2.2 KB

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