org.apache.thrift
Interface TBase<T extends TBase,F extends TFieldIdEnum>

All Superinterfaces:
java.lang.Comparable<T>, java.io.Serializable
All Known Implementing Classes:
TUnion

public interface TBase<T extends TBase,F extends TFieldIdEnum>
extends java.lang.Comparable<T>, java.io.Serializable

Generic base interface for generated Thrift objects.


Method Summary
 TBase<T,F> deepCopy()
           
 java.lang.Object getFieldValue(F field)
          Get a field's value by field variable.
 java.lang.Object getFieldValue(int fieldId)
          Deprecated. 
 boolean isSet(F field)
          Check if a field is currently set or unset.
 boolean isSet(int fieldId)
          Deprecated. 
 void read(TProtocol iprot)
          Reads the TObject from the given input protocol.
 void setFieldValue(F field, java.lang.Object value)
          Set a field's value by field variable.
 void setFieldValue(int fieldId, java.lang.Object value)
          Deprecated. 
 void write(TProtocol oprot)
          Writes the objects out to the protocol
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

read

void read(TProtocol iprot)
          throws TException
Reads the TObject from the given input protocol.

Parameters:
iprot - Input protocol
Throws:
TException

write

void write(TProtocol oprot)
           throws TException
Writes the objects out to the protocol

Parameters:
oprot - Output protocol
Throws:
TException

isSet

@Deprecated
boolean isSet(int fieldId)
Deprecated. 

Check if a field is currently set or unset.

Parameters:
fieldId - The field's id tag as found in the IDL.

isSet

boolean isSet(F field)
Check if a field is currently set or unset.

Parameters:
field -

getFieldValue

@Deprecated
java.lang.Object getFieldValue(int fieldId)
Deprecated. 

Get a field's value by id. Primitive types will be wrapped in the appropriate "boxed" types.

Parameters:
fieldId - The field's id tag as found in the IDL.

getFieldValue

java.lang.Object getFieldValue(F field)
Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.

Parameters:
field -

setFieldValue

@Deprecated
void setFieldValue(int fieldId,
                              java.lang.Object value)
Deprecated. 

Set a field's value by id. Primitive types must be "boxed" in the appropriate object wrapper type.

Parameters:
fieldId - The field's id tag as found in the IDL.

setFieldValue

void setFieldValue(F field,
                   java.lang.Object value)
Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.

Parameters:
field -

deepCopy

TBase<T,F> deepCopy()