public abstract class DatasetUtils
extends java.lang.Object
Dataset
s, DatasetReader
s and
DatasetWriter
sConstructor and Description |
---|
DatasetUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> org.kitesdk.data.Dataset<T> |
getDataset(DatasetRepositoryFactory dsFactory,
java.lang.Class<T> pojoClass)
Gets the dataset using a
DatasetRepositoryFactory and
a pojo class. |
static <T> java.lang.String |
getDatasetName(java.lang.Class<T> clazz)
Gets the dataset name.
|
static <T> org.kitesdk.data.Dataset<T> |
getOrCreateDataset(DatasetRepositoryFactory dsFactory,
DatasetDefinition datasetDefinition,
java.lang.Class<?> pojoClass,
java.lang.Class<T> recordClass)
|
public static <T> java.lang.String getDatasetName(java.lang.Class<T> clazz)
Class.getSimpleName()
and gets a lower case name.T
- the generic class typeclazz
- the clazzpublic static <T> org.kitesdk.data.Dataset<T> getOrCreateDataset(DatasetRepositoryFactory dsFactory, DatasetDefinition datasetDefinition, java.lang.Class<?> pojoClass, java.lang.Class<T> recordClass)
Dataset
using a DatasetRepositoryFactory
,
DatasetDefinition
, pojo class and a record class. Dataset
is created if it doesn't exist.T
- the generic record class typedsFactory
- the dataset repository factorydatasetDefinition
- the dataset definitionpojoClass
- the pojo classrecordClass
- the record classpublic static <T> org.kitesdk.data.Dataset<T> getDataset(DatasetRepositoryFactory dsFactory, java.lang.Class<T> pojoClass)
DatasetRepositoryFactory
and
a pojo class. Passed class is a same used in "pojoClass"
T
- the generic typedsFactory
- the ds factorypojoClass
- the pojo class