com.aliyun.openservices.ots.model
类 RangeIteratorParameter

java.lang.Object
  继承者 com.aliyun.openservices.ots.model.RowQueryCriteria
      继承者 com.aliyun.openservices.ots.model.RangeIteratorParameter

public class RangeIteratorParameter
extends RowQueryCriteria

表示获取表(Table)中主键(Primary Key)的特定范围内多行数据的查询条件。


构造方法摘要
RangeIteratorParameter(String tableName)
          构造一个在给定名称的表中查询的条件。
 
方法摘要
 int getBufferSize()
          获取内部Buffer的大小。
 int getCount()
          获取操作时返回的最大行数。
 Direction getDirection()
          获取范围查询的读取顺序(正序(FORWARD)或反序(BACKWARD))。
 RowPrimaryKey getExclusiveEndPrimaryKey()
          获取范围查询的右边界的主键值。
 RowPrimaryKey getInclusiveStartPrimaryKey()
          获取范围查询的左边界的主键值。
 void setBufferSize(int bufferSize)
          设置Buffer的大小。
 void setCount(int count)
          设置查询时单次请求返回的行数。
 void setDirection(Direction direction)
          设置范围查询的读取顺序(正序(FORWARD)或反序(BACKWARD))。
 void setExclusiveEndPrimaryKey(RowPrimaryKey exclusiveEndPrimaryKey)
          范围查询需要用户指定一个主键的范围,该范围是一个左闭右开的区间,exclusiveEndPrimaryKey为该区间的右边界。
 void setInclusiveStartPrimaryKey(RowPrimaryKey inclusiveStartPrimaryKey)
          范围查询需要用户指定一个主键的范围,该范围是一个左闭右开的区间,inclusiveStartPrimaryKey为该区间的左边界。
 
从类 com.aliyun.openservices.ots.model.RowQueryCriteria 继承的方法
addColumnsToGet, addColumnsToGet, getColumnsToGet, getTableName, setColumnsToGet, setTableName
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

RangeIteratorParameter

public RangeIteratorParameter(String tableName)
构造一个在给定名称的表中查询的条件。

参数:
tableName - 查询的表名。
方法详细信息

getCount

public int getCount()
获取操作时返回的最大行数。 -1 表示返回该范围内的所有行(默认值)。

返回:
本次操作返回的最大行数。

setCount

public void setCount(int count)
设置查询时单次请求返回的行数。 -1 表示全部符合条件的数据行(默认值)。

参数:
limit - 单次请求返回的行数。

getBufferSize

public int getBufferSize()
获取内部Buffer的大小。

返回:
Buffer的大小。

setBufferSize

public void setBufferSize(int bufferSize)
设置Buffer的大小。

参数:
bufferSize - Buffer的大小。

getDirection

public Direction getDirection()
获取范围查询的读取顺序(正序(FORWARD)或反序(BACKWARD))。

返回:
读取顺序

setDirection

public void setDirection(Direction direction)
设置范围查询的读取顺序(正序(FORWARD)或反序(BACKWARD))。

参数:
direction - 读取顺序

getInclusiveStartPrimaryKey

public RowPrimaryKey getInclusiveStartPrimaryKey()
获取范围查询的左边界的主键值。

返回:
范围查询的左边界的主键值。

setInclusiveStartPrimaryKey

public void setInclusiveStartPrimaryKey(RowPrimaryKey inclusiveStartPrimaryKey)
范围查询需要用户指定一个主键的范围,该范围是一个左闭右开的区间,inclusiveStartPrimaryKey为该区间的左边界。 若direction为FORWARD,则inclusiveStartPrimaryKey必须小于exclusiveEndPrimaryKey。 若direction为BACKWARD,则inclusiveStartPrimaryKey必须大于exclusiveEndPrimaryKey。 inclusiveStartPrimaryKey必须包含表中定义的所有主键列,列的值可以定义PrimaryKeyRange.INF_MIN或者PrimaryKeyRange.INF_MAX用于表示该列的所有取值范围。

参数:
inclusiveStartPrimaryKey - 范围查询的左边界的主键值。

getExclusiveEndPrimaryKey

public RowPrimaryKey getExclusiveEndPrimaryKey()
获取范围查询的右边界的主键值。

返回:
范围查询的右边界的主键值。

setExclusiveEndPrimaryKey

public void setExclusiveEndPrimaryKey(RowPrimaryKey exclusiveEndPrimaryKey)
范围查询需要用户指定一个主键的范围,该范围是一个左闭右开的区间,exclusiveEndPrimaryKey为该区间的右边界。 若direction为FORWARD,则exclusiveEndPrimaryKey必须大于inclusiveStartPrimaryKey。 若direction为BACKWARD,则exclusiveEndPrimaryKey必须小于inclusiveStartPrimaryKey。 exclusiveEndPrimaryKey必须包含表中定义的所有主键列,列的值可以定义PrimaryKeyRange.INF_MIN或者PrimaryKeyRange.INF_MAX用于表示该列的所有取值范围。

参数:
exclusiveEndPrimaryKey - 范围查询的右边界的主键值。


Copyright © 2014. All Rights Reserved.