package tw.kewang.hbase.dao.scan;

import org.apache.hadoop.hbase.client.Scan;

public class ScanBuilder {
	private Scan scan = new Scan();

	public ScanBuilder setCaching(int caching) {
		scan.setCaching(caching);

		return this;
	}

	public ScanBuilder setMaxVersions(int maxVersions) {
		scan.setMaxVersions(maxVersions);

		return this;
	}

	public ScanBuilder setStartRow(byte[] startRow) {
		scan.setStartRow(startRow);

		return this;
	}

	public ScanBuilder setStopRow(byte[] stopRow) {
		scan.setStopRow(stopRow);

		return this;
	}

	public Scan create() {
		return scan;
	}
}
@@ -76,35 +76,261 @@
 an;%0A
-%0Apublic class ScanBuilder %7B
+import org.apache.hadoop.hbase.filter.Filter;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport tw.kewang.hbase.dao.Constants;%0A%0Apublic class ScanBuilder %7B%0A%09private static final Logger LOG = LoggerFactory%0A%09%09%09.getLogger(ScanBuilder.class);%0A
 %0A%09pr
@@ -446,32 +446,118 @@
 eturn this;%0A%09%7D%0A%0A
+%09public ScanBuilder setBatch(int batch) %7B%0A%09%09scan.setBatch(batch);%0A%0A%09%09return this;%0A%09%7D%0A%0A
 %09public ScanBuil
@@ -840,32 +840,540 @@
 eturn this;%0A%09%7D%0A%0A
+%09public ScanBuilder setReversed(boolean reversed) %7B%0A%09%09scan.setReversed(reversed);%0A%0A%09%09return this;%0A%09%7D%0A%0A%09public ScanBuilder setFilter(Filter filter) %7B%0A%09%09scan.setFilter(filter);%0A%0A%09%09return this;%0A%09%7D%0A%0A%09public ScanBuilder setTimeRange(long minStamp, long maxStamp) %7B%0A%09%09try %7B%0A%09%09%09scan.setTimeRange(minStamp, maxStamp);%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09LOG.error(Constants.EXCEPTION_PREFIX, e);%0A%09%09%7D%0A%0A%09%09return this;%0A%09%7D%0A%0A%09public ScanBuilder setTimeStamp(long timestamp) %7B%0A%09%09scan.setTimeStamp(timestamp);%0A%0A%09%09return this;%0A%09%7D%0A%0A
 %09public Scan cre

Add more scan parameters