@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_reason = true && (isSetReason()); list.add(present_reason); if (present_reason) list.add(reason); boolean present_errorCode = true; list.add(present_errorCode); if (present_errorCode) list.add(errorCode); boolean present_sqlState = true && (isSetSqlState()); list.add(present_sqlState); if (present_sqlState) list.add(sqlState); boolean present_updateCounts = true && (isSetUpdateCounts()); list.add(present_updateCounts); if (present_updateCounts) list.add(updateCounts); return list.hashCode(); }
/** * Performs a deep copy on <i>other</i>. */ public SnappyExceptionData(SnappyExceptionData other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetReason()) { this.reason = other.reason; } this.errorCode = other.errorCode; if (other.isSetSqlState()) { this.sqlState = other.sqlState; } if (other.isSetUpdateCounts()) { List<Integer> __this__updateCounts = new ArrayList<Integer>(other.updateCounts); this.updateCounts = __this__updateCounts; } }
sb.append(this.errorCode); first = false; if (isSetSqlState()) { if (!first) sb.append(", "); sb.append("sqlState:");
/** 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 REASON: return isSetReason(); case ERROR_CODE: return isSetErrorCode(); case SQL_STATE: return isSetSqlState(); case UPDATE_COUNTS: return isSetUpdateCounts(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(other.isSetSqlState()); if (lastComparison != 0) { return lastComparison; if (isSetSqlState()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, other.sqlState); if (lastComparison != 0) {
boolean this_present_sqlState = true && this.isSetSqlState(); boolean that_present_sqlState = true && that.isSetSqlState(); if (this_present_sqlState || that_present_sqlState) { if (!(this_present_sqlState && that_present_sqlState))
oprot.writeFieldEnd(); if (struct.sqlState != null) { if (struct.isSetSqlState()) { oprot.writeFieldBegin(SQL_STATE_FIELD_DESC); oprot.writeString(struct.sqlState);
@Override public void write(org.apache.thrift.protocol.TProtocol prot, SnappyExceptionData struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.reason); oprot.writeI32(struct.errorCode); BitSet optionals = new BitSet(); if (struct.isSetSqlState()) { optionals.set(0); } if (struct.isSetUpdateCounts()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSqlState()) { oprot.writeString(struct.sqlState); } if (struct.isSetUpdateCounts()) { { oprot.writeI32(struct.updateCounts.size()); for (int _iter116 : struct.updateCounts) { oprot.writeI32(_iter116); } } } }