@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_exceptionData = true && (isSetExceptionData()); list.add(present_exceptionData); if (present_exceptionData) list.add(exceptionData); boolean present_serverInfo = true && (isSetServerInfo()); list.add(present_serverInfo); if (present_serverInfo) list.add(serverInfo); boolean present_nextExceptions = true && (isSetNextExceptions()); list.add(present_nextExceptions); if (present_nextExceptions) list.add(nextExceptions); return list.hashCode(); }
/** 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 EXCEPTION_DATA: return isSetExceptionData(); case SERVER_INFO: return isSetServerInfo(); case NEXT_EXCEPTIONS: return isSetNextExceptions(); } throw new IllegalStateException(); }
if (isSetNextExceptions()) { if (!first) sb.append(", "); sb.append("nextExceptions:");
lastComparison = Boolean.valueOf(isSetNextExceptions()).compareTo(other.isSetNextExceptions()); if (lastComparison != 0) { return lastComparison; if (isSetNextExceptions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nextExceptions, other.nextExceptions); if (lastComparison != 0) {
@Override public void write(org.apache.thrift.protocol.TProtocol prot, SnappyException struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.exceptionData.write(oprot); oprot.writeString(struct.serverInfo); BitSet optionals = new BitSet(); if (struct.isSetNextExceptions()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetNextExceptions()) { { oprot.writeI32(struct.nextExceptions.size()); for (SnappyExceptionData _iter124 : struct.nextExceptions) { _iter124.write(oprot); } } } }
/** * Performs a deep copy on <i>other</i>. */ public SnappyException(SnappyException other) { if (other.isSetExceptionData()) { this.exceptionData = new SnappyExceptionData(other.exceptionData); } if (other.isSetServerInfo()) { this.serverInfo = other.serverInfo; } if (other.isSetNextExceptions()) { List<SnappyExceptionData> __this__nextExceptions = new ArrayList<SnappyExceptionData>(other.nextExceptions.size()); for (SnappyExceptionData other_element : other.nextExceptions) { __this__nextExceptions.add(new SnappyExceptionData(other_element)); } this.nextExceptions = __this__nextExceptions; } }
public void write(org.apache.thrift.protocol.TProtocol oprot, SnappyException struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.exceptionData != null) { oprot.writeFieldBegin(EXCEPTION_DATA_FIELD_DESC); struct.exceptionData.write(oprot); oprot.writeFieldEnd(); } if (struct.serverInfo != null) { oprot.writeFieldBegin(SERVER_INFO_FIELD_DESC); oprot.writeString(struct.serverInfo); oprot.writeFieldEnd(); } if (struct.nextExceptions != null) { if (struct.isSetNextExceptions()) { oprot.writeFieldBegin(NEXT_EXCEPTIONS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nextExceptions.size())); for (SnappyExceptionData _iter123 : struct.nextExceptions) { _iter123.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public boolean equals(SnappyException that) { if (that == null) return false; boolean this_present_exceptionData = true && this.isSetExceptionData(); boolean that_present_exceptionData = true && that.isSetExceptionData(); if (this_present_exceptionData || that_present_exceptionData) { if (!(this_present_exceptionData && that_present_exceptionData)) return false; if (!this.exceptionData.equals(that.exceptionData)) return false; } boolean this_present_serverInfo = true && this.isSetServerInfo(); boolean that_present_serverInfo = true && that.isSetServerInfo(); if (this_present_serverInfo || that_present_serverInfo) { if (!(this_present_serverInfo && that_present_serverInfo)) return false; if (!this.serverInfo.equals(that.serverInfo)) return false; } boolean this_present_nextExceptions = true && this.isSetNextExceptions(); boolean that_present_nextExceptions = true && that.isSetNextExceptions(); if (this_present_nextExceptions || that_present_nextExceptions) { if (!(this_present_nextExceptions && that_present_nextExceptions)) return false; if (!this.nextExceptions.equals(that.nextExceptions)) return false; } return true; }