コード例 #1
0
 @Override
 public void clear() {
   setTimestampIsSet(false);
   this.timestamp = 0;
   setWhatIsSet(false);
   this.what = 0;
   this.why = null;
 }
コード例 #2
0
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // TIMESTAMP
          if (field.type == TType.I64) {
            this.timestamp = iprot.readI64();
            setTimestampIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // WHAT
          if (field.type == TType.I32) {
            this.what = iprot.readI32();
            setWhatIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // WHY
          if (field.type == TType.STRING) {
            this.why = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
コード例 #3
0
 public HibariException setWhat(int what) {
   this.what = what;
   setWhatIsSet(true);
   return this;
 }
コード例 #4
0
 public HibariException(int what, String why) {
   this();
   this.what = what;
   setWhatIsSet(true);
   this.why = why;
 }