diff options
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java | 220 |
1 files changed, 216 insertions, 4 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java b/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java index f5e3a8c..ba80e7b 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java @@ -34,12 +34,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-06-13") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-11-23") public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilter._Fields>, java.io.Serializable, Cloneable, Comparable<LdapFilter> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LdapFilter"); private static final org.apache.thrift.protocol.TField ATTRIBUTE_FIELD_DESC = new org.apache.thrift.protocol.TField("attribute", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FILTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("filterId", org.apache.thrift.protocol.TType.I32, (short)3); + 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)4); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -49,11 +51,15 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte public String attribute; // required public String value; // required + public int filterId; // optional + public String title; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ATTRIBUTE((short)1, "attribute"), - VALUE((short)2, "value"); + VALUE((short)2, "value"), + FILTER_ID((short)3, "filterId"), + TITLE((short)4, "title"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -72,6 +78,10 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte return ATTRIBUTE; case 2: // VALUE return VALUE; + case 3: // FILTER_ID + return FILTER_ID; + case 4: // TITLE + return TITLE; default: return null; } @@ -112,6 +122,9 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte } // isset id assignments + private static final int __FILTERID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.FILTER_ID,_Fields.TITLE}; 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); @@ -119,6 +132,10 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FILTER_ID, new org.apache.thrift.meta_data.FieldMetaData("filterId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + 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.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LdapFilter.class, metaDataMap); } @@ -139,12 +156,17 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte * Performs a deep copy on <i>other</i>. */ public LdapFilter(LdapFilter other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetAttribute()) { this.attribute = other.attribute; } if (other.isSetValue()) { this.value = other.value; } + this.filterId = other.filterId; + if (other.isSetTitle()) { + this.title = other.title; + } } public LdapFilter deepCopy() { @@ -155,6 +177,9 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte public void clear() { this.attribute = null; this.value = null; + setFilterIdIsSet(false); + this.filterId = 0; + this.title = null; } public String getAttribute() { @@ -205,6 +230,53 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte } } + public int getFilterId() { + return this.filterId; + } + + public LdapFilter setFilterId(int filterId) { + this.filterId = filterId; + setFilterIdIsSet(true); + return this; + } + + public void unsetFilterId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILTERID_ISSET_ID); + } + + /** Returns true if field filterId is set (has been assigned a value) and false otherwise */ + public boolean isSetFilterId() { + return EncodingUtils.testBit(__isset_bitfield, __FILTERID_ISSET_ID); + } + + public void setFilterIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILTERID_ISSET_ID, value); + } + + public String getTitle() { + return this.title; + } + + public LdapFilter 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 void setFieldValue(_Fields field, Object value) { switch (field) { case ATTRIBUTE: @@ -223,6 +295,22 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte } break; + case FILTER_ID: + if (value == null) { + unsetFilterId(); + } else { + setFilterId((Integer)value); + } + break; + + case TITLE: + if (value == null) { + unsetTitle(); + } else { + setTitle((String)value); + } + break; + } } @@ -234,6 +322,12 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte case VALUE: return getValue(); + case FILTER_ID: + return getFilterId(); + + case TITLE: + return getTitle(); + } throw new IllegalStateException(); } @@ -249,6 +343,10 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte return isSetAttribute(); case VALUE: return isSetValue(); + case FILTER_ID: + return isSetFilterId(); + case TITLE: + return isSetTitle(); } throw new IllegalStateException(); } @@ -284,6 +382,24 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte return false; } + boolean this_present_filterId = true && this.isSetFilterId(); + boolean that_present_filterId = true && that.isSetFilterId(); + if (this_present_filterId || that_present_filterId) { + if (!(this_present_filterId && that_present_filterId)) + return false; + if (this.filterId != that.filterId) + 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; + } + return true; } @@ -301,6 +417,16 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte if (present_value) list.add(value); + boolean present_filterId = true && (isSetFilterId()); + list.add(present_filterId); + if (present_filterId) + list.add(filterId); + + boolean present_title = true && (isSetTitle()); + list.add(present_title); + if (present_title) + list.add(title); + return list.hashCode(); } @@ -332,6 +458,26 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte return lastComparison; } } + lastComparison = Boolean.valueOf(isSetFilterId()).compareTo(other.isSetFilterId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilterId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterId, other.filterId); + 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; + } + } return 0; } @@ -367,6 +513,22 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte sb.append(this.value); } first = false; + if (isSetFilterId()) { + if (!first) sb.append(", "); + sb.append("filterId:"); + sb.append(this.filterId); + first = false; + } + if (isSetTitle()) { + if (!first) sb.append(", "); + sb.append("title:"); + if (this.title == null) { + sb.append("null"); + } else { + sb.append(this.title); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -386,6 +548,8 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte 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); @@ -426,6 +590,22 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 3: // FILTER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.filterId = iprot.readI32(); + struct.setFilterIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // 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; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -451,6 +631,18 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte oprot.writeString(struct.value); oprot.writeFieldEnd(); } + if (struct.isSetFilterId()) { + oprot.writeFieldBegin(FILTER_ID_FIELD_DESC); + oprot.writeI32(struct.filterId); + oprot.writeFieldEnd(); + } + if (struct.title != null) { + if (struct.isSetTitle()) { + oprot.writeFieldBegin(TITLE_FIELD_DESC); + oprot.writeString(struct.title); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -475,19 +667,31 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte if (struct.isSetValue()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetFilterId()) { + optionals.set(2); + } + if (struct.isSetTitle()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); if (struct.isSetAttribute()) { oprot.writeString(struct.attribute); } if (struct.isSetValue()) { oprot.writeString(struct.value); } + if (struct.isSetFilterId()) { + oprot.writeI32(struct.filterId); + } + if (struct.isSetTitle()) { + oprot.writeString(struct.title); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, LdapFilter struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.attribute = iprot.readString(); struct.setAttributeIsSet(true); @@ -496,6 +700,14 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte struct.value = iprot.readString(); struct.setValueIsSet(true); } + if (incoming.get(2)) { + struct.filterId = iprot.readI32(); + struct.setFilterIdIsSet(true); + } + if (incoming.get(3)) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } } } |