diff options
| author | unknown | 2014-04-10 16:50:14 +0200 |
|---|---|---|
| committer | unknown | 2014-04-10 16:50:14 +0200 |
| commit | 236f2e7bf2c9d5cdec6da36140ee7dcac7944998 (patch) | |
| tree | 2de499a71a527c7320b2096c17c5a69d2ea8d288 /Dozentenmodulserver/src/server/Image.java | |
| parent | bfg (diff) | |
| parent | cdsc (diff) | |
| download | tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.tar.gz tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.tar.xz tutor-module-236f2e7bf2c9d5cdec6da36140ee7dcac7944998.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts:
Dozentenmodul/src/GUI/SearchImage_GUI.java
Dozentenmodul/src/Models/person.java
Dozentenmodul/src/Models/vm.java
Diffstat (limited to 'Dozentenmodulserver/src/server/Image.java')
| -rw-r--r-- | Dozentenmodulserver/src/server/Image.java | 275 |
1 files changed, 238 insertions, 37 deletions
diff --git a/Dozentenmodulserver/src/server/Image.java b/Dozentenmodulserver/src/server/Image.java index ec1a813f..34c2b45c 100644 --- a/Dozentenmodulserver/src/server/Image.java +++ b/Dozentenmodulserver/src/server/Image.java @@ -5,6 +5,7 @@ * @generated */ package server; + import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -34,12 +35,14 @@ 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 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); + 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -47,6 +50,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav 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 @@ -56,12 +61,14 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav /** 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"); + 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"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -76,17 +83,21 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case -1: // IMAGE_NAME + case -1: // ID + return ID; + case -2: // VERSION + return VERSION; + case -3: // IMAGE_NAME return IMAGE_NAME; - case -2: // LICENSE_RESTRICTION + case -4: // LICENSE_RESTRICTION return LICENSE_RESTRICTION; - case -3: // OS_NAME + case -5: // OS_NAME return OS_NAME; - case -4: // LECTURE_NAME + case -6: // LECTURE_NAME return LECTURE_NAME; - case -5: // UPDATE_TIME + case -7: // UPDATE_TIME return UPDATE_TIME; - case -6: // USER_DATA + case -8: // USER_DATA return USER_DATA; default: return null; @@ -131,6 +142,10 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav 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, @@ -151,6 +166,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav } public Image( + String id, + String version, String imageName, String licenseRestriction, String osName, @@ -159,6 +176,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav String userData) { this(); + this.id = id; + this.version = version; this.imageName = imageName; this.licenseRestriction = licenseRestriction; this.osName = osName; @@ -171,6 +190,12 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav * 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; } @@ -197,6 +222,8 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav @Override public void clear() { + this.id = null; + this.version = null; this.imageName = null; this.licenseRestriction = null; this.osName = null; @@ -205,6 +232,54 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav this.userData = 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; } @@ -351,6 +426,22 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav 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(); @@ -404,6 +495,12 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav public Object getFieldValue(_Fields field) { switch (field) { + case ID: + return getId(); + + case VERSION: + return getVersion(); + case IMAGE_NAME: return getImageName(); @@ -433,6 +530,10 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav } switch (field) { + case ID: + return isSetId(); + case VERSION: + return isSetVersion(); case IMAGE_NAME: return isSetImageName(); case LICENSE_RESTRICTION: @@ -462,6 +563,24 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav 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) { @@ -532,6 +651,26 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav 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; @@ -612,6 +751,22 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav 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"); @@ -702,7 +857,23 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav break; } switch (schemeField.id) { - case -1: // IMAGE_NAME + 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); @@ -710,7 +881,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -2: // LICENSE_RESTRICTION + case -4: // LICENSE_RESTRICTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.licenseRestriction = iprot.readString(); struct.setLicenseRestrictionIsSet(true); @@ -718,7 +889,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -3: // OS_NAME + case -5: // OS_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.osName = iprot.readString(); struct.setOsNameIsSet(true); @@ -726,7 +897,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -4: // LECTURE_NAME + case -6: // LECTURE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.lectureName = iprot.readString(); struct.setLectureNameIsSet(true); @@ -734,7 +905,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -5: // UPDATE_TIME + case -7: // UPDATE_TIME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.updateTime = iprot.readString(); struct.setUpdateTimeIsSet(true); @@ -742,7 +913,7 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case -6: // USER_DATA + case -8: // USER_DATA if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userData = iprot.readString(); struct.setUserDataIsSet(true); @@ -795,6 +966,16 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav oprot.writeString(struct.imageName); oprot.writeFieldEnd(); } + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.id != null) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeString(struct.id); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -813,25 +994,37 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav 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()) { + if (struct.isSetId()) { optionals.set(0); } - if (struct.isSetLicenseRestriction()) { + if (struct.isSetVersion()) { optionals.set(1); } - if (struct.isSetOsName()) { + if (struct.isSetImageName()) { optionals.set(2); } - if (struct.isSetLectureName()) { + if (struct.isSetLicenseRestriction()) { optionals.set(3); } - if (struct.isSetUpdateTime()) { + if (struct.isSetOsName()) { optionals.set(4); } - if (struct.isSetUserData()) { + if (struct.isSetLectureName()) { optionals.set(5); } - oprot.writeBitSet(optionals, 6); + if (struct.isSetUpdateTime()) { + optionals.set(6); + } + if (struct.isSetUserData()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetId()) { + oprot.writeString(struct.id); + } + if (struct.isSetVersion()) { + oprot.writeString(struct.version); + } if (struct.isSetImageName()) { oprot.writeString(struct.imageName); } @@ -855,28 +1048,36 @@ public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, jav @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); + BitSet incoming = iprot.readBitSet(8); 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(1)) { + if (incoming.get(3)) { struct.licenseRestriction = iprot.readString(); struct.setLicenseRestrictionIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(4)) { struct.osName = iprot.readString(); struct.setOsNameIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(5)) { struct.lectureName = iprot.readString(); struct.setLectureNameIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(6)) { struct.updateTime = iprot.readString(); struct.setUpdateTimeIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(7)) { struct.userData = iprot.readString(); struct.setUserDataIsSet(true); } |
