diff options
author | Simon Rettberg | 2016-01-13 19:08:10 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-01-13 19:08:10 +0100 |
commit | 378eaa8ad1d68b16c73c563ce31c076eeec26005 (patch) | |
tree | e565e927c4274d7b501eb28bb90d4fdddb56d717 /src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java | |
parent | Switch to thrift compiler 0.9.3 (diff) | |
download | master-sync-shared-378eaa8ad1d68b16c73c563ce31c076eeec26005.tar.gz master-sync-shared-378eaa8ad1d68b16c73c563ce31c076eeec26005.tar.xz master-sync-shared-378eaa8ad1d68b16c73c563ce31c076eeec26005.zip |
Thrift(SAT): Add lecture is private only field to lecture struct
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java | 109 |
1 files changed, 104 insertions, 5 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java index 9f29fa8..217e4f7 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-04") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-13") public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, LectureWrite._Fields>, java.io.Serializable, Cloneable, Comparable<LectureWrite> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureWrite"); @@ -55,6 +55,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu private static final org.apache.thrift.protocol.TField REM_ALLOWED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("remAllowedUsers", org.apache.thrift.protocol.TType.LIST, (short)16); private static final org.apache.thrift.protocol.TField LOCATION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("locationIds", org.apache.thrift.protocol.TType.LIST, (short)17); private static final org.apache.thrift.protocol.TField LIMIT_TO_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("limitToLocations", org.apache.thrift.protocol.TType.BOOL, (short)18); + private static final org.apache.thrift.protocol.TField LIMIT_TO_ALLOWED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("limitToAllowedUsers", org.apache.thrift.protocol.TType.BOOL, (short)19); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -79,6 +80,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu public List<String> remAllowedUsers; // optional public List<Integer> locationIds; // required public boolean limitToLocations; // required + public boolean limitToAllowedUsers; // 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 { @@ -98,7 +100,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu ADD_ALLOWED_USERS((short)11, "addAllowedUsers"), REM_ALLOWED_USERS((short)16, "remAllowedUsers"), LOCATION_IDS((short)17, "locationIds"), - LIMIT_TO_LOCATIONS((short)18, "limitToLocations"); + LIMIT_TO_LOCATIONS((short)18, "limitToLocations"), + LIMIT_TO_ALLOWED_USERS((short)19, "limitToAllowedUsers"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -147,6 +150,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return LOCATION_IDS; case 18: // LIMIT_TO_LOCATIONS return LIMIT_TO_LOCATIONS; + case 19: // LIMIT_TO_ALLOWED_USERS + return LIMIT_TO_ALLOWED_USERS; default: return null; } @@ -194,6 +199,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu private static final int __ISEXAM_ISSET_ID = 4; private static final int __HASINTERNETACCESS_ISSET_ID = 5; private static final int __LIMITTOLOCATIONS_ISSET_ID = 6; + private static final int __LIMITTOALLOWEDUSERS_ISSET_ID = 7; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.NETWORK_EXCEPTIONS,_Fields.ADD_ALLOWED_USERS,_Fields.REM_ALLOWED_USERS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; @@ -238,6 +244,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); tmpMap.put(_Fields.LIMIT_TO_LOCATIONS, new org.apache.thrift.meta_data.FieldMetaData("limitToLocations", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.LIMIT_TO_ALLOWED_USERS, new org.apache.thrift.meta_data.FieldMetaData("limitToAllowedUsers", 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(LectureWrite.class, metaDataMap); } @@ -259,7 +267,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu boolean hasInternetAccess, LecturePermissions defaultPermissions, List<Integer> locationIds, - boolean limitToLocations) + boolean limitToLocations, + boolean limitToAllowedUsers) { this(); this.lectureName = lectureName; @@ -283,6 +292,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu this.locationIds = locationIds; this.limitToLocations = limitToLocations; setLimitToLocationsIsSet(true); + this.limitToAllowedUsers = limitToAllowedUsers; + setLimitToAllowedUsersIsSet(true); } /** @@ -335,6 +346,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu this.locationIds = __this__locationIds; } this.limitToLocations = other.limitToLocations; + this.limitToAllowedUsers = other.limitToAllowedUsers; } public LectureWrite deepCopy() { @@ -367,6 +379,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu this.locationIds = null; setLimitToLocationsIsSet(false); this.limitToLocations = false; + setLimitToAllowedUsersIsSet(false); + this.limitToAllowedUsers = false; } public String getLectureName() { @@ -845,6 +859,29 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID, value); } + public boolean isLimitToAllowedUsers() { + return this.limitToAllowedUsers; + } + + public LectureWrite setLimitToAllowedUsers(boolean limitToAllowedUsers) { + this.limitToAllowedUsers = limitToAllowedUsers; + setLimitToAllowedUsersIsSet(true); + return this; + } + + public void unsetLimitToAllowedUsers() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID); + } + + /** Returns true if field limitToAllowedUsers is set (has been assigned a value) and false otherwise */ + public boolean isSetLimitToAllowedUsers() { + return EncodingUtils.testBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID); + } + + public void setLimitToAllowedUsersIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case LECTURE_NAME: @@ -983,6 +1020,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } break; + case LIMIT_TO_ALLOWED_USERS: + if (value == null) { + unsetLimitToAllowedUsers(); + } else { + setLimitToAllowedUsers((Boolean)value); + } + break; + } } @@ -1039,6 +1084,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu case LIMIT_TO_LOCATIONS: return isLimitToLocations(); + case LIMIT_TO_ALLOWED_USERS: + return isLimitToAllowedUsers(); + } throw new IllegalStateException(); } @@ -1084,6 +1132,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return isSetLocationIds(); case LIMIT_TO_LOCATIONS: return isSetLimitToLocations(); + case LIMIT_TO_ALLOWED_USERS: + return isSetLimitToAllowedUsers(); } throw new IllegalStateException(); } @@ -1254,6 +1304,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return false; } + boolean this_present_limitToAllowedUsers = true; + boolean that_present_limitToAllowedUsers = true; + if (this_present_limitToAllowedUsers || that_present_limitToAllowedUsers) { + if (!(this_present_limitToAllowedUsers && that_present_limitToAllowedUsers)) + return false; + if (this.limitToAllowedUsers != that.limitToAllowedUsers) + return false; + } + return true; } @@ -1346,6 +1405,11 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (present_limitToLocations) list.add(limitToLocations); + boolean present_limitToAllowedUsers = true; + list.add(present_limitToAllowedUsers); + if (present_limitToAllowedUsers) + list.add(limitToAllowedUsers); + return list.hashCode(); } @@ -1527,6 +1591,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return lastComparison; } } + lastComparison = Boolean.valueOf(isSetLimitToAllowedUsers()).compareTo(other.isSetLimitToAllowedUsers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLimitToAllowedUsers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limitToAllowedUsers, other.limitToAllowedUsers); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1660,6 +1734,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu sb.append("limitToLocations:"); sb.append(this.limitToLocations); first = false; + if (!first) sb.append(", "); + sb.append("limitToAllowedUsers:"); + sb.append(this.limitToAllowedUsers); + first = false; sb.append(")"); return sb.toString(); } @@ -1896,6 +1974,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 19: // LIMIT_TO_ALLOWED_USERS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.limitToAllowedUsers = iprot.readBool(); + struct.setLimitToAllowedUsersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2023,6 +2109,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeFieldBegin(LIMIT_TO_LOCATIONS_FIELD_DESC); oprot.writeBool(struct.limitToLocations); oprot.writeFieldEnd(); + oprot.writeFieldBegin(LIMIT_TO_ALLOWED_USERS_FIELD_DESC); + oprot.writeBool(struct.limitToAllowedUsers); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -2092,7 +2181,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetLimitToLocations()) { optionals.set(16); } - oprot.writeBitSet(optionals, 17); + if (struct.isSetLimitToAllowedUsers()) { + optionals.set(17); + } + oprot.writeBitSet(optionals, 18); if (struct.isSetLectureName()) { oprot.writeString(struct.lectureName); } @@ -2174,12 +2266,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetLimitToLocations()) { oprot.writeBool(struct.limitToLocations); } + if (struct.isSetLimitToAllowedUsers()) { + oprot.writeBool(struct.limitToAllowedUsers); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, LectureWrite struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(17); + BitSet incoming = iprot.readBitSet(18); if (incoming.get(0)) { struct.lectureName = iprot.readString(); struct.setLectureNameIsSet(true); @@ -2295,6 +2390,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu struct.limitToLocations = iprot.readBool(); struct.setLimitToLocationsIsSet(true); } + if (incoming.get(17)) { + struct.limitToAllowedUsers = iprot.readBool(); + struct.setLimitToAllowedUsersIsSet(true); + } } } |