private static String getStringValue(TStringValue tStringValue) { if (tStringValue.isSetValue()) { return tStringValue.getValue(); } return null; }
private static TColumnValue stringValue(String value) { TStringValue tStringValue = new TStringValue(); if (value != null) { tStringValue.setValue(value); } return TColumnValue.stringVal(tStringValue); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TStringValue) return this.equals((TStringValue)that); return false; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case VALUE: if (value == null) { unsetValue(); } else { setValue((String)value); } break; } }
if (field.type == STRING_VAL_FIELD_DESC.type) { TStringValue stringVal; stringVal = new TStringValue(); stringVal.read(iprot); return stringVal; } else {
public void write(org.apache.thrift.protocol.TProtocol oprot, TStringValue struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.value != null) { if (struct.isSetValue()) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeString(struct.value); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, TStringValue 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: // VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.value = iprot.readString(); struct.setValueIsSet(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(); struct.validate(); }
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
/** * Performs a deep copy on <i>other</i>. */ public TStringValue(TStringValue other) { if (other.isSetValue()) { this.value = other.value; } }
public Object getFieldValue(_Fields field) { switch (field) { case VALUE: return getValue(); } throw new IllegalStateException(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { 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); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TStringValue struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.value = iprot.readString(); struct.setValueIsSet(true); } } }
if (field.type == STRING_VAL_FIELD_DESC.type) { TStringValue stringVal; stringVal = new TStringValue(); stringVal.read(iprot); return stringVal; } else {
public void setFieldValue(_Fields field, Object value) { switch (field) { case VALUE: if (value == null) { unsetValue(); } else { setValue((String)value); } break; } }
public void write(org.apache.thrift.protocol.TProtocol oprot, TStringValue struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.value != null) { if (struct.isSetValue()) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeString(struct.value); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, TStringValue 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: // VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.value = iprot.readString(); struct.setValueIsSet(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(); struct.validate(); }
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
/** * Performs a deep copy on <i>other</i>. */ public TStringValue(TStringValue other) { if (other.isSetValue()) { this.value = other.value; } }
public Object getFieldValue(_Fields field) { switch (field) { case VALUE: return getValue(); } throw new IllegalStateException(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { 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); } }