public interface DatasetOperations
Dataset operations against a specific
DatasetRepository. Implemented by DatasetTemplate.| Modifier and Type | Method and Description |
|---|---|
void |
execute(DatasetRepositoryCallback callback)
Execute a callback for the
DatasetRepository |
<T> org.kitesdk.data.DatasetDescriptor |
getDatasetDescriptor(java.lang.Class<T> targetClass)
Get the
DatasetDescriptor for the given class |
<T> java.lang.String |
getDatasetName(java.lang.Class<T> targetClass)
Get the dataset name to be used for the given class
|
<T> java.util.Collection<T> |
read(java.lang.Class<T> targetClass)
Read all records in the dataset and return as a collection.
|
<T> void |
read(java.lang.Class<T> targetClass,
RecordCallback<T> callback)
Read all records in the dataset and call the provided callback for each record.
|
<T> void |
read(java.lang.Class<T> targetClass,
RecordCallback<T> callback,
ViewCallback viewCallback)
Read records in the dataset partition based on a
RefinableView and call the provided callback for each record. |
<T> java.util.Collection<T> |
read(java.lang.Class<T> targetClass,
ViewCallback viewCallback)
Read records in the dataset partition based on the
RefinableView and return as a collection. |
<T> void |
write(java.util.Collection<T> records)
Write all records provided in the record collection
|
<T> void read(java.lang.Class<T> targetClass,
RecordCallback<T> callback)
T - the class typetargetClass - the class that is stored in the datasetcallback - the callback to be called for each record<T> java.util.Collection<T> read(java.lang.Class<T> targetClass)
T - the class typetargetClass - the class that is stored in the dataset<T> void read(java.lang.Class<T> targetClass,
RecordCallback<T> callback,
ViewCallback viewCallback)
RefinableView and call the provided callback for each record.T - the class typetargetClass - the class that is stored in the datasetcallback - the callback to be called for each recordviewCallback - the view callback to create the view<T> java.util.Collection<T> read(java.lang.Class<T> targetClass,
ViewCallback viewCallback)
RefinableView and return as a collection.T - the class typetargetClass - the class that is stored in the datasetviewCallback - the view callback to create the view<T> void write(java.util.Collection<T> records)
T - the class typerecords - the records to writevoid execute(DatasetRepositoryCallback callback)
DatasetRepositorycallback - the callback<T> org.kitesdk.data.DatasetDescriptor getDatasetDescriptor(java.lang.Class<T> targetClass)
DatasetDescriptor for the given classT - the class typetargetClass - the class stored in the dataset<T> java.lang.String getDatasetName(java.lang.Class<T> targetClass)
T - the class typetargetClass - the class stored in the dataset