ENMFloskel.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import { JavaObject, cast_java_lang_Object } from '../../../java/lang/JavaObject';
  2. import { JavaLong, cast_java_lang_Long } from '../../../java/lang/JavaLong';
  3. import { JavaString, cast_java_lang_String } from '../../../java/lang/JavaString';
  4. export class ENMFloskel extends JavaObject {
  5. public kuerzel : String | null = null;
  6. public text : String | null = null;
  7. public fachID : Number | null = null;
  8. public niveau : Number | null = null;
  9. public jahrgangID : Number | null = null;
  10. public constructor() {
  11. super();
  12. }
  13. isTranspiledInstanceOf(name : string): boolean {
  14. return ['de.nrw.schule.svws.core.data.enm.ENMFloskel'].includes(name);
  15. }
  16. public static transpilerFromJSON(json : string): ENMFloskel {
  17. const obj = JSON.parse(json);
  18. const result = new ENMFloskel();
  19. result.kuerzel = typeof obj.kuerzel === "undefined" ? null : obj.kuerzel;
  20. result.text = typeof obj.text === "undefined" ? null : obj.text;
  21. result.fachID = typeof obj.fachID === "undefined" ? null : obj.fachID;
  22. result.niveau = typeof obj.niveau === "undefined" ? null : obj.niveau;
  23. result.jahrgangID = typeof obj.jahrgangID === "undefined" ? null : obj.jahrgangID;
  24. return result;
  25. }
  26. public static transpilerToJSON(obj : ENMFloskel) : string {
  27. let result = '{';
  28. result += '"kuerzel" : ' + ((!obj.kuerzel) ? 'null' : '"' + obj.kuerzel.valueOf() + '"') + ',';
  29. result += '"text" : ' + ((!obj.text) ? 'null' : '"' + obj.text.valueOf() + '"') + ',';
  30. result += '"fachID" : ' + ((!obj.fachID) ? 'null' : obj.fachID.valueOf()) + ',';
  31. result += '"niveau" : ' + ((!obj.niveau) ? 'null' : obj.niveau.valueOf()) + ',';
  32. result += '"jahrgangID" : ' + ((!obj.jahrgangID) ? 'null' : obj.jahrgangID.valueOf()) + ',';
  33. result = result.slice(0, -1);
  34. result += '}';
  35. return result;
  36. }
  37. public static transpilerToJSONPatch(obj : Partial<ENMFloskel>) : string {
  38. let result = '{';
  39. if (typeof obj.kuerzel !== "undefined") {
  40. result += '"kuerzel" : ' + ((!obj.kuerzel) ? 'null' : '"' + obj.kuerzel.valueOf() + '"') + ',';
  41. }
  42. if (typeof obj.text !== "undefined") {
  43. result += '"text" : ' + ((!obj.text) ? 'null' : '"' + obj.text.valueOf() + '"') + ',';
  44. }
  45. if (typeof obj.fachID !== "undefined") {
  46. result += '"fachID" : ' + ((!obj.fachID) ? 'null' : obj.fachID.valueOf()) + ',';
  47. }
  48. if (typeof obj.niveau !== "undefined") {
  49. result += '"niveau" : ' + ((!obj.niveau) ? 'null' : obj.niveau.valueOf()) + ',';
  50. }
  51. if (typeof obj.jahrgangID !== "undefined") {
  52. result += '"jahrgangID" : ' + ((!obj.jahrgangID) ? 'null' : obj.jahrgangID.valueOf()) + ',';
  53. }
  54. result = result.slice(0, -1);
  55. result += '}';
  56. return result;
  57. }
  58. }
  59. export function cast_de_nrw_schule_svws_core_data_enm_ENMFloskel(obj : unknown) : ENMFloskel {
  60. return obj as ENMFloskel;
  61. }