public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (decimal_val != null) { decimal_val.validate(); } if (timestamp_val != null) { timestamp_val.validate(); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, Decimal struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(SIGNUM_FIELD_DESC); oprot.writeByte(struct.signum); oprot.writeFieldEnd(); oprot.writeFieldBegin(SCALE_FIELD_DESC); oprot.writeI32(struct.scale); oprot.writeFieldEnd(); if (struct.magnitude != null) { oprot.writeFieldBegin(MAGNITUDE_FIELD_DESC); oprot.writeBinary(struct.magnitude); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
throw new org.apache.thrift.protocol.TProtocolException("Required field 'scale' was not found in serialized data! Struct: " + toString()); struct.validate();
public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (decimal_val != null) { decimal_val.validate(); } if (date_val != null) { date_val.validate(); } if (time_val != null) { time_val.validate(); } if (timestamp_val != null) { timestamp_val.validate(); } if (blob_val != null) { blob_val.validate(); } if (clob_val != null) { clob_val.validate(); } if (pdx_val != null) { pdx_val.validate(); } if (json_val != null) { json_val.validate(); } }