diff options
| author | Simon Rettberg | 2014-07-23 12:03:55 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2014-07-23 12:03:55 +0200 |
| commit | e6d735edc68c77a543597116bf0a2ec5de6862f8 (patch) | |
| tree | 6a937ba3000cee256499e2780ecff8d1583b8981 /Dozentenmodulserver/src/main/java/server/Server.java | |
| parent | Removed old files (diff) | |
| parent | Erster Entwurf der Berechtigungsoberfläche (diff) | |
| download | tutor-module-e6d735edc68c77a543597116bf0a2ec5de6862f8.tar.gz tutor-module-e6d735edc68c77a543597116bf0a2ec5de6862f8.tar.xz tutor-module-e6d735edc68c77a543597116bf0a2ec5de6862f8.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tutor-module into maven
Conflicts:
Dozentenmodul/.classpath
Dozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class
Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class
Dozentenmodul/bin/gui/image/EditImageTechnisch_GUI.class
Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class
Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class
Dozentenmodul/bin/gui/intro/Login_GUI.class
Dozentenmodul/src/gui/lecture/ExtendedSearchForImages_GUI.java
Dozentenmodul/src/gui/lecture/ExtendedSearchForLectures_GUI.java
Dozentenmodul/src/main/java/gui/lecture/ExtendedSearchForImages_GUI.java
Dozentenmodulserver/bin/server/Server$getLectureData_args$getLectureData_argsTupleScheme.class
Dozentenmodulserver/bin/server/Server$getLectureData_result$_Fields.class
Dozentenmodulserver/bin/server/Server$getPersonData_args$_Fields.class
Dozentenmodulserver/bin/server/Server$getPersonData_result$_Fields.class
Dozentenmodulserver/bin/server/Server$startFileCopy_args$startFileCopy_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$startFileCopy_args.class
Dozentenmodulserver/bin/server/Server$startFileCopy_result$_Fields.class
Dozentenmodulserver/bin/server/Server$updateImageData_args.class
Dozentenmodulserver/bin/server/Server$updateImageData_result$_Fields.class
Dozentenmodulserver/bin/server/Server$updateImageData_result.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_args$writeLecturedata_argsTupleSchemeFactory.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_args.class
Dozentenmodulserver/bin/server/Server$writeLecturedata_result$_Fields.class
Dozentenmodulserver/bin/server/Server$writeVLdata_args.class
Dozentenmodulserver/bin/sql/SQL.class
Diffstat (limited to 'Dozentenmodulserver/src/main/java/server/Server.java')
| -rw-r--r-- | Dozentenmodulserver/src/main/java/server/Server.java | 909 |
1 files changed, 843 insertions, 66 deletions
diff --git a/Dozentenmodulserver/src/main/java/server/Server.java b/Dozentenmodulserver/src/main/java/server/Server.java index b652bf7a..8e36bd49 100644 --- a/Dozentenmodulserver/src/main/java/server/Server.java +++ b/Dozentenmodulserver/src/main/java/server/Server.java @@ -50,6 +50,8 @@ public class Server { public List<String> getAllOS() throws org.apache.thrift.TException; + public List<String> getAllUniversities() throws org.apache.thrift.TException; + public Map<String,String> getPersonData(String Vorname, String Nachname) throws org.apache.thrift.TException; public boolean writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak) throws org.apache.thrift.TException; @@ -90,6 +92,8 @@ public class Server { public void getAllOS(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getAllUniversities(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getPersonData(String Vorname, String Nachname, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String login, String firstname, String lastname, String university, String Mail, String Tel, String Fak, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -307,6 +311,28 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOS failed: unknown result"); } + public List<String> getAllUniversities() throws org.apache.thrift.TException + { + send_getAllUniversities(); + return recv_getAllUniversities(); + } + + public void send_getAllUniversities() throws org.apache.thrift.TException + { + getAllUniversities_args args = new getAllUniversities_args(); + sendBase("getAllUniversities", args); + } + + public List<String> recv_getAllUniversities() throws org.apache.thrift.TException + { + getAllUniversities_result result = new getAllUniversities_result(); + receiveBase(result, "getAllUniversities"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUniversities failed: unknown result"); + } + public Map<String,String> getPersonData(String Vorname, String Nachname) throws org.apache.thrift.TException { send_getPersonData(Vorname, Nachname); @@ -883,6 +909,35 @@ public class Server { } } + public void getAllUniversities(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getAllUniversities_call method_call = new getAllUniversities_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getAllUniversities_call extends org.apache.thrift.async.TAsyncMethodCall { + public getAllUniversities_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUniversities", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getAllUniversities_args args = new getAllUniversities_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List<String> getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getAllUniversities(); + } + } + public void getPersonData(String Vorname, String Nachname, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getPersonData_call method_call = new getPersonData_call(Vorname, Nachname, resultHandler, this, ___protocolFactory, ___transport); @@ -1390,6 +1445,7 @@ public class Server { processMap.put("getImageList", new getImageList()); processMap.put("getLectureList", new getLectureList()); processMap.put("getAllOS", new getAllOS()); + processMap.put("getAllUniversities", new getAllUniversities()); processMap.put("getPersonData", new getPersonData()); processMap.put("writeLecturedata", new writeLecturedata()); processMap.put("startFileCopy", new startFileCopy()); @@ -1546,6 +1602,26 @@ public class Server { } } + public static class getAllUniversities<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUniversities_args> { + public getAllUniversities() { + super("getAllUniversities"); + } + + public getAllUniversities_args getEmptyArgsInstance() { + return new getAllUniversities_args(); + } + + protected boolean isOneway() { + return false; + } + + public getAllUniversities_result getResult(I iface, getAllUniversities_args args) throws org.apache.thrift.TException { + getAllUniversities_result result = new getAllUniversities_result(); + result.success = iface.getAllUniversities(); + return result; + } + } + public static class getPersonData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPersonData_args> { public getPersonData() { super("getPersonData"); @@ -1794,6 +1870,7 @@ public class Server { processMap.put("getImageList", new getImageList()); processMap.put("getLectureList", new getLectureList()); processMap.put("getAllOS", new getAllOS()); + processMap.put("getAllUniversities", new getAllUniversities()); processMap.put("getPersonData", new getPersonData()); processMap.put("writeLecturedata", new writeLecturedata()); processMap.put("startFileCopy", new startFileCopy()); @@ -2167,6 +2244,57 @@ public class Server { } } + public static class getAllUniversities<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUniversities_args, List<String>> { + public getAllUniversities() { + super("getAllUniversities"); + } + + public getAllUniversities_args getEmptyArgsInstance() { + return new getAllUniversities_args(); + } + + public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<List<String>>() { + public void onComplete(List<String> o) { + getAllUniversities_result result = new getAllUniversities_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getAllUniversities_result result = new getAllUniversities_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getAllUniversities_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { + iface.getAllUniversities(resultHandler); + } + } + public static class getPersonData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPersonData_args, Map<String,String>> { public getPersonData() { super("getPersonData"); @@ -8986,6 +9114,655 @@ public class Server { } + public static class getAllUniversities_args implements org.apache.thrift.TBase<getAllUniversities_args, getAllUniversities_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUniversities_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUniversities_args"); + + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllUniversities_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllUniversities_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + 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) { + 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; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUniversities_args.class, metaDataMap); + } + + public getAllUniversities_args() { + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getAllUniversities_args(getAllUniversities_args other) { + } + + public getAllUniversities_args deepCopy() { + return new getAllUniversities_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + 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) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllUniversities_args) + return this.equals((getAllUniversities_args)that); + return false; + } + + public boolean equals(getAllUniversities_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getAllUniversities_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + 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("getAllUniversities_args("); + boolean first = true; + + 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 { + 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 getAllUniversities_argsStandardSchemeFactory implements SchemeFactory { + public getAllUniversities_argsStandardScheme getScheme() { + return new getAllUniversities_argsStandardScheme(); + } + } + + private static class getAllUniversities_argsStandardScheme extends StandardScheme<getAllUniversities_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllUniversities_args 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) { + 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, getAllUniversities_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAllUniversities_argsTupleSchemeFactory implements SchemeFactory { + public getAllUniversities_argsTupleScheme getScheme() { + return new getAllUniversities_argsTupleScheme(); + } + } + + private static class getAllUniversities_argsTupleScheme extends TupleScheme<getAllUniversities_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAllUniversities_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAllUniversities_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getAllUniversities_result implements org.apache.thrift.TBase<getAllUniversities_result, getAllUniversities_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUniversities_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUniversities_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllUniversities_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllUniversities_resultTupleSchemeFactory()); + } + + public List<String> success; // 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 { + SUCCESS((short)0, "success"); + + 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 0: // SUCCESS + return SUCCESS; + 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 + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUniversities_result.class, metaDataMap); + } + + public getAllUniversities_result() { + } + + public getAllUniversities_result( + List<String> success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getAllUniversities_result(getAllUniversities_result other) { + if (other.isSetSuccess()) { + List<String> __this__success = new ArrayList<String>(other.success); + this.success = __this__success; + } + } + + public getAllUniversities_result deepCopy() { + return new getAllUniversities_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator<String> getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList<String>(); + } + this.success.add(elem); + } + + public List<String> getSuccess() { + return this.success; + } + + public getAllUniversities_result setSuccess(List<String> success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List<String>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + 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 SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllUniversities_result) + return this.equals((getAllUniversities_result)that); + return false; + } + + public boolean equals(getAllUniversities_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getAllUniversities_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + 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("getAllUniversities_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + 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 { + 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 getAllUniversities_resultStandardSchemeFactory implements SchemeFactory { + public getAllUniversities_resultStandardScheme getScheme() { + return new getAllUniversities_resultStandardScheme(); + } + } + + private static class getAllUniversities_resultStandardScheme extends StandardScheme<getAllUniversities_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllUniversities_result 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 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list24 = iprot.readListBegin(); + struct.success = new ArrayList<String>(_list24.size); + for (int _i25 = 0; _i25 < _list24.size; ++_i25) + { + String _elem26; + _elem26 = iprot.readString(); + struct.success.add(_elem26); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(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, getAllUniversities_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter27 : struct.success) + { + oprot.writeString(_iter27); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAllUniversities_resultTupleSchemeFactory implements SchemeFactory { + public getAllUniversities_resultTupleScheme getScheme() { + return new getAllUniversities_resultTupleScheme(); + } + } + + private static class getAllUniversities_resultTupleScheme extends TupleScheme<getAllUniversities_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAllUniversities_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter28 : struct.success) + { + oprot.writeString(_iter28); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAllUniversities_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList<String>(_list29.size); + for (int _i30 = 0; _i30 < _list29.size; ++_i30) + { + String _elem31; + _elem31 = iprot.readString(); + struct.success.add(_elem31); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + public static class getPersonData_args implements org.apache.thrift.TBase<getPersonData_args, getPersonData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPersonData_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPersonData_args"); @@ -9743,15 +10520,15 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin(); - struct.success = new HashMap<String,String>(2*_map24.size); - for (int _i25 = 0; _i25 < _map24.size; ++_i25) + org.apache.thrift.protocol.TMap _map32 = iprot.readMapBegin(); + struct.success = new HashMap<String,String>(2*_map32.size); + for (int _i33 = 0; _i33 < _map32.size; ++_i33) { - String _key26; - String _val27; - _key26 = iprot.readString(); - _val27 = iprot.readString(); - struct.success.put(_key26, _val27); + String _key34; + String _val35; + _key34 = iprot.readString(); + _val35 = iprot.readString(); + struct.success.put(_key34, _val35); } iprot.readMapEnd(); } @@ -9779,10 +10556,10 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (Map.Entry<String, String> _iter28 : struct.success.entrySet()) + for (Map.Entry<String, String> _iter36 : struct.success.entrySet()) { - oprot.writeString(_iter28.getKey()); - oprot.writeString(_iter28.getValue()); + oprot.writeString(_iter36.getKey()); + oprot.writeString(_iter36.getValue()); } oprot.writeMapEnd(); } @@ -9813,10 +10590,10 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry<String, String> _iter29 : struct.success.entrySet()) + for (Map.Entry<String, String> _iter37 : struct.success.entrySet()) { - oprot.writeString(_iter29.getKey()); - oprot.writeString(_iter29.getValue()); + oprot.writeString(_iter37.getKey()); + oprot.writeString(_iter37.getValue()); } } } @@ -9828,15 +10605,15 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map30 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new HashMap<String,String>(2*_map30.size); - for (int _i31 = 0; _i31 < _map30.size; ++_i31) + org.apache.thrift.protocol.TMap _map38 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new HashMap<String,String>(2*_map38.size); + for (int _i39 = 0; _i39 < _map38.size; ++_i39) { - String _key32; - String _val33; - _key32 = iprot.readString(); - _val33 = iprot.readString(); - struct.success.put(_key32, _val33); + String _key40; + String _val41; + _key40 = iprot.readString(); + _val41 = iprot.readString(); + struct.success.put(_key40, _val41); } } struct.setSuccessIsSet(true); @@ -13317,15 +14094,15 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map34 = iprot.readMapBegin(); - struct.success = new HashMap<String,String>(2*_map34.size); - for (int _i35 = 0; _i35 < _map34.size; ++_i35) + org.apache.thrift.protocol.TMap _map42 = iprot.readMapBegin(); + struct.success = new HashMap<String,String>(2*_map42.size); + for (int _i43 = 0; _i43 < _map42.size; ++_i43) { - String _key36; - String _val37; - _key36 = iprot.readString(); - _val37 = iprot.readString(); - struct.success.put(_key36, _val37); + String _key44; + String _val45; + _key44 = iprot.readString(); + _val45 = iprot.readString(); + struct.success.put(_key44, _val45); } iprot.readMapEnd(); } @@ -13353,10 +14130,10 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (Map.Entry<String, String> _iter38 : struct.success.entrySet()) + for (Map.Entry<String, String> _iter46 : struct.success.entrySet()) { - oprot.writeString(_iter38.getKey()); - oprot.writeString(_iter38.getValue()); + oprot.writeString(_iter46.getKey()); + oprot.writeString(_iter46.getValue()); } oprot.writeMapEnd(); } @@ -13387,10 +14164,10 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry<String, String> _iter39 : struct.success.entrySet()) + for (Map.Entry<String, String> _iter47 : struct.success.entrySet()) { - oprot.writeString(_iter39.getKey()); - oprot.writeString(_iter39.getValue()); + oprot.writeString(_iter47.getKey()); + oprot.writeString(_iter47.getValue()); } } } @@ -13402,15 +14179,15 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new HashMap<String,String>(2*_map40.size); - for (int _i41 = 0; _i41 < _map40.size; ++_i41) + org.apache.thrift.protocol.TMap _map48 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new HashMap<String,String>(2*_map48.size); + for (int _i49 = 0; _i49 < _map48.size; ++_i49) { - String _key42; - String _val43; - _key42 = iprot.readString(); - _val43 = iprot.readString(); - struct.success.put(_key42, _val43); + String _key50; + String _val51; + _key50 = iprot.readString(); + _val51 = iprot.readString(); + struct.success.put(_key50, _val51); } } struct.setSuccessIsSet(true); @@ -15847,15 +16624,15 @@ public class Server { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map44 = iprot.readMapBegin(); - struct.success = new HashMap<String,String>(2*_map44.size); - for (int _i45 = 0; _i45 < _map44.size; ++_i45) + org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin(); + struct.success = new HashMap<String,String>(2*_map52.size); + for (int _i53 = 0; _i53 < _map52.size; ++_i53) { - String _key46; - String _val47; - _key46 = iprot.readString(); - _val47 = iprot.readString(); - struct.success.put(_key46, _val47); + String _key54; + String _val55; + _key54 = iprot.readString(); + _val55 = iprot.readString(); + struct.success.put(_key54, _val55); } iprot.readMapEnd(); } @@ -15883,10 +16660,10 @@ public class Server { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (Map.Entry<String, String> _iter48 : struct.success.entrySet()) + for (Map.Entry<String, String> _iter56 : struct.success.entrySet()) { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); + oprot.writeString(_iter56.getKey()); + oprot.writeString(_iter56.getValue()); } oprot.writeMapEnd(); } @@ -15917,10 +16694,10 @@ public class Server { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry<String, String> _iter49 : struct.success.entrySet()) + for (Map.Entry<String, String> _iter57 : struct.success.entrySet()) { - oprot.writeString(_iter49.getKey()); - oprot.writeString(_iter49.getValue()); + oprot.writeString(_iter57.getKey()); + oprot.writeString(_iter57.getValue()); } } } @@ -15932,15 +16709,15 @@ public class Server { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map50 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new HashMap<String,String>(2*_map50.size); - for (int _i51 = 0; _i51 < _map50.size; ++_i51) + org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new HashMap<String,String>(2*_map58.size); + for (int _i59 = 0; _i59 < _map58.size; ++_i59) { - String _key52; - String _val53; - _key52 = iprot.readString(); - _val53 = iprot.readString(); - struct.success.put(_key52, _val53); + String _key60; + String _val61; + _key60 = iprot.readString(); + _val61 = iprot.readString(); + struct.success.put(_key60, _val61); } } struct.setSuccessIsSet(true); |
