org.apache.hadoop.hbase.thrift.generated
Class Mutation

java.lang.Object
  extended by org.apache.hadoop.hbase.thrift.generated.Mutation
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Mutation>, org.apache.thrift.TBase<Mutation,Mutation._Fields>

public class Mutation
extends Object
implements org.apache.thrift.TBase<Mutation,Mutation._Fields>, Serializable, Cloneable

A Mutation object is used to either update or delete a column-value.

See Also:
Serialized Form

Nested Class Summary
static class Mutation._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
 ByteBuffer column
           
 boolean isDelete
           
static Map<Mutation._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 ByteBuffer value
           
 boolean writeToWAL
           
 
Constructor Summary
Mutation()
           
Mutation(boolean isDelete, ByteBuffer column, ByteBuffer value, boolean writeToWAL)
           
Mutation(Mutation other)
          Performs a deep copy on other.
 
Method Summary
 ByteBuffer bufferForColumn()
           
 ByteBuffer bufferForValue()
           
 void clear()
           
 int compareTo(Mutation other)
           
 Mutation deepCopy()
           
 boolean equals(Mutation that)
           
 boolean equals(Object that)
           
 Mutation._Fields fieldForId(int fieldId)
           
 byte[] getColumn()
           
 Object getFieldValue(Mutation._Fields field)
           
 byte[] getValue()
           
 int hashCode()
           
 boolean isIsDelete()
           
 boolean isSet(Mutation._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetColumn()
          Returns true if field column is set (has been assigned a value) and false otherwise
 boolean isSetIsDelete()
          Returns true if field isDelete is set (has been assigned a value) and false otherwise
 boolean isSetValue()
          Returns true if field value is set (has been assigned a value) and false otherwise
 boolean isSetWriteToWAL()
          Returns true if field writeToWAL is set (has been assigned a value) and false otherwise
 boolean isWriteToWAL()
           
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 Mutation setColumn(byte[] column)
           
 Mutation setColumn(ByteBuffer column)
           
 void setColumnIsSet(boolean value)
           
 void setFieldValue(Mutation._Fields field, Object value)
           
 Mutation setIsDelete(boolean isDelete)
           
 void setIsDeleteIsSet(boolean value)
           
 Mutation setValue(byte[] value)
           
 Mutation setValue(ByteBuffer value)
           
 void setValueIsSet(boolean value)
           
 Mutation setWriteToWAL(boolean writeToWAL)
           
 void setWriteToWALIsSet(boolean value)
           
 String toString()
           
 void unsetColumn()
           
 void unsetIsDelete()
           
 void unsetValue()
           
 void unsetWriteToWAL()
           
 void validate()
           
 void write(org.apache.thrift.protocol.TProtocol oprot)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

isDelete

public boolean isDelete

column

public ByteBuffer column

value

public ByteBuffer value

writeToWAL

public boolean writeToWAL

metaDataMap

public static final Map<Mutation._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

Mutation

public Mutation()

Mutation

public Mutation(boolean isDelete,
                ByteBuffer column,
                ByteBuffer value,
                boolean writeToWAL)

Mutation

public Mutation(Mutation other)
Performs a deep copy on other.

Method Detail

deepCopy

public Mutation deepCopy()
Specified by:
deepCopy in interface org.apache.thrift.TBase<Mutation,Mutation._Fields>

clear

public void clear()
Specified by:
clear in interface org.apache.thrift.TBase<Mutation,Mutation._Fields>

isIsDelete

public boolean isIsDelete()

setIsDelete

public Mutation setIsDelete(boolean isDelete)

unsetIsDelete

public void unsetIsDelete()

isSetIsDelete

public boolean isSetIsDelete()
Returns true if field isDelete is set (has been assigned a value) and false otherwise


setIsDeleteIsSet

public void setIsDeleteIsSet(boolean value)

getColumn

public byte[] getColumn()

bufferForColumn

public ByteBuffer bufferForColumn()

setColumn

public Mutation setColumn(byte[] column)

setColumn

public Mutation setColumn(ByteBuffer column)

unsetColumn

public void unsetColumn()

isSetColumn

public boolean isSetColumn()
Returns true if field column is set (has been assigned a value) and false otherwise


setColumnIsSet

public void setColumnIsSet(boolean value)

getValue

public byte[] getValue()

bufferForValue

public ByteBuffer bufferForValue()

setValue

public Mutation setValue(byte[] value)

setValue

public Mutation setValue(ByteBuffer value)

unsetValue

public void unsetValue()

isSetValue

public boolean isSetValue()
Returns true if field value is set (has been assigned a value) and false otherwise


setValueIsSet

public void setValueIsSet(boolean value)

isWriteToWAL

public boolean isWriteToWAL()

setWriteToWAL

public Mutation setWriteToWAL(boolean writeToWAL)

unsetWriteToWAL

public void unsetWriteToWAL()

isSetWriteToWAL

public boolean isSetWriteToWAL()
Returns true if field writeToWAL is set (has been assigned a value) and false otherwise


setWriteToWALIsSet

public void setWriteToWALIsSet(boolean value)

setFieldValue

public void setFieldValue(Mutation._Fields field,
                          Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase<Mutation,Mutation._Fields>

getFieldValue

public Object getFieldValue(Mutation._Fields field)
Specified by:
getFieldValue in interface org.apache.thrift.TBase<Mutation,Mutation._Fields>

isSet

public boolean isSet(Mutation._Fields field)
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise

Specified by:
isSet in interface org.apache.thrift.TBase<Mutation,Mutation._Fields>

equals

public boolean equals(Object that)
Overrides:
equals in class Object

equals

public boolean equals(Mutation that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Mutation other)
Specified by:
compareTo in interface Comparable<Mutation>

fieldForId

public Mutation._Fields fieldForId(int fieldId)
Specified by:
fieldForId in interface org.apache.thrift.TBase<Mutation,Mutation._Fields>

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<Mutation,Mutation._Fields>
Throws:
org.apache.thrift.TException

write

public void write(org.apache.thrift.protocol.TProtocol oprot)
           throws org.apache.thrift.TException
Specified by:
write in interface org.apache.thrift.TBase<Mutation,Mutation._Fields>
Throws:
org.apache.thrift.TException

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
              throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.