diff options
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java')
-rw-r--r-- | src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java | 1350 |
1 files changed, 0 insertions, 1350 deletions
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java deleted file mode 100644 index aeeb15b..0000000 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java +++ /dev/null @@ -1,1350 +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.imagemaster.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 ImageData implements org.apache.thrift.TBase<ImageData, ImageData._Fields>, java.io.Serializable, Cloneable, Comparable<ImageData> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageData"); - - private static final org.apache.thrift.protocol.TField UUID_FIELD_DESC = new org.apache.thrift.protocol.TField("uuid", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField REVISION_FIELD_DESC = new org.apache.thrift.protocol.TField("revision", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (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.I64, (short)5); - private static final org.apache.thrift.protocol.TField OWNER_LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerLogin", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField OPERATING_SYSTEM_FIELD_DESC = new org.apache.thrift.protocol.TField("operatingSystem", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField IS_VALID_FIELD_DESC = new org.apache.thrift.protocol.TField("isValid", org.apache.thrift.protocol.TType.BOOL, (short)8); - private static final org.apache.thrift.protocol.TField IS_DELETED_FIELD_DESC = new org.apache.thrift.protocol.TField("isDeleted", org.apache.thrift.protocol.TType.BOOL, (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)11); - private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)12); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ImageDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ImageDataTupleSchemeFactory()); - } - - public String uuid; // required - public int revision; // required - public String title; // required - public long createTime; // required - public long updateTime; // required - public String ownerLogin; // required - public int operatingSystem; // required - public boolean isValid; // required - public boolean isDeleted; // required - public String description; // required - public long fileSize; // 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 { - UUID((short)1, "uuid"), - REVISION((short)2, "revision"), - TITLE((short)3, "title"), - CREATE_TIME((short)4, "createTime"), - UPDATE_TIME((short)5, "updateTime"), - OWNER_LOGIN((short)6, "ownerLogin"), - OPERATING_SYSTEM((short)7, "operatingSystem"), - IS_VALID((short)8, "isValid"), - IS_DELETED((short)9, "isDeleted"), - DESCRIPTION((short)11, "description"), - FILE_SIZE((short)12, "fileSize"); - - 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: // UUID - return UUID; - case 2: // REVISION - return REVISION; - case 3: // TITLE - return TITLE; - case 4: // CREATE_TIME - return CREATE_TIME; - case 5: // UPDATE_TIME - return UPDATE_TIME; - case 6: // OWNER_LOGIN - return OWNER_LOGIN; - case 7: // OPERATING_SYSTEM - return OPERATING_SYSTEM; - case 8: // IS_VALID - return IS_VALID; - case 9: // IS_DELETED - return IS_DELETED; - case 11: // DESCRIPTION - return DESCRIPTION; - case 12: // FILE_SIZE - return FILE_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 - private static final int __REVISION_ISSET_ID = 0; - private static final int __CREATETIME_ISSET_ID = 1; - private static final int __UPDATETIME_ISSET_ID = 2; - private static final int __OPERATINGSYSTEM_ISSET_ID = 3; - private static final int __ISVALID_ISSET_ID = 4; - private static final int __ISDELETED_ISSET_ID = 5; - private static final int __FILESIZE_ISSET_ID = 6; - private byte __isset_bitfield = 0; - 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.UUID, new org.apache.thrift.meta_data.FieldMetaData("uuid", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); - tmpMap.put(_Fields.REVISION, new org.apache.thrift.meta_data.FieldMetaData("revision", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.TITLE, new org.apache.thrift.meta_data.FieldMetaData("title", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); - 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.I64 , "UnixTimestamp"))); - tmpMap.put(_Fields.OWNER_LOGIN, new org.apache.thrift.meta_data.FieldMetaData("ownerLogin", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OPERATING_SYSTEM, new org.apache.thrift.meta_data.FieldMetaData("operatingSystem", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.IS_VALID, new org.apache.thrift.meta_data.FieldMetaData("isValid", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IS_DELETED, new org.apache.thrift.meta_data.FieldMetaData("isDeleted", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - 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.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageData.class, metaDataMap); - } - - public ImageData() { - } - - public ImageData( - String uuid, - int revision, - String title, - long createTime, - long updateTime, - String ownerLogin, - int operatingSystem, - boolean isValid, - boolean isDeleted, - String description, - long fileSize) - { - this(); - this.uuid = uuid; - this.revision = revision; - setRevisionIsSet(true); - this.title = title; - this.createTime = createTime; - setCreateTimeIsSet(true); - this.updateTime = updateTime; - setUpdateTimeIsSet(true); - this.ownerLogin = ownerLogin; - this.operatingSystem = operatingSystem; - setOperatingSystemIsSet(true); - this.isValid = isValid; - setIsValidIsSet(true); - this.isDeleted = isDeleted; - setIsDeletedIsSet(true); - this.description = description; - this.fileSize = fileSize; - setFileSizeIsSet(true); - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public ImageData(ImageData other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetUuid()) { - this.uuid = other.uuid; - } - this.revision = other.revision; - if (other.isSetTitle()) { - this.title = other.title; - } - this.createTime = other.createTime; - this.updateTime = other.updateTime; - if (other.isSetOwnerLogin()) { - this.ownerLogin = other.ownerLogin; - } - this.operatingSystem = other.operatingSystem; - this.isValid = other.isValid; - this.isDeleted = other.isDeleted; - if (other.isSetDescription()) { - this.description = other.description; - } - this.fileSize = other.fileSize; - } - - public ImageData deepCopy() { - return new ImageData(this); - } - - @Override - public void clear() { - this.uuid = null; - setRevisionIsSet(false); - this.revision = 0; - this.title = null; - setCreateTimeIsSet(false); - this.createTime = 0; - setUpdateTimeIsSet(false); - this.updateTime = 0; - this.ownerLogin = null; - setOperatingSystemIsSet(false); - this.operatingSystem = 0; - setIsValidIsSet(false); - this.isValid = false; - setIsDeletedIsSet(false); - this.isDeleted = false; - this.description = null; - setFileSizeIsSet(false); - this.fileSize = 0; - } - - public String getUuid() { - return this.uuid; - } - - public ImageData setUuid(String uuid) { - this.uuid = uuid; - return this; - } - - public void unsetUuid() { - this.uuid = null; - } - - /** Returns true if field uuid is set (has been assigned a value) and false otherwise */ - public boolean isSetUuid() { - return this.uuid != null; - } - - public void setUuidIsSet(boolean value) { - if (!value) { - this.uuid = null; - } - } - - public int getRevision() { - return this.revision; - } - - public ImageData setRevision(int revision) { - this.revision = revision; - setRevisionIsSet(true); - return this; - } - - public void unsetRevision() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REVISION_ISSET_ID); - } - - /** Returns true if field revision is set (has been assigned a value) and false otherwise */ - public boolean isSetRevision() { - return EncodingUtils.testBit(__isset_bitfield, __REVISION_ISSET_ID); - } - - public void setRevisionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REVISION_ISSET_ID, value); - } - - public String getTitle() { - return this.title; - } - - public ImageData setTitle(String title) { - this.title = title; - return this; - } - - public void unsetTitle() { - this.title = null; - } - - /** Returns true if field title is set (has been assigned a value) and false otherwise */ - public boolean isSetTitle() { - return this.title != null; - } - - public void setTitleIsSet(boolean value) { - if (!value) { - this.title = null; - } - } - - public long getCreateTime() { - return this.createTime; - } - - public ImageData setCreateTime(long createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - return this; - } - - public void unsetCreateTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ - public boolean isSetCreateTime() { - return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - public long getUpdateTime() { - return this.updateTime; - } - - public ImageData setUpdateTime(long updateTime) { - this.updateTime = updateTime; - setUpdateTimeIsSet(true); - return this; - } - - public void unsetUpdateTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID); - } - - /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */ - public boolean isSetUpdateTime() { - return EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID); - } - - public void setUpdateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value); - } - - public String getOwnerLogin() { - return this.ownerLogin; - } - - public ImageData setOwnerLogin(String ownerLogin) { - this.ownerLogin = ownerLogin; - return this; - } - - public void unsetOwnerLogin() { - this.ownerLogin = null; - } - - /** Returns true if field ownerLogin is set (has been assigned a value) and false otherwise */ - public boolean isSetOwnerLogin() { - return this.ownerLogin != null; - } - - public void setOwnerLoginIsSet(boolean value) { - if (!value) { - this.ownerLogin = null; - } - } - - public int getOperatingSystem() { - return this.operatingSystem; - } - - public ImageData setOperatingSystem(int operatingSystem) { - this.operatingSystem = operatingSystem; - setOperatingSystemIsSet(true); - return this; - } - - public void unsetOperatingSystem() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID); - } - - /** Returns true if field operatingSystem is set (has been assigned a value) and false otherwise */ - public boolean isSetOperatingSystem() { - return EncodingUtils.testBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID); - } - - public void setOperatingSystemIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID, value); - } - - public boolean isIsValid() { - return this.isValid; - } - - public ImageData setIsValid(boolean isValid) { - this.isValid = isValid; - setIsValidIsSet(true); - return this; - } - - public void unsetIsValid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID); - } - - /** Returns true if field isValid is set (has been assigned a value) and false otherwise */ - public boolean isSetIsValid() { - return EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID); - } - - public void setIsValidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value); - } - - public boolean isIsDeleted() { - return this.isDeleted; - } - - public ImageData setIsDeleted(boolean isDeleted) { - this.isDeleted = isDeleted; - setIsDeletedIsSet(true); - return this; - } - - public void unsetIsDeleted() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDELETED_ISSET_ID); - } - - /** Returns true if field isDeleted is set (has been assigned a value) and false otherwise */ - public boolean isSetIsDeleted() { - return EncodingUtils.testBit(__isset_bitfield, __ISDELETED_ISSET_ID); - } - - public void setIsDeletedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDELETED_ISSET_ID, value); - } - - public String getDescription() { - return this.description; - } - - public ImageData 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 long getFileSize() { - return this.fileSize; - } - - public ImageData setFileSize(long fileSize) { - this.fileSize = fileSize; - setFileSizeIsSet(true); - return this; - } - - public void unsetFileSize() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID); - } - - /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */ - public boolean isSetFileSize() { - return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID); - } - - public void setFileSizeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case UUID: - if (value == null) { - unsetUuid(); - } else { - setUuid((String)value); - } - break; - - case REVISION: - if (value == null) { - unsetRevision(); - } else { - setRevision((Integer)value); - } - break; - - case TITLE: - if (value == null) { - unsetTitle(); - } else { - setTitle((String)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Long)value); - } - break; - - case UPDATE_TIME: - if (value == null) { - unsetUpdateTime(); - } else { - setUpdateTime((Long)value); - } - break; - - case OWNER_LOGIN: - if (value == null) { - unsetOwnerLogin(); - } else { - setOwnerLogin((String)value); - } - break; - - case OPERATING_SYSTEM: - if (value == null) { - unsetOperatingSystem(); - } else { - setOperatingSystem((Integer)value); - } - break; - - case IS_VALID: - if (value == null) { - unsetIsValid(); - } else { - setIsValid((Boolean)value); - } - break; - - case IS_DELETED: - if (value == null) { - unsetIsDeleted(); - } else { - setIsDeleted((Boolean)value); - } - break; - - case DESCRIPTION: - if (value == null) { - unsetDescription(); - } else { - setDescription((String)value); - } - break; - - case FILE_SIZE: - if (value == null) { - unsetFileSize(); - } else { - setFileSize((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case UUID: - return getUuid(); - - case REVISION: - return Integer.valueOf(getRevision()); - - case TITLE: - return getTitle(); - - case CREATE_TIME: - return Long.valueOf(getCreateTime()); - - case UPDATE_TIME: - return Long.valueOf(getUpdateTime()); - - case OWNER_LOGIN: - return getOwnerLogin(); - - case OPERATING_SYSTEM: - return Integer.valueOf(getOperatingSystem()); - - case IS_VALID: - return Boolean.valueOf(isIsValid()); - - case IS_DELETED: - return Boolean.valueOf(isIsDeleted()); - - case DESCRIPTION: - return getDescription(); - - case FILE_SIZE: - return Long.valueOf(getFileSize()); - - } - 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 UUID: - return isSetUuid(); - case REVISION: - return isSetRevision(); - case TITLE: - return isSetTitle(); - case CREATE_TIME: - return isSetCreateTime(); - case UPDATE_TIME: - return isSetUpdateTime(); - case OWNER_LOGIN: - return isSetOwnerLogin(); - case OPERATING_SYSTEM: - return isSetOperatingSystem(); - case IS_VALID: - return isSetIsValid(); - case IS_DELETED: - return isSetIsDeleted(); - case DESCRIPTION: - return isSetDescription(); - case FILE_SIZE: - return isSetFileSize(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ImageData) - return this.equals((ImageData)that); - return false; - } - - public boolean equals(ImageData that) { - if (that == null) - return false; - - boolean this_present_uuid = true && this.isSetUuid(); - boolean that_present_uuid = true && that.isSetUuid(); - if (this_present_uuid || that_present_uuid) { - if (!(this_present_uuid && that_present_uuid)) - return false; - if (!this.uuid.equals(that.uuid)) - return false; - } - - boolean this_present_revision = true; - boolean that_present_revision = true; - if (this_present_revision || that_present_revision) { - if (!(this_present_revision && that_present_revision)) - return false; - if (this.revision != that.revision) - return false; - } - - boolean this_present_title = true && this.isSetTitle(); - boolean that_present_title = true && that.isSetTitle(); - if (this_present_title || that_present_title) { - if (!(this_present_title && that_present_title)) - return false; - if (!this.title.equals(that.title)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_updateTime = true; - boolean that_present_updateTime = true; - if (this_present_updateTime || that_present_updateTime) { - if (!(this_present_updateTime && that_present_updateTime)) - return false; - if (this.updateTime != that.updateTime) - return false; - } - - boolean this_present_ownerLogin = true && this.isSetOwnerLogin(); - boolean that_present_ownerLogin = true && that.isSetOwnerLogin(); - if (this_present_ownerLogin || that_present_ownerLogin) { - if (!(this_present_ownerLogin && that_present_ownerLogin)) - return false; - if (!this.ownerLogin.equals(that.ownerLogin)) - return false; - } - - boolean this_present_operatingSystem = true; - boolean that_present_operatingSystem = true; - if (this_present_operatingSystem || that_present_operatingSystem) { - if (!(this_present_operatingSystem && that_present_operatingSystem)) - return false; - if (this.operatingSystem != that.operatingSystem) - return false; - } - - boolean this_present_isValid = true; - boolean that_present_isValid = true; - if (this_present_isValid || that_present_isValid) { - if (!(this_present_isValid && that_present_isValid)) - return false; - if (this.isValid != that.isValid) - return false; - } - - boolean this_present_isDeleted = true; - boolean that_present_isDeleted = true; - if (this_present_isDeleted || that_present_isDeleted) { - if (!(this_present_isDeleted && that_present_isDeleted)) - return false; - if (this.isDeleted != that.isDeleted) - 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_fileSize = true; - boolean that_present_fileSize = true; - if (this_present_fileSize || that_present_fileSize) { - if (!(this_present_fileSize && that_present_fileSize)) - return false; - if (this.fileSize != that.fileSize) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(ImageData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUuid()).compareTo(other.isSetUuid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUuid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, other.uuid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRevision()).compareTo(other.isSetRevision()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRevision()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revision, other.revision); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTitle()).compareTo(other.isSetTitle()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTitle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, other.title); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - 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(isSetOwnerLogin()).compareTo(other.isSetOwnerLogin()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOwnerLogin()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerLogin, other.ownerLogin); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOperatingSystem()).compareTo(other.isSetOperatingSystem()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOperatingSystem()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatingSystem, other.operatingSystem); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(other.isSetIsValid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsValid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isValid, other.isValid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsDeleted()).compareTo(other.isSetIsDeleted()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsDeleted()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDeleted, other.isDeleted); - 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(isSetFileSize()).compareTo(other.isSetFileSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFileSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize); - 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("ImageData("); - boolean first = true; - - sb.append("uuid:"); - if (this.uuid == null) { - sb.append("null"); - } else { - sb.append(this.uuid); - } - first = false; - if (!first) sb.append(", "); - sb.append("revision:"); - sb.append(this.revision); - first = false; - if (!first) sb.append(", "); - sb.append("title:"); - if (this.title == null) { - sb.append("null"); - } else { - sb.append(this.title); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("updateTime:"); - sb.append(this.updateTime); - first = false; - if (!first) sb.append(", "); - sb.append("ownerLogin:"); - if (this.ownerLogin == null) { - sb.append("null"); - } else { - sb.append(this.ownerLogin); - } - first = false; - if (!first) sb.append(", "); - sb.append("operatingSystem:"); - sb.append(this.operatingSystem); - first = false; - if (!first) sb.append(", "); - sb.append("isValid:"); - sb.append(this.isValid); - first = false; - if (!first) sb.append(", "); - sb.append("isDeleted:"); - sb.append(this.isDeleted); - 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("fileSize:"); - sb.append(this.fileSize); - 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 { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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 ImageDataStandardSchemeFactory implements SchemeFactory { - public ImageDataStandardScheme getScheme() { - return new ImageDataStandardScheme(); - } - } - - private static class ImageDataStandardScheme extends StandardScheme<ImageData> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ImageData 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: // UUID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.uuid = iprot.readString(); - struct.setUuidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // REVISION - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.revision = iprot.readI32(); - struct.setRevisionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TITLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.title = iprot.readString(); - struct.setTitleIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // CREATE_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.createTime = iprot.readI64(); - struct.setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // UPDATE_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.updateTime = iprot.readI64(); - struct.setUpdateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // OWNER_LOGIN - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.ownerLogin = iprot.readString(); - struct.setOwnerLoginIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // OPERATING_SYSTEM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.operatingSystem = iprot.readI32(); - struct.setOperatingSystemIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // IS_VALID - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isValid = iprot.readBool(); - struct.setIsValidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // IS_DELETED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isDeleted = iprot.readBool(); - struct.setIsDeletedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // 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 12: // FILE_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.fileSize = iprot.readI64(); - struct.setFileSizeIsSet(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, ImageData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.uuid != null) { - oprot.writeFieldBegin(UUID_FIELD_DESC); - oprot.writeString(struct.uuid); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(REVISION_FIELD_DESC); - oprot.writeI32(struct.revision); - oprot.writeFieldEnd(); - if (struct.title != null) { - oprot.writeFieldBegin(TITLE_FIELD_DESC); - oprot.writeString(struct.title); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI64(struct.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC); - oprot.writeI64(struct.updateTime); - oprot.writeFieldEnd(); - if (struct.ownerLogin != null) { - oprot.writeFieldBegin(OWNER_LOGIN_FIELD_DESC); - oprot.writeString(struct.ownerLogin); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(OPERATING_SYSTEM_FIELD_DESC); - oprot.writeI32(struct.operatingSystem); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IS_VALID_FIELD_DESC); - oprot.writeBool(struct.isValid); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IS_DELETED_FIELD_DESC); - oprot.writeBool(struct.isDeleted); - oprot.writeFieldEnd(); - if (struct.description != null) { - oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); - oprot.writeString(struct.description); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC); - oprot.writeI64(struct.fileSize); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ImageDataTupleSchemeFactory implements SchemeFactory { - public ImageDataTupleScheme getScheme() { - return new ImageDataTupleScheme(); - } - } - - private static class ImageDataTupleScheme extends TupleScheme<ImageData> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ImageData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetUuid()) { - optionals.set(0); - } - if (struct.isSetRevision()) { - optionals.set(1); - } - if (struct.isSetTitle()) { - optionals.set(2); - } - if (struct.isSetCreateTime()) { - optionals.set(3); - } - if (struct.isSetUpdateTime()) { - optionals.set(4); - } - if (struct.isSetOwnerLogin()) { - optionals.set(5); - } - if (struct.isSetOperatingSystem()) { - optionals.set(6); - } - if (struct.isSetIsValid()) { - optionals.set(7); - } - if (struct.isSetIsDeleted()) { - optionals.set(8); - } - if (struct.isSetDescription()) { - optionals.set(9); - } - if (struct.isSetFileSize()) { - optionals.set(10); - } - oprot.writeBitSet(optionals, 11); - if (struct.isSetUuid()) { - oprot.writeString(struct.uuid); - } - if (struct.isSetRevision()) { - oprot.writeI32(struct.revision); - } - if (struct.isSetTitle()) { - oprot.writeString(struct.title); - } - if (struct.isSetCreateTime()) { - oprot.writeI64(struct.createTime); - } - if (struct.isSetUpdateTime()) { - oprot.writeI64(struct.updateTime); - } - if (struct.isSetOwnerLogin()) { - oprot.writeString(struct.ownerLogin); - } - if (struct.isSetOperatingSystem()) { - oprot.writeI32(struct.operatingSystem); - } - if (struct.isSetIsValid()) { - oprot.writeBool(struct.isValid); - } - if (struct.isSetIsDeleted()) { - oprot.writeBool(struct.isDeleted); - } - if (struct.isSetDescription()) { - oprot.writeString(struct.description); - } - if (struct.isSetFileSize()) { - oprot.writeI64(struct.fileSize); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ImageData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(11); - if (incoming.get(0)) { - struct.uuid = iprot.readString(); - struct.setUuidIsSet(true); - } - if (incoming.get(1)) { - struct.revision = iprot.readI32(); - struct.setRevisionIsSet(true); - } - if (incoming.get(2)) { - struct.title = iprot.readString(); - struct.setTitleIsSet(true); - } - if (incoming.get(3)) { - struct.createTime = iprot.readI64(); - struct.setCreateTimeIsSet(true); - } - if (incoming.get(4)) { - struct.updateTime = iprot.readI64(); - struct.setUpdateTimeIsSet(true); - } - if (incoming.get(5)) { - struct.ownerLogin = iprot.readString(); - struct.setOwnerLoginIsSet(true); - } - if (incoming.get(6)) { - struct.operatingSystem = iprot.readI32(); - struct.setOperatingSystemIsSet(true); - } - if (incoming.get(7)) { - struct.isValid = iprot.readBool(); - struct.setIsValidIsSet(true); - } - if (incoming.get(8)) { - struct.isDeleted = iprot.readBool(); - struct.setIsDeletedIsSet(true); - } - if (incoming.get(9)) { - struct.description = iprot.readString(); - struct.setDescriptionIsSet(true); - } - if (incoming.get(10)) { - struct.fileSize = iprot.readI64(); - struct.setFileSizeIsSet(true); - } - } - } - -} - |