summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
diff options
context:
space:
mode:
authorJonathan Bauer2016-01-18 17:44:47 +0100
committerJonathan Bauer2016-01-18 17:44:47 +0100
commitb4d75b70c37c076661632300363354ca9800e021 (patch)
treea0220cc3c6d695a7099a964f230f6f23cfff6959 /src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
parentThrift(SAT): Add lecture is private only field to lecture struct (diff)
downloadmaster-sync-shared-b4d75b70c37c076661632300363354ca9800e021.tar.gz
master-sync-shared-b4d75b70c37c076661632300363354ca9800e021.tar.xz
master-sync-shared-b4d75b70c37c076661632300363354ca9800e021.zip
RPC update
added limitToLocations/limitToAllowedUsers to LectureRead added parentLocationId to Location struct
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java')
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java208
1 files changed, 203 insertions, 5 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
index 0fddbff..2d872f9 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.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-18")
public class LectureRead implements org.apache.thrift.TBase<LectureRead, LectureRead._Fields>, java.io.Serializable, Cloneable, Comparable<LectureRead> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureRead");
@@ -62,6 +62,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)19);
private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)22);
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)25);
+ 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)26);
+ 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)27);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -93,6 +95,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
public LecturePermissions defaultPermissions; // required
public LecturePermissions userPermissions; // 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 {
@@ -119,7 +123,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
HAS_INTERNET_ACCESS((short)18, "hasInternetAccess"),
DEFAULT_PERMISSIONS((short)19, "defaultPermissions"),
USER_PERMISSIONS((short)22, "userPermissions"),
- LOCATION_IDS((short)25, "locationIds");
+ LOCATION_IDS((short)25, "locationIds"),
+ LIMIT_TO_LOCATIONS((short)26, "limitToLocations"),
+ LIMIT_TO_ALLOWED_USERS((short)27, "limitToAllowedUsers");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -182,6 +188,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return USER_PERMISSIONS;
case 25: // LOCATION_IDS
return LOCATION_IDS;
+ case 26: // LIMIT_TO_LOCATIONS
+ return LIMIT_TO_LOCATIONS;
+ case 27: // LIMIT_TO_ALLOWED_USERS
+ return LIMIT_TO_ALLOWED_USERS;
default:
return null;
}
@@ -232,6 +242,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
private static final int __UPDATETIME_ISSET_ID = 7;
private static final int __ISEXAM_ISSET_ID = 8;
private static final int __HASINTERNETACCESS_ISSET_ID = 9;
+ private static final int __LIMITTOLOCATIONS_ISSET_ID = 10;
+ private static final int __LIMITTOALLOWEDUSERS_ISSET_ID = 11;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
@@ -289,6 +301,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
tmpMap.put(_Fields.LOCATION_IDS, new org.apache.thrift.meta_data.FieldMetaData("locationIds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
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(LectureRead.class, metaDataMap);
}
@@ -319,7 +335,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
boolean isExam,
boolean hasInternetAccess,
LecturePermissions defaultPermissions,
- List<Integer> locationIds)
+ List<Integer> locationIds,
+ boolean limitToLocations,
+ boolean limitToAllowedUsers)
{
this();
this.lectureId = lectureId;
@@ -355,6 +373,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
setHasInternetAccessIsSet(true);
this.defaultPermissions = defaultPermissions;
this.locationIds = locationIds;
+ this.limitToLocations = limitToLocations;
+ setLimitToLocationsIsSet(true);
+ this.limitToAllowedUsers = limitToAllowedUsers;
+ setLimitToAllowedUsersIsSet(true);
}
/**
@@ -421,6 +443,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
List<Integer> __this__locationIds = new ArrayList<Integer>(other.locationIds);
this.locationIds = __this__locationIds;
}
+ this.limitToLocations = other.limitToLocations;
+ this.limitToAllowedUsers = other.limitToAllowedUsers;
}
public LectureRead deepCopy() {
@@ -463,6 +487,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
this.defaultPermissions = null;
this.userPermissions = null;
this.locationIds = null;
+ setLimitToLocationsIsSet(false);
+ this.limitToLocations = false;
+ setLimitToAllowedUsersIsSet(false);
+ this.limitToAllowedUsers = false;
}
public String getLectureId() {
@@ -1091,6 +1119,52 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
+ public boolean isLimitToLocations() {
+ return this.limitToLocations;
+ }
+
+ public LectureRead setLimitToLocations(boolean limitToLocations) {
+ this.limitToLocations = limitToLocations;
+ setLimitToLocationsIsSet(true);
+ return this;
+ }
+
+ public void unsetLimitToLocations() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
+ }
+
+ /** Returns true if field limitToLocations is set (has been assigned a value) and false otherwise */
+ public boolean isSetLimitToLocations() {
+ return EncodingUtils.testBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
+ }
+
+ public void setLimitToLocationsIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID, value);
+ }
+
+ public boolean isLimitToAllowedUsers() {
+ return this.limitToAllowedUsers;
+ }
+
+ public LectureRead 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_ID:
@@ -1285,6 +1359,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
break;
+ case LIMIT_TO_LOCATIONS:
+ if (value == null) {
+ unsetLimitToLocations();
+ } else {
+ setLimitToLocations((Boolean)value);
+ }
+ break;
+
+ case LIMIT_TO_ALLOWED_USERS:
+ if (value == null) {
+ unsetLimitToAllowedUsers();
+ } else {
+ setLimitToAllowedUsers((Boolean)value);
+ }
+ break;
+
}
}
@@ -1362,6 +1452,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case LOCATION_IDS:
return getLocationIds();
+ case LIMIT_TO_LOCATIONS:
+ return isLimitToLocations();
+
+ case LIMIT_TO_ALLOWED_USERS:
+ return isLimitToAllowedUsers();
+
}
throw new IllegalStateException();
}
@@ -1421,6 +1517,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return isSetUserPermissions();
case LOCATION_IDS:
return isSetLocationIds();
+ case LIMIT_TO_LOCATIONS:
+ return isSetLimitToLocations();
+ case LIMIT_TO_ALLOWED_USERS:
+ return isSetLimitToAllowedUsers();
}
throw new IllegalStateException();
}
@@ -1654,6 +1754,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return false;
}
+ boolean this_present_limitToLocations = true;
+ boolean that_present_limitToLocations = true;
+ if (this_present_limitToLocations || that_present_limitToLocations) {
+ if (!(this_present_limitToLocations && that_present_limitToLocations))
+ return false;
+ if (this.limitToLocations != that.limitToLocations)
+ 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;
}
@@ -1781,6 +1899,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (present_locationIds)
list.add(locationIds);
+ boolean present_limitToLocations = true;
+ list.add(present_limitToLocations);
+ if (present_limitToLocations)
+ list.add(limitToLocations);
+
+ boolean present_limitToAllowedUsers = true;
+ list.add(present_limitToAllowedUsers);
+ if (present_limitToAllowedUsers)
+ list.add(limitToAllowedUsers);
+
return list.hashCode();
}
@@ -2032,6 +2160,26 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetLimitToLocations()).compareTo(other.isSetLimitToLocations());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLimitToLocations()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limitToLocations, other.limitToLocations);
+ if (lastComparison != 0) {
+ 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;
}
@@ -2205,6 +2353,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
sb.append(this.locationIds);
}
first = false;
+ if (!first) sb.append(", ");
+ 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();
}
@@ -2491,6 +2647,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 26: // LIMIT_TO_LOCATIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.limitToLocations = iprot.readBool();
+ struct.setLimitToLocationsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 27: // 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);
}
@@ -2636,6 +2808,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
oprot.writeFieldEnd();
}
+ 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();
}
@@ -2726,7 +2904,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (struct.isSetLocationIds()) {
optionals.set(23);
}
- oprot.writeBitSet(optionals, 24);
+ if (struct.isSetLimitToLocations()) {
+ optionals.set(24);
+ }
+ if (struct.isSetLimitToAllowedUsers()) {
+ optionals.set(25);
+ }
+ oprot.writeBitSet(optionals, 26);
if (struct.isSetLectureId()) {
oprot.writeString(struct.lectureId);
}
@@ -2823,12 +3007,18 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
}
+ if (struct.isSetLimitToLocations()) {
+ oprot.writeBool(struct.limitToLocations);
+ }
+ if (struct.isSetLimitToAllowedUsers()) {
+ oprot.writeBool(struct.limitToAllowedUsers);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LectureRead struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(24);
+ BitSet incoming = iprot.readBitSet(26);
if (incoming.get(0)) {
struct.lectureId = iprot.readString();
struct.setLectureIdIsSet(true);
@@ -2964,6 +3154,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
struct.setLocationIdsIsSet(true);
}
+ if (incoming.get(24)) {
+ struct.limitToLocations = iprot.readBool();
+ struct.setLimitToLocationsIsSet(true);
+ }
+ if (incoming.get(25)) {
+ struct.limitToAllowedUsers = iprot.readBool();
+ struct.setLimitToAllowedUsersIsSet(true);
+ }
}
}