diff options
author | Jonathan Bauer | 2016-01-18 17:44:47 +0100 |
---|---|---|
committer | Jonathan Bauer | 2016-01-18 17:44:47 +0100 |
commit | b4d75b70c37c076661632300363354ca9800e021 (patch) | |
tree | a0220cc3c6d695a7099a964f230f6f23cfff6959 /src/main/java/org/openslx/bwlp/thrift/iface/Location.java | |
parent | Thrift(SAT): Add lecture is private only field to lecture struct (diff) | |
download | master-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/Location.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/Location.java | 109 |
1 files changed, 104 insertions, 5 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Location.java b/src/main/java/org/openslx/bwlp/thrift/iface/Location.java index 14d0b82..005389b 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/Location.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/Location.java @@ -34,12 +34,13 @@ 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 Location implements org.apache.thrift.TBase<Location, Location._Fields>, java.io.Serializable, Cloneable, Comparable<Location> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Location"); private static final org.apache.thrift.protocol.TField LOCATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("locationId", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField LOCATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("locationName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PARENT_LOCATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentLocationId", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -49,11 +50,13 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie public int locationId; // required public String locationName; // required + public int parentLocationId; // 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 { LOCATION_ID((short)1, "locationId"), - LOCATION_NAME((short)2, "locationName"); + LOCATION_NAME((short)2, "locationName"), + PARENT_LOCATION_ID((short)3, "parentLocationId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -72,6 +75,8 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie return LOCATION_ID; case 2: // LOCATION_NAME return LOCATION_NAME; + case 3: // PARENT_LOCATION_ID + return PARENT_LOCATION_ID; default: return null; } @@ -113,6 +118,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie // isset id assignments private static final int __LOCATIONID_ISSET_ID = 0; + private static final int __PARENTLOCATIONID_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { @@ -121,6 +127,8 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.LOCATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("locationName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARENT_LOCATION_ID, new org.apache.thrift.meta_data.FieldMetaData("parentLocationId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Location.class, metaDataMap); } @@ -130,12 +138,15 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie public Location( int locationId, - String locationName) + String locationName, + int parentLocationId) { this(); this.locationId = locationId; setLocationIdIsSet(true); this.locationName = locationName; + this.parentLocationId = parentLocationId; + setParentLocationIdIsSet(true); } /** @@ -147,6 +158,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie if (other.isSetLocationName()) { this.locationName = other.locationName; } + this.parentLocationId = other.parentLocationId; } public Location deepCopy() { @@ -158,6 +170,8 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie setLocationIdIsSet(false); this.locationId = 0; this.locationName = null; + setParentLocationIdIsSet(false); + this.parentLocationId = 0; } public int getLocationId() { @@ -207,6 +221,29 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie } } + public int getParentLocationId() { + return this.parentLocationId; + } + + public Location setParentLocationId(int parentLocationId) { + this.parentLocationId = parentLocationId; + setParentLocationIdIsSet(true); + return this; + } + + public void unsetParentLocationId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID); + } + + /** Returns true if field parentLocationId is set (has been assigned a value) and false otherwise */ + public boolean isSetParentLocationId() { + return EncodingUtils.testBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID); + } + + public void setParentLocationIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case LOCATION_ID: @@ -225,6 +262,14 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie } break; + case PARENT_LOCATION_ID: + if (value == null) { + unsetParentLocationId(); + } else { + setParentLocationId((Integer)value); + } + break; + } } @@ -236,6 +281,9 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie case LOCATION_NAME: return getLocationName(); + case PARENT_LOCATION_ID: + return getParentLocationId(); + } throw new IllegalStateException(); } @@ -251,6 +299,8 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie return isSetLocationId(); case LOCATION_NAME: return isSetLocationName(); + case PARENT_LOCATION_ID: + return isSetParentLocationId(); } throw new IllegalStateException(); } @@ -286,6 +336,15 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie return false; } + boolean this_present_parentLocationId = true; + boolean that_present_parentLocationId = true; + if (this_present_parentLocationId || that_present_parentLocationId) { + if (!(this_present_parentLocationId && that_present_parentLocationId)) + return false; + if (this.parentLocationId != that.parentLocationId) + return false; + } + return true; } @@ -303,6 +362,11 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie if (present_locationName) list.add(locationName); + boolean present_parentLocationId = true; + list.add(present_parentLocationId); + if (present_parentLocationId) + list.add(parentLocationId); + return list.hashCode(); } @@ -334,6 +398,16 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie return lastComparison; } } + lastComparison = Boolean.valueOf(isSetParentLocationId()).compareTo(other.isSetParentLocationId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParentLocationId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentLocationId, other.parentLocationId); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -365,6 +439,10 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie sb.append(this.locationName); } first = false; + if (!first) sb.append(", "); + sb.append("parentLocationId:"); + sb.append(this.parentLocationId); + first = false; sb.append(")"); return sb.toString(); } @@ -426,6 +504,14 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 3: // PARENT_LOCATION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.parentLocationId = iprot.readI32(); + struct.setParentLocationIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -449,6 +535,9 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie oprot.writeString(struct.locationName); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(PARENT_LOCATION_ID_FIELD_DESC); + oprot.writeI32(struct.parentLocationId); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -473,19 +562,25 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie if (struct.isSetLocationName()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetParentLocationId()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetLocationId()) { oprot.writeI32(struct.locationId); } if (struct.isSetLocationName()) { oprot.writeString(struct.locationName); } + if (struct.isSetParentLocationId()) { + oprot.writeI32(struct.parentLocationId); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, Location struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.locationId = iprot.readI32(); struct.setLocationIdIsSet(true); @@ -494,6 +589,10 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie struct.locationName = iprot.readString(); struct.setLocationNameIsSet(true); } + if (incoming.get(2)) { + struct.parentLocationId = iprot.readI32(); + struct.setParentLocationIdIsSet(true); + } } } |