public CliThriftException deepCopy() { return new CliThriftException(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof CliThriftException) return this.equals((CliThriftException)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case ERROR_CODE: return getErrorCode(); case MESSAGE: return getMessage(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ERROR_CODE: if (value == null) { unsetErrorCode(); } else { setErrorCode((Integer)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((String)value); } break; } }
/** 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 ERROR_CODE: return isSetErrorCode(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, shutdown_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.cliException = new CliThriftException(); struct.cliException.read(iprot); struct.setCliExceptionIsSet(true); } } }
if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.errorCode = iprot.readI32(); struct.setErrorCodeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readString(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, CliThriftException struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.errorCode = iprot.readI32(); struct.setErrorCodeIsSet(true); } if (incoming.get(1)) { struct.message = iprot.readString(); struct.setMessageIsSet(true); } } }
public CliThriftException( int errorCode, String message) { this(); this.errorCode = errorCode; setErrorCodeIsSet(true); this.message = message; }
/** * Performs a deep copy on <i>other</i>. */ public CliThriftException(CliThriftException other) { __isset_bitfield = other.__isset_bitfield; this.errorCode = other.errorCode; if (other.isSetMessage()) { this.message = other.message; } }
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); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, shutdown_result 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: // CLI_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.cliException = new CliThriftException(); struct.cliException.read(iprot); struct.setCliExceptionIsSet(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(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, CliThriftException struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetErrorCode()) { optionals.set(0); } if (struct.isSetMessage()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetErrorCode()) { oprot.writeI32(struct.errorCode); } if (struct.isSetMessage()) { oprot.writeString(struct.message); } }
@Override public void clear() { setErrorCodeIsSet(false); this.errorCode = 0; this.message = null; }
public boolean equals(CliThriftException that) { if (that == null) return false; boolean this_present_errorCode = true; boolean that_present_errorCode = true; if (this_present_errorCode || that_present_errorCode) { if (!(this_present_errorCode && that_present_errorCode)) return false; if (this.errorCode != that.errorCode) return false; } boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } return true; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, serverName_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.cliException = new CliThriftException(); struct.cliException.read(iprot); struct.setCliExceptionIsSet(true); } } }
@Override public int compareTo(CliThriftException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorCode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** * Performs a deep copy on <i>other</i>. */ public shutdown_result(shutdown_result other) { if (other.isSetCliException()) { this.cliException = new CliThriftException(other.cliException); } }
public boolean equals(shutdown_result that) { if (that == null) return false; boolean this_present_cliException = true && this.isSetCliException(); boolean that_present_cliException = true && that.isSetCliException(); if (this_present_cliException || that_present_cliException) { if (!(this_present_cliException && that_present_cliException)) return false; if (!this.cliException.equals(that.cliException)) return false; } return true; }
public CliThriftException setErrorCode(int errorCode) { this.errorCode = errorCode; setErrorCodeIsSet(true); return this; }