summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/sat/thrift/iface/Person.java
blob: bb407af8830a706fb51531b635e9ff9b84df44b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
/**
 * Autogenerated by Thrift Compiler (0.9.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.openslx.sat.thrift.iface;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Person implements org.apache.thrift.TBase<Person, Person._Fields>, java.io.Serializable, Cloneable, Comparable<Person> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Person");

  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField NACHNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("Nachname", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField VORNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("Vorname", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("mail", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField IMAGE_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("image_read", org.apache.thrift.protocol.TType.BOOL, (short)5);
  private static final org.apache.thrift.protocol.TField IMAGE_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("image_write", org.apache.thrift.protocol.TType.BOOL, (short)6);
  private static final org.apache.thrift.protocol.TField IMAGE_ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("image_admin", org.apache.thrift.protocol.TType.BOOL, (short)7);
  private static final org.apache.thrift.protocol.TField IMAGE_LINK_FIELD_DESC = new org.apache.thrift.protocol.TField("image_link", org.apache.thrift.protocol.TType.BOOL, (short)8);
  private static final org.apache.thrift.protocol.TField LECTURE_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture_read", org.apache.thrift.protocol.TType.BOOL, (short)9);
  private static final org.apache.thrift.protocol.TField LECTURE_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture_write", org.apache.thrift.protocol.TType.BOOL, (short)10);
  private static final org.apache.thrift.protocol.TField LECTURE_ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture_admin", org.apache.thrift.protocol.TType.BOOL, (short)11);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new PersonStandardSchemeFactory());
    schemes.put(TupleScheme.class, new PersonTupleSchemeFactory());
  }

  public String userID; // required
  public String Nachname; // required
  public String Vorname; // required
  public String mail; // required
  public boolean image_read; // required
  public boolean image_write; // required
  public boolean image_admin; // required
  public boolean image_link; // required
  public boolean lecture_read; // required
  public boolean lecture_write; // required
  public boolean lecture_admin; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    USER_ID((short)1, "userID"),
    NACHNAME((short)2, "Nachname"),
    VORNAME((short)3, "Vorname"),
    MAIL((short)4, "mail"),
    IMAGE_READ((short)5, "image_read"),
    IMAGE_WRITE((short)6, "image_write"),
    IMAGE_ADMIN((short)7, "image_admin"),
    IMAGE_LINK((short)8, "image_link"),
    LECTURE_READ((short)9, "lecture_read"),
    LECTURE_WRITE((short)10, "lecture_write"),
    LECTURE_ADMIN((short)11, "lecture_admin");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // USER_ID
          return USER_ID;
        case 2: // NACHNAME
          return NACHNAME;
        case 3: // VORNAME
          return VORNAME;
        case 4: // MAIL
          return MAIL;
        case 5: // IMAGE_READ
          return IMAGE_READ;
        case 6: // IMAGE_WRITE
          return IMAGE_WRITE;
        case 7: // IMAGE_ADMIN
          return IMAGE_ADMIN;
        case 8: // IMAGE_LINK
          return IMAGE_LINK;
        case 9: // LECTURE_READ
          return LECTURE_READ;
        case 10: // LECTURE_WRITE
          return LECTURE_WRITE;
        case 11: // LECTURE_ADMIN
          return LECTURE_ADMIN;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __IMAGE_READ_ISSET_ID = 0;
  private static final int __IMAGE_WRITE_ISSET_ID = 1;
  private static final int __IMAGE_ADMIN_ISSET_ID = 2;
  private static final int __IMAGE_LINK_ISSET_ID = 3;
  private static final int __LECTURE_READ_ISSET_ID = 4;
  private static final int __LECTURE_WRITE_ISSET_ID = 5;
  private static final int __LECTURE_ADMIN_ISSET_ID = 6;
  private byte __isset_bitfield = 0;
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.NACHNAME, new org.apache.thrift.meta_data.FieldMetaData("Nachname", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.VORNAME, new org.apache.thrift.meta_data.FieldMetaData("Vorname", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MAIL, new org.apache.thrift.meta_data.FieldMetaData("mail", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IMAGE_READ, new org.apache.thrift.meta_data.FieldMetaData("image_read", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IMAGE_WRITE, new org.apache.thrift.meta_data.FieldMetaData("image_write", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IMAGE_ADMIN, new org.apache.thrift.meta_data.FieldMetaData("image_admin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IMAGE_LINK, new org.apache.thrift.meta_data.FieldMetaData("image_link", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.LECTURE_READ, new org.apache.thrift.meta_data.FieldMetaData("lecture_read", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.LECTURE_WRITE, new org.apache.thrift.meta_data.FieldMetaData("lecture_write", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.LECTURE_ADMIN, new org.apache.thrift.meta_data.FieldMetaData("lecture_admin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Person.class, metaDataMap);
  }

  public Person() {
  }

  public Person(
    String userID,
    String Nachname,
    String Vorname,
    String mail,
    boolean image_read,
    boolean image_write,
    boolean image_admin,
    boolean image_link,
    boolean lecture_read,
    boolean lecture_write,
    boolean lecture_admin)
  {
    this();
    this.userID = userID;
    this.Nachname = Nachname;
    this.Vorname = Vorname;
    this.mail = mail;
    this.image_read = image_read;
    setImage_readIsSet(true);
    this.image_write = image_write;
    setImage_writeIsSet(true);
    this.image_admin = image_admin;
    setImage_adminIsSet(true);
    this.image_link = image_link;
    setImage_linkIsSet(true);
    this.lecture_read = lecture_read;
    setLecture_readIsSet(true);
    this.lecture_write = lecture_write;
    setLecture_writeIsSet(true);
    this.lecture_admin = lecture_admin;
    setLecture_adminIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public Person(Person other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetUserID()) {
      this.userID = other.userID;
    }
    if (other.isSetNachname()) {
      this.Nachname = other.Nachname;
    }
    if (other.isSetVorname()) {
      this.Vorname = other.Vorname;
    }
    if (other.isSetMail()) {
      this.mail = other.mail;
    }
    this.image_read = other.image_read;
    this.image_write = other.image_write;
    this.image_admin = other.image_admin;
    this.image_link = other.image_link;
    this.lecture_read = other.lecture_read;
    this.lecture_write = other.lecture_write;
    this.lecture_admin = other.lecture_admin;
  }

  public Person deepCopy() {
    return new Person(this);
  }

  @Override
  public void clear() {
    this.userID = null;
    this.Nachname = null;
    this.Vorname = null;
    this.mail = null;
    setImage_readIsSet(false);
    this.image_read = false;
    setImage_writeIsSet(false);
    this.image_write = false;
    setImage_adminIsSet(false);
    this.image_admin = false;
    setImage_linkIsSet(false);
    this.image_link = false;
    setLecture_readIsSet(false);
    this.lecture_read = false;
    setLecture_writeIsSet(false);
    this.lecture_write = false;
    setLecture_adminIsSet(false);
    this.lecture_admin = false;
  }

  public String getUserID() {
    return this.userID;
  }

  public Person setUserID(String userID) {
    this.userID = userID;
    return this;
  }

  public void unsetUserID() {
    this.userID = null;
  }

  /** Returns true if field userID is set (has been assigned a value) and false otherwise */
  public boolean isSetUserID() {
    return this.userID != null;
  }

  public void setUserIDIsSet(boolean value) {
    if (!value) {
      this.userID = null;
    }
  }

  public String getNachname() {
    return this.Nachname;
  }

  public Person setNachname(String Nachname) {
    this.Nachname = Nachname;
    return this;
  }

  public void unsetNachname() {
    this.Nachname = null;
  }

  /** Returns true if field Nachname is set (has been assigned a value) and false otherwise */
  public boolean isSetNachname() {
    return this.Nachname != null;
  }

  public void setNachnameIsSet(boolean value) {
    if (!value) {
      this.Nachname = null;
    }
  }

  public String getVorname() {
    return this.Vorname;
  }

  public Person setVorname(String Vorname) {
    this.Vorname = Vorname;
    return this;
  }

  public void unsetVorname() {
    this.Vorname = null;
  }

  /** Returns true if field Vorname is set (has been assigned a value) and false otherwise */
  public boolean isSetVorname() {
    return this.Vorname != null;
  }

  public void setVornameIsSet(boolean value) {
    if (!value) {
      this.Vorname = null;
    }
  }

  public String getMail() {
    return this.mail;
  }

  public Person setMail(String mail) {
    this.mail = mail;
    return this;
  }

  public void unsetMail() {
    this.mail = null;
  }

  /** Returns true if field mail is set (has been assigned a value) and false otherwise */
  public boolean isSetMail() {
    return this.mail != null;
  }

  public void setMailIsSet(boolean value) {
    if (!value) {
      this.mail = null;
    }
  }

  public boolean isImage_read() {
    return this.image_read;
  }

  public Person setImage_read(boolean image_read) {
    this.image_read = image_read;
    setImage_readIsSet(true);
    return this;
  }

  public void unsetImage_read() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMAGE_READ_ISSET_ID);
  }

  /** Returns true if field image_read is set (has been assigned a value) and false otherwise */
  public boolean isSetImage_read() {
    return EncodingUtils.testBit(__isset_bitfield, __IMAGE_READ_ISSET_ID);
  }

  public void setImage_readIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMAGE_READ_ISSET_ID, value);
  }

  public boolean isImage_write() {
    return this.image_write;
  }

  public Person setImage_write(boolean image_write) {
    this.image_write = image_write;
    setImage_writeIsSet(true);
    return this;
  }

  public void unsetImage_write() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMAGE_WRITE_ISSET_ID);
  }

  /** Returns true if field image_write is set (has been assigned a value) and false otherwise */
  public boolean isSetImage_write() {
    return EncodingUtils.testBit(__isset_bitfield, __IMAGE_WRITE_ISSET_ID);
  }

  public void setImage_writeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMAGE_WRITE_ISSET_ID, value);
  }

  public boolean isImage_admin() {
    return this.image_admin;
  }

  public Person setImage_admin(boolean image_admin) {
    this.image_admin = image_admin;
    setImage_adminIsSet(true);
    return this;
  }

  public void unsetImage_admin() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMAGE_ADMIN_ISSET_ID);
  }

  /** Returns true if field image_admin is set (has been assigned a value) and false otherwise */
  public boolean isSetImage_admin() {
    return EncodingUtils.testBit(__isset_bitfield, __IMAGE_ADMIN_ISSET_ID);
  }

  public void setImage_adminIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMAGE_ADMIN_ISSET_ID, value);
  }

  public boolean isImage_link() {
    return this.image_link;
  }

  public Person setImage_link(boolean image_link) {
    this.image_link = image_link;
    setImage_linkIsSet(true);
    return this;
  }

  public void unsetImage_link() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMAGE_LINK_ISSET_ID);
  }

  /** Returns true if field image_link is set (has been assigned a value) and false otherwise */
  public boolean isSetImage_link() {
    return EncodingUtils.testBit(__isset_bitfield, __IMAGE_LINK_ISSET_ID);
  }

  public void setImage_linkIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMAGE_LINK_ISSET_ID, value);
  }

  public boolean isLecture_read() {
    return this.lecture_read;
  }

  public Person setLecture_read(boolean lecture_read) {
    this.lecture_read = lecture_read;
    setLecture_readIsSet(true);
    return this;
  }

  public void unsetLecture_read() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LECTURE_READ_ISSET_ID);
  }

  /** Returns true if field lecture_read is set (has been assigned a value) and false otherwise */
  public boolean isSetLecture_read() {
    return EncodingUtils.testBit(__isset_bitfield, __LECTURE_READ_ISSET_ID);
  }

  public void setLecture_readIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LECTURE_READ_ISSET_ID, value);
  }

  public boolean isLecture_write() {
    return this.lecture_write;
  }

  public Person setLecture_write(boolean lecture_write) {
    this.lecture_write = lecture_write;
    setLecture_writeIsSet(true);
    return this;
  }

  public void unsetLecture_write() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LECTURE_WRITE_ISSET_ID);
  }

  /** Returns true if field lecture_write is set (has been assigned a value) and false otherwise */
  public boolean isSetLecture_write() {
    return EncodingUtils.testBit(__isset_bitfield, __LECTURE_WRITE_ISSET_ID);
  }

  public void setLecture_writeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LECTURE_WRITE_ISSET_ID, value);
  }

  public boolean isLecture_admin() {
    return this.lecture_admin;
  }

  public Person setLecture_admin(boolean lecture_admin) {
    this.lecture_admin = lecture_admin;
    setLecture_adminIsSet(true);
    return this;
  }

  public void unsetLecture_admin() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LECTURE_ADMIN_ISSET_ID);
  }

  /** Returns true if field lecture_admin is set (has been assigned a value) and false otherwise */
  public boolean isSetLecture_admin() {
    return EncodingUtils.testBit(__isset_bitfield, __LECTURE_ADMIN_ISSET_ID);
  }

  public void setLecture_adminIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LECTURE_ADMIN_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case USER_ID:
      if (value == null) {
        unsetUserID();
      } else {
        setUserID((String)value);
      }
      break;

    case NACHNAME:
      if (value == null) {
        unsetNachname();
      } else {
        setNachname((String)value);
      }
      break;

    case VORNAME:
      if (value == null) {
        unsetVorname();
      } else {
        setVorname((String)value);
      }
      break;

    case MAIL:
      if (value == null) {
        unsetMail();
      } else {
        setMail((String)value);
      }
      break;

    case IMAGE_READ:
      if (value == null) {
        unsetImage_read();
      } else {
        setImage_read((Boolean)value);
      }
      break;

    case IMAGE_WRITE:
      if (value == null) {
        unsetImage_write();
      } else {
        setImage_write((Boolean)value);
      }
      break;

    case IMAGE_ADMIN:
      if (value == null) {
        unsetImage_admin();
      } else {
        setImage_admin((Boolean)value);
      }
      break;

    case IMAGE_LINK:
      if (value == null) {
        unsetImage_link();
      } else {
        setImage_link((Boolean)value);
      }
      break;

    case LECTURE_READ:
      if (value == null) {
        unsetLecture_read();
      } else {
        setLecture_read((Boolean)value);
      }
      break;

    case LECTURE_WRITE:
      if (value == null) {
        unsetLecture_write();
      } else {
        setLecture_write((Boolean)value);
      }
      break;

    case LECTURE_ADMIN:
      if (value == null) {
        unsetLecture_admin();
      } else {
        setLecture_admin((Boolean)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case USER_ID:
      return getUserID();

    case NACHNAME:
      return getNachname();

    case VORNAME:
      return getVorname();

    case MAIL:
      return getMail();

    case IMAGE_READ:
      return Boolean.valueOf(isImage_read());

    case IMAGE_WRITE:
      return Boolean.valueOf(isImage_write());

    case IMAGE_ADMIN:
      return Boolean.valueOf(isImage_admin());

    case IMAGE_LINK:
      return Boolean.valueOf(isImage_link());

    case LECTURE_READ:
      return Boolean.valueOf(isLecture_read());

    case LECTURE_WRITE:
      return Boolean.valueOf(isLecture_write());

    case LECTURE_ADMIN:
      return Boolean.valueOf(isLecture_admin());

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case USER_ID:
      return isSetUserID();
    case NACHNAME:
      return isSetNachname();
    case VORNAME:
      return isSetVorname();
    case MAIL:
      return isSetMail();
    case IMAGE_READ:
      return isSetImage_read();
    case IMAGE_WRITE:
      return isSetImage_write();
    case IMAGE_ADMIN:
      return isSetImage_admin();
    case IMAGE_LINK:
      return isSetImage_link();
    case LECTURE_READ:
      return isSetLecture_read();
    case LECTURE_WRITE:
      return isSetLecture_write();
    case LECTURE_ADMIN:
      return isSetLecture_admin();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof Person)
      return this.equals((Person)that);
    return false;
  }

  public boolean equals(Person that) {
    if (that == null)
      return false;

    boolean this_present_userID = true && this.isSetUserID();
    boolean that_present_userID = true && that.isSetUserID();
    if (this_present_userID || that_present_userID) {
      if (!(this_present_userID && that_present_userID))
        return false;
      if (!this.userID.equals(that.userID))
        return false;
    }

    boolean this_present_Nachname = true && this.isSetNachname();
    boolean that_present_Nachname = true && that.isSetNachname();
    if (this_present_Nachname || that_present_Nachname) {
      if (!(this_present_Nachname && that_present_Nachname))
        return false;
      if (!this.Nachname.equals(that.Nachname))
        return false;
    }

    boolean this_present_Vorname = true && this.isSetVorname();
    boolean that_present_Vorname = true && that.isSetVorname();
    if (this_present_Vorname || that_present_Vorname) {
      if (!(this_present_Vorname && that_present_Vorname))
        return false;
      if (!this.Vorname.equals(that.Vorname))
        return false;
    }

    boolean this_present_mail = true && this.isSetMail();
    boolean that_present_mail = true && that.isSetMail();
    if (this_present_mail || that_present_mail) {
      if (!(this_present_mail && that_present_mail))
        return false;
      if (!this.mail.equals(that.mail))
        return false;
    }

    boolean this_present_image_read = true;
    boolean that_present_image_read = true;
    if (this_present_image_read || that_present_image_read) {
      if (!(this_present_image_read && that_present_image_read))
        return false;
      if (this.image_read != that.image_read)
        return false;
    }

    boolean this_present_image_write = true;
    boolean that_present_image_write = true;
    if (this_present_image_write || that_present_image_write) {
      if (!(this_present_image_write && that_present_image_write))
        return false;
      if (this.image_write != that.image_write)
        return false;
    }

    boolean this_present_image_admin = true;
    boolean that_present_image_admin = true;
    if (this_present_image_admin || that_present_image_admin) {
      if (!(this_present_image_admin && that_present_image_admin))
        return false;
      if (this.image_admin != that.image_admin)
        return false;
    }

    boolean this_present_image_link = true;
    boolean that_present_image_link = true;
    if (this_present_image_link || that_present_image_link) {
      if (!(this_present_image_link && that_present_image_link))
        return false;
      if (this.image_link != that.image_link)
        return false;
    }

    boolean this_present_lecture_read = true;
    boolean that_present_lecture_read = true;
    if (this_present_lecture_read || that_present_lecture_read) {
      if (!(this_present_lecture_read && that_present_lecture_read))
        return false;
      if (this.lecture_read != that.lecture_read)
        return false;
    }

    boolean this_present_lecture_write = true;
    boolean that_present_lecture_write = true;
    if (this_present_lecture_write || that_present_lecture_write) {
      if (!(this_present_lecture_write && that_present_lecture_write))
        return false;
      if (this.lecture_write != that.lecture_write)
        return false;
    }

    boolean this_present_lecture_admin = true;
    boolean that_present_lecture_admin = true;
    if (this_present_lecture_admin || that_present_lecture_admin) {
      if (!(this_present_lecture_admin && that_present_lecture_admin))
        return false;
      if (this.lecture_admin != that.lecture_admin)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    return 0;
  }

  @Override
  public int compareTo(Person other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUserID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNachname()).compareTo(other.isSetNachname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNachname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Nachname, other.Nachname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVorname()).compareTo(other.isSetVorname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVorname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Vorname, other.Vorname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMail()).compareTo(other.isSetMail());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMail()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mail, other.mail);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetImage_read()).compareTo(other.isSetImage_read());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetImage_read()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_read, other.image_read);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetImage_write()).compareTo(other.isSetImage_write());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetImage_write()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_write, other.image_write);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetImage_admin()).compareTo(other.isSetImage_admin());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetImage_admin()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_admin, other.image_admin);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetImage_link()).compareTo(other.isSetImage_link());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetImage_link()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_link, other.image_link);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLecture_read()).compareTo(other.isSetLecture_read());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLecture_read()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture_read, other.lecture_read);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLecture_write()).compareTo(other.isSetLecture_write());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLecture_write()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture_write, other.lecture_write);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLecture_admin()).compareTo(other.isSetLecture_admin());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLecture_admin()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture_admin, other.lecture_admin);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("Person(");
    boolean first = true;

    sb.append("userID:");
    if (this.userID == null) {
      sb.append("null");
    } else {
      sb.append(this.userID);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("Nachname:");
    if (this.Nachname == null) {
      sb.append("null");
    } else {
      sb.append(this.Nachname);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("Vorname:");
    if (this.Vorname == null) {
      sb.append("null");
    } else {
      sb.append(this.Vorname);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("mail:");
    if (this.mail == null) {
      sb.append("null");
    } else {
      sb.append(this.mail);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("image_read:");
    sb.append(this.image_read);
    first = false;
    if (!first) sb.append(", ");
    sb.append("image_write:");
    sb.append(this.image_write);
    first = false;
    if (!first) sb.append(", ");
    sb.append("image_admin:");
    sb.append(this.image_admin);
    first = false;
    if (!first) sb.append(", ");
    sb.append("image_link:");
    sb.append(this.image_link);
    first = false;
    if (!first) sb.append(", ");
    sb.append("lecture_read:");
    sb.append(this.lecture_read);
    first = false;
    if (!first) sb.append(", ");
    sb.append("lecture_write:");
    sb.append(this.lecture_write);
    first = false;
    if (!first) sb.append(", ");
    sb.append("lecture_admin:");
    sb.append(this.lecture_admin);
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class PersonStandardSchemeFactory implements SchemeFactory {
    public PersonStandardScheme getScheme() {
      return new PersonStandardScheme();
    }
  }

  private static class PersonStandardScheme extends StandardScheme<Person> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, Person struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // USER_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.userID = iprot.readString();
              struct.setUserIDIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // NACHNAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.Nachname = iprot.readString();
              struct.setNachnameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // VORNAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.Vorname = iprot.readString();
              struct.setVornameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // MAIL
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.mail = iprot.readString();
              struct.setMailIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // IMAGE_READ
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.image_read = iprot.readBool();
              struct.setImage_readIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // IMAGE_WRITE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.image_write = iprot.readBool();
              struct.setImage_writeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // IMAGE_ADMIN
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.image_admin = iprot.readBool();
              struct.setImage_adminIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // IMAGE_LINK
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.image_link = iprot.readBool();
              struct.setImage_linkIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // LECTURE_READ
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.lecture_read = iprot.readBool();
              struct.setLecture_readIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // LECTURE_WRITE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.lecture_write = iprot.readBool();
              struct.setLecture_writeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // LECTURE_ADMIN
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.lecture_admin = iprot.readBool();
              struct.setLecture_adminIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, Person struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.userID != null) {
        oprot.writeFieldBegin(USER_ID_FIELD_DESC);
        oprot.writeString(struct.userID);
        oprot.writeFieldEnd();
      }
      if (struct.Nachname != null) {
        oprot.writeFieldBegin(NACHNAME_FIELD_DESC);
        oprot.writeString(struct.Nachname);
        oprot.writeFieldEnd();
      }
      if (struct.Vorname != null) {
        oprot.writeFieldBegin(VORNAME_FIELD_DESC);
        oprot.writeString(struct.Vorname);
        oprot.writeFieldEnd();
      }
      if (struct.mail != null) {
        oprot.writeFieldBegin(MAIL_FIELD_DESC);
        oprot.writeString(struct.mail);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(IMAGE_READ_FIELD_DESC);
      oprot.writeBool(struct.image_read);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IMAGE_WRITE_FIELD_DESC);
      oprot.writeBool(struct.image_write);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IMAGE_ADMIN_FIELD_DESC);
      oprot.writeBool(struct.image_admin);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IMAGE_LINK_FIELD_DESC);
      oprot.writeBool(struct.image_link);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(LECTURE_READ_FIELD_DESC);
      oprot.writeBool(struct.lecture_read);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(LECTURE_WRITE_FIELD_DESC);
      oprot.writeBool(struct.lecture_write);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(LECTURE_ADMIN_FIELD_DESC);
      oprot.writeBool(struct.lecture_admin);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class PersonTupleSchemeFactory implements SchemeFactory {
    public PersonTupleScheme getScheme() {
      return new PersonTupleScheme();
    }
  }

  private static class PersonTupleScheme extends TupleScheme<Person> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, Person struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetUserID()) {
        optionals.set(0);
      }
      if (struct.isSetNachname()) {
        optionals.set(1);
      }
      if (struct.isSetVorname()) {
        optionals.set(2);
      }
      if (struct.isSetMail()) {
        optionals.set(3);
      }
      if (struct.isSetImage_read()) {
        optionals.set(4);
      }
      if (struct.isSetImage_write()) {
        optionals.set(5);
      }
      if (struct.isSetImage_admin()) {
        optionals.set(6);
      }
      if (struct.isSetImage_link()) {
        optionals.set(7);
      }
      if (struct.isSetLecture_read()) {
        optionals.set(8);
      }
      if (struct.isSetLecture_write()) {
        optionals.set(9);
      }
      if (struct.isSetLecture_admin()) {
        optionals.set(10);
      }
      oprot.writeBitSet(optionals, 11);
      if (struct.isSetUserID()) {
        oprot.writeString(struct.userID);
      }
      if (struct.isSetNachname()) {
        oprot.writeString(struct.Nachname);
      }
      if (struct.isSetVorname()) {
        oprot.writeString(struct.Vorname);
      }
      if (struct.isSetMail()) {
        oprot.writeString(struct.mail);
      }
      if (struct.isSetImage_read()) {
        oprot.writeBool(struct.image_read);
      }
      if (struct.isSetImage_write()) {
        oprot.writeBool(struct.image_write);
      }
      if (struct.isSetImage_admin()) {
        oprot.writeBool(struct.image_admin);
      }
      if (struct.isSetImage_link()) {
        oprot.writeBool(struct.image_link);
      }
      if (struct.isSetLecture_read()) {
        oprot.writeBool(struct.lecture_read);
      }
      if (struct.isSetLecture_write()) {
        oprot.writeBool(struct.lecture_write);
      }
      if (struct.isSetLecture_admin()) {
        oprot.writeBool(struct.lecture_admin);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, Person struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(11);
      if (incoming.get(0)) {
        struct.userID = iprot.readString();
        struct.setUserIDIsSet(true);
      }
      if (incoming.get(1)) {
        struct.Nachname = iprot.readString();
        struct.setNachnameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.Vorname = iprot.readString();
        struct.setVornameIsSet(true);
      }
      if (incoming.get(3)) {
        struct.mail = iprot.readString();
        struct.setMailIsSet(true);
      }
      if (incoming.get(4)) {
        struct.image_read = iprot.readBool();
        struct.setImage_readIsSet(true);
      }
      if (incoming.get(5)) {
        struct.image_write = iprot.readBool();
        struct.setImage_writeIsSet(true);
      }
      if (incoming.get(6)) {
        struct.image_admin = iprot.readBool();
        struct.setImage_adminIsSet(true);
      }
      if (incoming.get(7)) {
        struct.image_link = iprot.readBool();
        struct.setImage_linkIsSet(true);
      }
      if (incoming.get(8)) {
        struct.lecture_read = iprot.readBool();
        struct.setLecture_readIsSet(true);
      }
      if (incoming.get(9)) {
        struct.lecture_write = iprot.readBool();
        struct.setLecture_writeIsSet(true);
      }
      if (incoming.get(10)) {
        struct.lecture_admin = iprot.readBool();
        struct.setLecture_adminIsSet(true);
      }
    }
  }

}