com.baidubce.services.tablestorage.model
Class ScanRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.tablestorage.model.AbstractTableStorageRequest
          extended by com.baidubce.services.tablestorage.model.ScanRequest

public class ScanRequest
extends AbstractTableStorageRequest

Represent the request for Scan operation.


Constructor Summary
ScanRequest(String tableName)
          Constructs a scan request with target table name.
 
Method Summary
 ScanRequest addSelector(String column)
          Add a cell with column name to this get object.
protected static void checkScanRequest(ScanRequest request)
          Check this table storage row object
 int getLimit()
          Get the limit number of returned records corresponding to this request.
 int getMaxVersions()
          Get the maxVersions of this scan request.
 List<TableStorageCell> getSelectors()
          Get all cell objects in this request
 String getStartRowkey()
          Get the start rowkey of this scan request.
 String getStopRowkey()
          Get the stop rowkey of this scan request.
 boolean isIncludeStart()
          Whether this scan request includes start rowkey.
 boolean isIncludeStop()
          Whether this scan request includes stop rowkey.
 void setLimit(int limit)
          Set the limit number of returned records corresponding to this request.
 void setMaxVersions(int maxVersions)
          Set the maxVersions to this scan request.
 void setStartRowkey(String startRowkey, boolean includeStart)
          Set the start rowkey and include start rowkey to this scan request.
 void setStopRowkey(String stopRowkey, boolean includeStop)
          Set the stop rowkey and include stop rowkey to this scan request.
 String toJsonString()
          Convert this scan request to json string.
 
Methods inherited from class com.baidubce.services.tablestorage.model.AbstractTableStorageRequest
getTableName, withRequestCredentials
 
Methods inherited from class com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScanRequest

public ScanRequest(String tableName)
Constructs a scan request with target table name.

Parameters:
tableName - The target table name.
Method Detail

getStartRowkey

public String getStartRowkey()
Get the start rowkey of this scan request.

Returns:
The start rowkey of this scan request.

setStartRowkey

public void setStartRowkey(String startRowkey,
                           boolean includeStart)
Set the start rowkey and include start rowkey to this scan request.

Parameters:
startRowkey - The start rowkey set to this scan request.
includeStart - Set true if want this scan request include start rowkey, otherwise false.

isIncludeStart

public boolean isIncludeStart()
Whether this scan request includes start rowkey.

Returns:
Return true if this scan request includes start rowkey, otherwise false.

getStopRowkey

public String getStopRowkey()
Get the stop rowkey of this scan request.

Returns:
The stop rowkey of this scan request.

setStopRowkey

public void setStopRowkey(String stopRowkey,
                          boolean includeStop)
Set the stop rowkey and include stop rowkey to this scan request.

Parameters:
stopRowkey - The stop rowkey set to this scan request.
includeStop - Set true if want this scan request include stop rowkey, otherwise false.

isIncludeStop

public boolean isIncludeStop()
Whether this scan request includes stop rowkey.

Returns:
Return true if this scan request includes stop rowkey, otherwise false.

getLimit

public int getLimit()
Get the limit number of returned records corresponding to this request.

Returns:
The value of the limit.

setLimit

public void setLimit(int limit)
Set the limit number of returned records corresponding to this request.

Parameters:
limit - The value set to the limit.

getMaxVersions

public int getMaxVersions()
Get the maxVersions of this scan request. Multiple versions is a advance function of TableStorage, which will release to public in the future.


setMaxVersions

public void setMaxVersions(int maxVersions)
Set the maxVersions to this scan request. Multiple versions is a advance feature of TableStorage, which will release to public in the future.

Parameters:
maxVersions - The value set to maxVersions.

getSelectors

public List<TableStorageCell> getSelectors()
Get all cell objects in this request

Returns:
Return the list of all cell objects

addSelector

public ScanRequest addSelector(String column)
Add a cell with column name to this get object.

Parameters:
column - The column name of this cell.
Returns:
This scan request object.

checkScanRequest

protected static void checkScanRequest(ScanRequest request)
Check this table storage row object


toJsonString

public String toJsonString()
Convert this scan request to json string.

Specified by:
toJsonString in class AbstractTableStorageRequest
Returns:
The json string represent this scan request.


Copyright © 2020. All rights reserved.