diff options
| author | unknown | 2014-02-25 11:04:51 +0100 |
|---|---|---|
| committer | unknown | 2014-02-25 11:04:51 +0100 |
| commit | 2a3ec0fbda66ed07adcdc968a9365096ecd54f40 (patch) | |
| tree | 187af202e5a404a15c31f0915e73cb23bf5b7900 /Dozentenmodulserver/src/server/Image.java | |
| parent | Problem der herumspringenden Fenster entfernt (diff) | |
| download | tutor-module-2a3ec0fbda66ed07adcdc968a9365096ecd54f40.tar.gz tutor-module-2a3ec0fbda66ed07adcdc968a9365096ecd54f40.tar.xz tutor-module-2a3ec0fbda66ed07adcdc968a9365096ecd54f40.zip | |
Kommunikation von BwLehrpool Suite zu BwLehrpool Suite Server läuft nun über Thrift
Diffstat (limited to 'Dozentenmodulserver/src/server/Image.java')
| -rw-r--r-- | Dozentenmodulserver/src/server/Image.java | 880 |
1 files changed, 880 insertions, 0 deletions
diff --git a/Dozentenmodulserver/src/server/Image.java b/Dozentenmodulserver/src/server/Image.java new file mode 100644 index 00000000..e142b86e --- /dev/null +++ b/Dozentenmodulserver/src/server/Image.java @@ -0,0 +1,880 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package server; +import java.util.BitSet; +import java.util.Collections; +import java.util.EnumMap; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; +import org.apache.thrift.scheme.TupleScheme; + +@SuppressWarnings("serial") +public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, java.io.Serializable, Cloneable, Comparable<Image> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Image"); + + private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)-1); + private static final org.apache.thrift.protocol.TField LICENSE_RESTRICTION_FIELD_DESC = new org.apache.thrift.protocol.TField("licenseRestriction", org.apache.thrift.protocol.TType.STRING, (short)-2); + private static final org.apache.thrift.protocol.TField OS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("osName", org.apache.thrift.protocol.TType.STRING, (short)-3); + private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)-4); + private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.STRING, (short)-5); + private static final org.apache.thrift.protocol.TField USER_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("userData", org.apache.thrift.protocol.TType.STRING, (short)-6); + + @SuppressWarnings("rawtypes") +private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ImageStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ImageTupleSchemeFactory()); + } + + public String imageName; // required + public String licenseRestriction; // required + public String osName; // required + public String lectureName; // required + public String updateTime; // required + public String userData; // 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 { + IMAGE_NAME((short)-1, "imageName"), + LICENSE_RESTRICTION((short)-2, "licenseRestriction"), + OS_NAME((short)-3, "osName"), + LECTURE_NAME((short)-4, "lectureName"), + UPDATE_TIME((short)-5, "updateTime"), + USER_DATA((short)-6, "userData"); + + 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: // IMAGE_NAME + return IMAGE_NAME; + case -2: // LICENSE_RESTRICTION + return LICENSE_RESTRICTION; + case -3: // OS_NAME + return OS_NAME; + case -4: // LECTURE_NAME + return LECTURE_NAME; + case -5: // UPDATE_TIME + return UPDATE_TIME; + case -6: // USER_DATA + return USER_DATA; + 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.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LICENSE_RESTRICTION, new org.apache.thrift.meta_data.FieldMetaData("licenseRestriction", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OS_NAME, new org.apache.thrift.meta_data.FieldMetaData("osName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.USER_DATA, new org.apache.thrift.meta_data.FieldMetaData("userData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Image.class, metaDataMap); + } + + public Image() { + } + + public Image( + String imageName, + String licenseRestriction, + String osName, + String lectureName, + String updateTime, + String userData) + { + this(); + this.imageName = imageName; + this.licenseRestriction = licenseRestriction; + this.osName = osName; + this.lectureName = lectureName; + this.updateTime = updateTime; + this.userData = userData; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public Image(Image other) { + if (other.isSetImageName()) { + this.imageName = other.imageName; + } + if (other.isSetLicenseRestriction()) { + this.licenseRestriction = other.licenseRestriction; + } + if (other.isSetOsName()) { + this.osName = other.osName; + } + if (other.isSetLectureName()) { + this.lectureName = other.lectureName; + } + if (other.isSetUpdateTime()) { + this.updateTime = other.updateTime; + } + if (other.isSetUserData()) { + this.userData = other.userData; + } + } + + public Image deepCopy() { + return new Image(this); + } + + @Override + public void clear() { + this.imageName = null; + this.licenseRestriction = null; + this.osName = null; + this.lectureName = null; + this.updateTime = null; + this.userData = null; + } + + public String getImageName() { + return this.imageName; + } + + public Image setImageName(String imageName) { + this.imageName = imageName; + return this; + } + + public void unsetImageName() { + this.imageName = null; + } + + /** Returns true if field imageName is set (has been assigned a value) and false otherwise */ + public boolean isSetImageName() { + return this.imageName != null; + } + + public void setImageNameIsSet(boolean value) { + if (!value) { + this.imageName = null; + } + } + + public String getLicenseRestriction() { + return this.licenseRestriction; + } + + public Image setLicenseRestriction(String licenseRestriction) { + this.licenseRestriction = licenseRestriction; + return this; + } + + public void unsetLicenseRestriction() { + this.licenseRestriction = null; + } + + /** Returns true if field licenseRestriction is set (has been assigned a value) and false otherwise */ + public boolean isSetLicenseRestriction() { + return this.licenseRestriction != null; + } + + public void setLicenseRestrictionIsSet(boolean value) { + if (!value) { + this.licenseRestriction = null; + } + } + + public String getOsName() { + return this.osName; + } + + public Image setOsName(String osName) { + this.osName = osName; + return this; + } + + public void unsetOsName() { + this.osName = null; + } + + /** Returns true if field osName is set (has been assigned a value) and false otherwise */ + public boolean isSetOsName() { + return this.osName != null; + } + + public void setOsNameIsSet(boolean value) { + if (!value) { + this.osName = null; + } + } + + public String getLectureName() { + return this.lectureName; + } + + public Image setLectureName(String lectureName) { + this.lectureName = lectureName; + return this; + } + + public void unsetLectureName() { + this.lectureName = null; + } + + /** Returns true if field lectureName is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureName() { + return this.lectureName != null; + } + + public void setLectureNameIsSet(boolean value) { + if (!value) { + this.lectureName = null; + } + } + + public String getUpdateTime() { + return this.updateTime; + } + + public Image setUpdateTime(String updateTime) { + this.updateTime = updateTime; + return this; + } + + public void unsetUpdateTime() { + this.updateTime = null; + } + + /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */ + public boolean isSetUpdateTime() { + return this.updateTime != null; + } + + public void setUpdateTimeIsSet(boolean value) { + if (!value) { + this.updateTime = null; + } + } + + public String getUserData() { + return this.userData; + } + + public Image setUserData(String userData) { + this.userData = userData; + return this; + } + + public void unsetUserData() { + this.userData = null; + } + + /** Returns true if field userData is set (has been assigned a value) and false otherwise */ + public boolean isSetUserData() { + return this.userData != null; + } + + public void setUserDataIsSet(boolean value) { + if (!value) { + this.userData = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IMAGE_NAME: + if (value == null) { + unsetImageName(); + } else { + setImageName((String)value); + } + break; + + case LICENSE_RESTRICTION: + if (value == null) { + unsetLicenseRestriction(); + } else { + setLicenseRestriction((String)value); + } + break; + + case OS_NAME: + if (value == null) { + unsetOsName(); + } else { + setOsName((String)value); + } + break; + + case LECTURE_NAME: + if (value == null) { + unsetLectureName(); + } else { + setLectureName((String)value); + } + break; + + case UPDATE_TIME: + if (value == null) { + unsetUpdateTime(); + } else { + setUpdateTime((String)value); + } + break; + + case USER_DATA: + if (value == null) { + unsetUserData(); + } else { + setUserData((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IMAGE_NAME: + return getImageName(); + + case LICENSE_RESTRICTION: + return getLicenseRestriction(); + + case OS_NAME: + return getOsName(); + + case LECTURE_NAME: + return getLectureName(); + + case UPDATE_TIME: + return getUpdateTime(); + + case USER_DATA: + return getUserData(); + + } + 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 IMAGE_NAME: + return isSetImageName(); + case LICENSE_RESTRICTION: + return isSetLicenseRestriction(); + case OS_NAME: + return isSetOsName(); + case LECTURE_NAME: + return isSetLectureName(); + case UPDATE_TIME: + return isSetUpdateTime(); + case USER_DATA: + return isSetUserData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Image) + return this.equals((Image)that); + return false; + } + + public boolean equals(Image that) { + if (that == null) + return false; + + boolean this_present_imageName = true && this.isSetImageName(); + boolean that_present_imageName = true && that.isSetImageName(); + if (this_present_imageName || that_present_imageName) { + if (!(this_present_imageName && that_present_imageName)) + return false; + if (!this.imageName.equals(that.imageName)) + return false; + } + + boolean this_present_licenseRestriction = true && this.isSetLicenseRestriction(); + boolean that_present_licenseRestriction = true && that.isSetLicenseRestriction(); + if (this_present_licenseRestriction || that_present_licenseRestriction) { + if (!(this_present_licenseRestriction && that_present_licenseRestriction)) + return false; + if (!this.licenseRestriction.equals(that.licenseRestriction)) + return false; + } + + boolean this_present_osName = true && this.isSetOsName(); + boolean that_present_osName = true && that.isSetOsName(); + if (this_present_osName || that_present_osName) { + if (!(this_present_osName && that_present_osName)) + return false; + if (!this.osName.equals(that.osName)) + return false; + } + + boolean this_present_lectureName = true && this.isSetLectureName(); + boolean that_present_lectureName = true && that.isSetLectureName(); + if (this_present_lectureName || that_present_lectureName) { + if (!(this_present_lectureName && that_present_lectureName)) + return false; + if (!this.lectureName.equals(that.lectureName)) + return false; + } + + boolean this_present_updateTime = true && this.isSetUpdateTime(); + boolean that_present_updateTime = true && that.isSetUpdateTime(); + if (this_present_updateTime || that_present_updateTime) { + if (!(this_present_updateTime && that_present_updateTime)) + return false; + if (!this.updateTime.equals(that.updateTime)) + return false; + } + + boolean this_present_userData = true && this.isSetUserData(); + boolean that_present_userData = true && that.isSetUserData(); + if (this_present_userData || that_present_userData) { + if (!(this_present_userData && that_present_userData)) + return false; + if (!this.userData.equals(that.userData)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(Image other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLicenseRestriction()).compareTo(other.isSetLicenseRestriction()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLicenseRestriction()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.licenseRestriction, other.licenseRestriction); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOsName()).compareTo(other.isSetOsName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOsName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osName, other.osName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLectureName()).compareTo(other.isSetLectureName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureName, other.lectureName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUpdateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUserData()).compareTo(other.isSetUserData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userData, other.userData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @SuppressWarnings("unchecked") +public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + @SuppressWarnings("unchecked") +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("Image("); + boolean first = true; + + sb.append("imageName:"); + if (this.imageName == null) { + sb.append("null"); + } else { + sb.append(this.imageName); + } + first = false; + if (!first) sb.append(", "); + sb.append("licenseRestriction:"); + if (this.licenseRestriction == null) { + sb.append("null"); + } else { + sb.append(this.licenseRestriction); + } + first = false; + if (!first) sb.append(", "); + sb.append("osName:"); + if (this.osName == null) { + sb.append("null"); + } else { + sb.append(this.osName); + } + first = false; + if (!first) sb.append(", "); + sb.append("lectureName:"); + if (this.lectureName == null) { + sb.append("null"); + } else { + sb.append(this.lectureName); + } + first = false; + if (!first) sb.append(", "); + sb.append("updateTime:"); + if (this.updateTime == null) { + sb.append("null"); + } else { + sb.append(this.updateTime); + } + first = false; + if (!first) sb.append(", "); + sb.append("userData:"); + if (this.userData == null) { + sb.append("null"); + } else { + sb.append(this.userData); + } + 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 ImageStandardSchemeFactory implements SchemeFactory { + @SuppressWarnings("unchecked") + public ImageStandardScheme getScheme() { + return new ImageStandardScheme(); + } + } + + private static class ImageStandardScheme extends StandardScheme<Image> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Image 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: // IMAGE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageName = iprot.readString(); + struct.setImageNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -2: // LICENSE_RESTRICTION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.licenseRestriction = iprot.readString(); + struct.setLicenseRestrictionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -3: // OS_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.osName = iprot.readString(); + struct.setOsNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -4: // LECTURE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureName = iprot.readString(); + struct.setLectureNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -5: // UPDATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.updateTime = iprot.readString(); + struct.setUpdateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case -6: // USER_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userData = iprot.readString(); + struct.setUserDataIsSet(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, Image struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userData != null) { + oprot.writeFieldBegin(USER_DATA_FIELD_DESC); + oprot.writeString(struct.userData); + oprot.writeFieldEnd(); + } + if (struct.updateTime != null) { + oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC); + oprot.writeString(struct.updateTime); + oprot.writeFieldEnd(); + } + if (struct.lectureName != null) { + oprot.writeFieldBegin(LECTURE_NAME_FIELD_DESC); + oprot.writeString(struct.lectureName); + oprot.writeFieldEnd(); + } + if (struct.osName != null) { + oprot.writeFieldBegin(OS_NAME_FIELD_DESC); + oprot.writeString(struct.osName); + oprot.writeFieldEnd(); + } + if (struct.licenseRestriction != null) { + oprot.writeFieldBegin(LICENSE_RESTRICTION_FIELD_DESC); + oprot.writeString(struct.licenseRestriction); + oprot.writeFieldEnd(); + } + if (struct.imageName != null) { + oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC); + oprot.writeString(struct.imageName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ImageTupleSchemeFactory implements SchemeFactory { + @SuppressWarnings("unchecked") + public ImageTupleScheme getScheme() { + return new ImageTupleScheme(); + } + } + + private static class ImageTupleScheme extends TupleScheme<Image> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Image struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetImageName()) { + optionals.set(0); + } + if (struct.isSetLicenseRestriction()) { + optionals.set(1); + } + if (struct.isSetOsName()) { + optionals.set(2); + } + if (struct.isSetLectureName()) { + optionals.set(3); + } + if (struct.isSetUpdateTime()) { + optionals.set(4); + } + if (struct.isSetUserData()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetImageName()) { + oprot.writeString(struct.imageName); + } + if (struct.isSetLicenseRestriction()) { + oprot.writeString(struct.licenseRestriction); + } + if (struct.isSetOsName()) { + oprot.writeString(struct.osName); + } + if (struct.isSetLectureName()) { + oprot.writeString(struct.lectureName); + } + if (struct.isSetUpdateTime()) { + oprot.writeString(struct.updateTime); + } + if (struct.isSetUserData()) { + oprot.writeString(struct.userData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Image struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.imageName = iprot.readString(); + struct.setImageNameIsSet(true); + } + if (incoming.get(1)) { + struct.licenseRestriction = iprot.readString(); + struct.setLicenseRestrictionIsSet(true); + } + if (incoming.get(2)) { + struct.osName = iprot.readString(); + struct.setOsNameIsSet(true); + } + if (incoming.get(3)) { + struct.lectureName = iprot.readString(); + struct.setLectureNameIsSet(true); + } + if (incoming.get(4)) { + struct.updateTime = iprot.readString(); + struct.setUpdateTimeIsSet(true); + } + if (incoming.get(5)) { + struct.userData = iprot.readString(); + struct.setUserDataIsSet(true); + } + } + } + +} + |
