diff options
Diffstat (limited to 'src/main/java/org/openslx/sat/thrift/iface/Image.java')
-rw-r--r-- | src/main/java/org/openslx/sat/thrift/iface/Image.java | 1388 |
1 files changed, 0 insertions, 1388 deletions
diff --git a/src/main/java/org/openslx/sat/thrift/iface/Image.java b/src/main/java/org/openslx/sat/thrift/iface/Image.java deleted file mode 100644 index 4b4e9a0..0000000 --- a/src/main/java/org/openslx/sat/thrift/iface/Image.java +++ /dev/null @@ -1,1388 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.1) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.openslx.sat.thrift.iface; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -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 ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)2); - 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)3); - 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)4); - 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)5); - 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)6); - 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)7); - 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)8); - private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.STRING, (short)9); - private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField IMAGE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("imageSize", org.apache.thrift.protocol.TType.STRING, (short)11); - - 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 id; // required - public String version; // required - public String imageName; // required - public String licenseRestriction; // required - public String osName; // required - public String lectureName; // required - public String updateTime; // required - public String userData; // required - public String isTemplate; // required - public String description; // required - public String imageSize; // 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 { - ID((short)1, "id"), - VERSION((short)2, "version"), - IMAGE_NAME((short)3, "imageName"), - LICENSE_RESTRICTION((short)4, "licenseRestriction"), - OS_NAME((short)5, "osName"), - LECTURE_NAME((short)6, "lectureName"), - UPDATE_TIME((short)7, "updateTime"), - USER_DATA((short)8, "userData"), - IS_TEMPLATE((short)9, "isTemplate"), - DESCRIPTION((short)10, "description"), - IMAGE_SIZE((short)11, "imageSize"); - - 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: // ID - return ID; - case 2: // VERSION - return VERSION; - case 3: // IMAGE_NAME - return IMAGE_NAME; - case 4: // LICENSE_RESTRICTION - return LICENSE_RESTRICTION; - case 5: // OS_NAME - return OS_NAME; - case 6: // LECTURE_NAME - return LECTURE_NAME; - case 7: // UPDATE_TIME - return UPDATE_TIME; - case 8: // USER_DATA - return USER_DATA; - case 9: // IS_TEMPLATE - return IS_TEMPLATE; - case 10: // DESCRIPTION - return DESCRIPTION; - case 11: // IMAGE_SIZE - return IMAGE_SIZE; - 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - 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))); - tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IMAGE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("imageSize", 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 id, - String version, - String imageName, - String licenseRestriction, - String osName, - String lectureName, - String updateTime, - String userData, - String isTemplate, - String description, - String imageSize) - { - this(); - this.id = id; - this.version = version; - this.imageName = imageName; - this.licenseRestriction = licenseRestriction; - this.osName = osName; - this.lectureName = lectureName; - this.updateTime = updateTime; - this.userData = userData; - this.isTemplate = isTemplate; - this.description = description; - this.imageSize = imageSize; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public Image(Image other) { - if (other.isSetId()) { - this.id = other.id; - } - if (other.isSetVersion()) { - this.version = other.version; - } - 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; - } - if (other.isSetIsTemplate()) { - this.isTemplate = other.isTemplate; - } - if (other.isSetDescription()) { - this.description = other.description; - } - if (other.isSetImageSize()) { - this.imageSize = other.imageSize; - } - } - - public Image deepCopy() { - return new Image(this); - } - - @Override - public void clear() { - this.id = null; - this.version = null; - this.imageName = null; - this.licenseRestriction = null; - this.osName = null; - this.lectureName = null; - this.updateTime = null; - this.userData = null; - this.isTemplate = null; - this.description = null; - this.imageSize = null; - } - - public String getId() { - return this.id; - } - - public Image setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public String getVersion() { - return this.version; - } - - public Image setVersion(String version) { - this.version = version; - return this; - } - - public void unsetVersion() { - this.version = null; - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return this.version != null; - } - - public void setVersionIsSet(boolean value) { - if (!value) { - this.version = 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 String getIsTemplate() { - return this.isTemplate; - } - - public Image setIsTemplate(String isTemplate) { - this.isTemplate = isTemplate; - return this; - } - - public void unsetIsTemplate() { - this.isTemplate = null; - } - - /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */ - public boolean isSetIsTemplate() { - return this.isTemplate != null; - } - - public void setIsTemplateIsSet(boolean value) { - if (!value) { - this.isTemplate = null; - } - } - - public String getDescription() { - return this.description; - } - - public Image setDescription(String description) { - this.description = description; - return this; - } - - public void unsetDescription() { - this.description = null; - } - - /** Returns true if field description is set (has been assigned a value) and false otherwise */ - public boolean isSetDescription() { - return this.description != null; - } - - public void setDescriptionIsSet(boolean value) { - if (!value) { - this.description = null; - } - } - - public String getImageSize() { - return this.imageSize; - } - - public Image setImageSize(String imageSize) { - this.imageSize = imageSize; - return this; - } - - public void unsetImageSize() { - this.imageSize = null; - } - - /** Returns true if field imageSize is set (has been assigned a value) and false otherwise */ - public boolean isSetImageSize() { - return this.imageSize != null; - } - - public void setImageSizeIsSet(boolean value) { - if (!value) { - this.imageSize = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((String)value); - } - break; - - 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; - - case IS_TEMPLATE: - if (value == null) { - unsetIsTemplate(); - } else { - setIsTemplate((String)value); - } - break; - - case DESCRIPTION: - if (value == null) { - unsetDescription(); - } else { - setDescription((String)value); - } - break; - - case IMAGE_SIZE: - if (value == null) { - unsetImageSize(); - } else { - setImageSize((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - case VERSION: - return getVersion(); - - 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(); - - case IS_TEMPLATE: - return getIsTemplate(); - - case DESCRIPTION: - return getDescription(); - - case IMAGE_SIZE: - return getImageSize(); - - } - 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 ID: - return isSetId(); - case VERSION: - return isSetVersion(); - 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(); - case IS_TEMPLATE: - return isSetIsTemplate(); - case DESCRIPTION: - return isSetDescription(); - case IMAGE_SIZE: - return isSetImageSize(); - } - 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_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - boolean this_present_version = true && this.isSetVersion(); - boolean that_present_version = true && that.isSetVersion(); - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (!this.version.equals(that.version)) - 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; - } - - boolean this_present_isTemplate = true && this.isSetIsTemplate(); - boolean that_present_isTemplate = true && that.isSetIsTemplate(); - if (this_present_isTemplate || that_present_isTemplate) { - if (!(this_present_isTemplate && that_present_isTemplate)) - return false; - if (!this.isTemplate.equals(that.isTemplate)) - return false; - } - - boolean this_present_description = true && this.isSetDescription(); - boolean that_present_description = true && that.isSetDescription(); - if (this_present_description || that_present_description) { - if (!(this_present_description && that_present_description)) - return false; - if (!this.description.equals(that.description)) - return false; - } - - boolean this_present_imageSize = true && this.isSetImageSize(); - boolean that_present_imageSize = true && that.isSetImageSize(); - if (this_present_imageSize || that_present_imageSize) { - if (!(this_present_imageSize && that_present_imageSize)) - return false; - if (!this.imageSize.equals(that.imageSize)) - 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(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - 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; - } - } - lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsTemplate()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDescription()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetImageSize()).compareTo(other.isSetImageSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetImageSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageSize, other.imageSize); - 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("Image("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - if (!first) sb.append(", "); - sb.append("version:"); - if (this.version == null) { - sb.append("null"); - } else { - sb.append(this.version); - } - first = false; - if (!first) sb.append(", "); - 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; - if (!first) sb.append(", "); - sb.append("isTemplate:"); - if (this.isTemplate == null) { - sb.append("null"); - } else { - sb.append(this.isTemplate); - } - first = false; - if (!first) sb.append(", "); - sb.append("description:"); - if (this.description == null) { - sb.append("null"); - } else { - sb.append(this.description); - } - first = false; - if (!first) sb.append(", "); - sb.append("imageSize:"); - if (this.imageSize == null) { - sb.append("null"); - } else { - sb.append(this.imageSize); - } - 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 { - 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: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.version = iprot.readString(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // 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 4: // 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 5: // 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 6: // 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 7: // 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 8: // 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; - case 9: // IS_TEMPLATE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.isTemplate = iprot.readString(); - struct.setIsTemplateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // DESCRIPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.description = iprot.readString(); - struct.setDescriptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // IMAGE_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.imageSize = iprot.readString(); - struct.setImageSizeIsSet(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.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - if (struct.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeString(struct.version); - oprot.writeFieldEnd(); - } - if (struct.imageName != null) { - oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC); - oprot.writeString(struct.imageName); - oprot.writeFieldEnd(); - } - if (struct.licenseRestriction != null) { - oprot.writeFieldBegin(LICENSE_RESTRICTION_FIELD_DESC); - oprot.writeString(struct.licenseRestriction); - oprot.writeFieldEnd(); - } - if (struct.osName != null) { - oprot.writeFieldBegin(OS_NAME_FIELD_DESC); - oprot.writeString(struct.osName); - oprot.writeFieldEnd(); - } - if (struct.lectureName != null) { - oprot.writeFieldBegin(LECTURE_NAME_FIELD_DESC); - oprot.writeString(struct.lectureName); - oprot.writeFieldEnd(); - } - if (struct.updateTime != null) { - oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC); - oprot.writeString(struct.updateTime); - oprot.writeFieldEnd(); - } - if (struct.userData != null) { - oprot.writeFieldBegin(USER_DATA_FIELD_DESC); - oprot.writeString(struct.userData); - oprot.writeFieldEnd(); - } - if (struct.isTemplate != null) { - oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC); - oprot.writeString(struct.isTemplate); - oprot.writeFieldEnd(); - } - if (struct.description != null) { - oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); - oprot.writeString(struct.description); - oprot.writeFieldEnd(); - } - if (struct.imageSize != null) { - oprot.writeFieldBegin(IMAGE_SIZE_FIELD_DESC); - oprot.writeString(struct.imageSize); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ImageTupleSchemeFactory implements SchemeFactory { - 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.isSetId()) { - optionals.set(0); - } - if (struct.isSetVersion()) { - optionals.set(1); - } - if (struct.isSetImageName()) { - optionals.set(2); - } - if (struct.isSetLicenseRestriction()) { - optionals.set(3); - } - if (struct.isSetOsName()) { - optionals.set(4); - } - if (struct.isSetLectureName()) { - optionals.set(5); - } - if (struct.isSetUpdateTime()) { - optionals.set(6); - } - if (struct.isSetUserData()) { - optionals.set(7); - } - if (struct.isSetIsTemplate()) { - optionals.set(8); - } - if (struct.isSetDescription()) { - optionals.set(9); - } - if (struct.isSetImageSize()) { - optionals.set(10); - } - oprot.writeBitSet(optionals, 11); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - if (struct.isSetVersion()) { - oprot.writeString(struct.version); - } - 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); - } - if (struct.isSetIsTemplate()) { - oprot.writeString(struct.isTemplate); - } - if (struct.isSetDescription()) { - oprot.writeString(struct.description); - } - if (struct.isSetImageSize()) { - oprot.writeString(struct.imageSize); - } - } - - @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(11); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - if (incoming.get(1)) { - struct.version = iprot.readString(); - struct.setVersionIsSet(true); - } - if (incoming.get(2)) { - struct.imageName = iprot.readString(); - struct.setImageNameIsSet(true); - } - if (incoming.get(3)) { - struct.licenseRestriction = iprot.readString(); - struct.setLicenseRestrictionIsSet(true); - } - if (incoming.get(4)) { - struct.osName = iprot.readString(); - struct.setOsNameIsSet(true); - } - if (incoming.get(5)) { - struct.lectureName = iprot.readString(); - struct.setLectureNameIsSet(true); - } - if (incoming.get(6)) { - struct.updateTime = iprot.readString(); - struct.setUpdateTimeIsSet(true); - } - if (incoming.get(7)) { - struct.userData = iprot.readString(); - struct.setUserDataIsSet(true); - } - if (incoming.get(8)) { - struct.isTemplate = iprot.readString(); - struct.setIsTemplateIsSet(true); - } - if (incoming.get(9)) { - struct.description = iprot.readString(); - struct.setDescriptionIsSet(true); - } - if (incoming.get(10)) { - struct.imageSize = iprot.readString(); - struct.setImageSizeIsSet(true); - } - } - } - -} - |