org.apache.hcatalog.data
Class DefaultHCatRecord

java.lang.Object
  extended by org.apache.hcatalog.data.HCatRecord
      extended by org.apache.hcatalog.data.DefaultHCatRecord
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<java.lang.Object>, HCatRecordable

public class DefaultHCatRecord
extends HCatRecord


Constructor Summary
DefaultHCatRecord()
           
DefaultHCatRecord(int size)
           
DefaultHCatRecord(java.util.List<java.lang.Object> list)
           
 
Method Summary
 int compareTo(java.lang.Object that)
           
 boolean equals(java.lang.Object other)
           
 java.lang.Object get(int fieldNum)
          Gets the field at the specified index.
 java.lang.Object get(java.lang.String fieldName, HCatSchema recordSchema)
           
 java.util.List<java.lang.Object> getAll()
          Gets all the fields of the hcat record.
 int hashCode()
           
 void readFields(java.io.DataInput in)
           
 void remove(int idx)
           
 void set(int fieldNum, java.lang.Object val)
          Sets the field at the specified index.
 void set(java.lang.String fieldName, HCatSchema recordSchema, java.lang.Object value)
           
 int size()
          Gets the size of the hcat record.
 java.lang.String toString()
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class org.apache.hcatalog.data.HCatRecord
get, getBoolean, getByte, getDouble, getFloat, getInteger, getList, getLong, getMap, getShort, getString, getStruct, setBoolean, setByte, setDouble, setFloat, setInteger, setList, setLong, setMap, setShort, setString, setStruct
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultHCatRecord

public DefaultHCatRecord()

DefaultHCatRecord

public DefaultHCatRecord(int size)

DefaultHCatRecord

public DefaultHCatRecord(java.util.List<java.lang.Object> list)
Method Detail

remove

public void remove(int idx)
            throws HCatException
Specified by:
remove in class HCatRecord
Throws:
HCatException

get

public java.lang.Object get(int fieldNum)
Description copied from interface: HCatRecordable
Gets the field at the specified index.

Parameters:
fieldNum - the field number
Returns:
the object at the specified index

getAll

public java.util.List<java.lang.Object> getAll()
Description copied from interface: HCatRecordable
Gets all the fields of the hcat record.

Returns:
the list of fields

set

public void set(int fieldNum,
                java.lang.Object val)
Description copied from interface: HCatRecordable
Sets the field at the specified index.

Parameters:
fieldNum - the field number
val - the value to set

size

public int size()
Description copied from interface: HCatRecordable
Gets the size of the hcat record.

Returns:
the size

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Throws:
java.io.IOException

compareTo

public int compareTo(java.lang.Object that)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

get

public java.lang.Object get(java.lang.String fieldName,
                            HCatSchema recordSchema)
                     throws HCatException
Specified by:
get in class HCatRecord
Throws:
HCatException

set

public void set(java.lang.String fieldName,
                HCatSchema recordSchema,
                java.lang.Object value)
         throws HCatException
Specified by:
set in class HCatRecord
Throws:
HCatException