org.apache.cassandra.service
Class SliceRange

java.lang.Object
  extended by org.apache.cassandra.service.SliceRange
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<SliceRange>, org.apache.thrift.TBase

public class SliceRange
extends java.lang.Object
implements org.apache.thrift.TBase, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<SliceRange>

A slice range is a structure that stores basic range, ordering and limit information for a query that will return multiple columns. It could be thought of as Cassandra's version of LIMIT and ORDER BY

See Also:
Serialized Form

Field Summary
 int count
           
static int COUNT
           
 byte[] finish
           
static int FINISH
           
static java.util.Map<java.lang.Integer,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 boolean reversed
           
static int REVERSED
           
 byte[] start
           
static int START
           
 
Constructor Summary
SliceRange()
           
SliceRange(byte[] start, byte[] finish, boolean reversed, int count)
           
SliceRange(SliceRange other)
          Performs a deep copy on other.
 
Method Summary
 SliceRange clone()
          Deprecated. 
 int compareTo(SliceRange other)
           
 SliceRange deepCopy()
           
 boolean equals(java.lang.Object that)
           
 boolean equals(SliceRange that)
           
 int getCount()
           
 java.lang.Object getFieldValue(int fieldID)
           
 byte[] getFinish()
           
 byte[] getStart()
           
 int hashCode()
           
 boolean isReversed()
           
 boolean isSet(int fieldID)
           
 boolean isSetCount()
           
 boolean isSetFinish()
           
 boolean isSetReversed()
           
 boolean isSetStart()
           
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 SliceRange setCount(int count)
           
 void setCountIsSet(boolean value)
           
 void setFieldValue(int fieldID, java.lang.Object value)
           
 SliceRange setFinish(byte[] finish)
           
 void setFinishIsSet(boolean value)
           
 SliceRange setReversed(boolean reversed)
           
 void setReversedIsSet(boolean value)
           
 SliceRange setStart(byte[] start)
           
 void setStartIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetCount()
           
 void unsetFinish()
           
 void unsetReversed()
           
 void unsetStart()
           
 void validate()
           
 void write(org.apache.thrift.protocol.TProtocol oprot)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

start

public byte[] start

finish

public byte[] finish

reversed

public boolean reversed

count

public int count

START

public static final int START
See Also:
Constant Field Values

FINISH

public static final int FINISH
See Also:
Constant Field Values

REVERSED

public static final int REVERSED
See Also:
Constant Field Values

COUNT

public static final int COUNT
See Also:
Constant Field Values

metaDataMap

public static final java.util.Map<java.lang.Integer,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

SliceRange

public SliceRange()

SliceRange

public SliceRange(byte[] start,
                  byte[] finish,
                  boolean reversed,
                  int count)

SliceRange

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

Method Detail

deepCopy

public SliceRange deepCopy()
Specified by:
deepCopy in interface org.apache.thrift.TBase

clone

@Deprecated
public SliceRange clone()
Deprecated. 

Overrides:
clone in class java.lang.Object

getStart

public byte[] getStart()

setStart

public SliceRange setStart(byte[] start)

unsetStart

public void unsetStart()

isSetStart

public boolean isSetStart()

setStartIsSet

public void setStartIsSet(boolean value)

getFinish

public byte[] getFinish()

setFinish

public SliceRange setFinish(byte[] finish)

unsetFinish

public void unsetFinish()

isSetFinish

public boolean isSetFinish()

setFinishIsSet

public void setFinishIsSet(boolean value)

isReversed

public boolean isReversed()

setReversed

public SliceRange setReversed(boolean reversed)

unsetReversed

public void unsetReversed()

isSetReversed

public boolean isSetReversed()

setReversedIsSet

public void setReversedIsSet(boolean value)

getCount

public int getCount()

setCount

public SliceRange setCount(int count)

unsetCount

public void unsetCount()

isSetCount

public boolean isSetCount()

setCountIsSet

public void setCountIsSet(boolean value)

setFieldValue

public void setFieldValue(int fieldID,
                          java.lang.Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase

getFieldValue

public java.lang.Object getFieldValue(int fieldID)
Specified by:
getFieldValue in interface org.apache.thrift.TBase

isSet

public boolean isSet(int fieldID)
Specified by:
isSet in interface org.apache.thrift.TBase

equals

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

equals

public boolean equals(SliceRange that)

hashCode

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

compareTo

public int compareTo(SliceRange other)
Specified by:
compareTo in interface java.lang.Comparable<SliceRange>

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase
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
Throws:
org.apache.thrift.TException

toString

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

validate

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


Copyright © 2010 The Apache Software Foundation