Describes a request for columns of data to read from a Kiji table.
KijiDataRequest objects are immutable. To create a KijiDataRequest, use the {@link #builder()} method to get a new {@link KijiDataRequestBuilder} object.Populate the object's fields, then call {@link KijiDataRequestBuilder#build()}.
For example, to request the 3 most recent versions of cell data from a column bar
from the family foo
within the time range [123, 456):
KijiDataRequestBuilder builder = KijiDataRequest.builder() .withTimeRange(123L, 456L); builder.newColumnsDef().withMaxVersions(3).add("foo", "bar"); KijiDataRequest request = builder.build();
Or:
KijiDataRequest dataRequest = KijiDataRequest.builder() .withTimeRange(123L, 456L) .addColumns(KijiDataRequestBuilder.ColumnsDef.create().withMaxVersions(3).add("foo", "bar")) .build();
For convenience, you can also build KijiDataRequests for a single cell using the KijiDataRequest.create()
method:
KijiDataRequest dataRequest = KijiDataRequest.create("info", "foo");
You cannot set any properties of the requested column using this syntax; for further customization, see {@link KijiDataRequestBuilder}.