public class RecipeStore extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CREATE_TIME_COL |
static String |
GENERATION_COL |
static String |
NAMESPACE_FIELD |
static String |
RECIPE_ID_FIELD |
static String |
RECIPE_INFO_COL |
static String |
RECIPE_NAME_FIELD |
static io.cdap.cdap.spi.data.table.StructuredTableSpecification |
RECIPE_TABLE_SPEC |
static String |
UPDATE_TIME_COL |
| Constructor and Description |
|---|
RecipeStore(io.cdap.cdap.spi.data.transaction.TransactionRunner transactionRunner) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
createRecipe(RecipeId recipeId,
RecipeRow recipeRow)
Create a new recipe
|
void |
deleteRecipe(RecipeId recipeId)
Delete the specified Recipe
|
Recipe |
getRecipeById(RecipeId recipeId)
Get the Recipe associated with given recipe Id
|
Recipe |
getRecipeByName(io.cdap.cdap.api.NamespaceSummary namespace,
String recipeName)
Get the Recipe associated with given recipe name if it exists, else throws
RecipeNotFoundException |
RecipeListResponse |
listRecipes(RecipePageRequest request)
Get a paginated list of recipes in given namespace
|
void |
updateRecipe(RecipeId recipeId,
RecipeRow recipeRow)
Update a recipe
|
public static final String NAMESPACE_FIELD
public static final String GENERATION_COL
public static final String RECIPE_ID_FIELD
public static final String RECIPE_NAME_FIELD
public static final String CREATE_TIME_COL
public static final String UPDATE_TIME_COL
public static final String RECIPE_INFO_COL
public static final io.cdap.cdap.spi.data.table.StructuredTableSpecification RECIPE_TABLE_SPEC
public RecipeStore(io.cdap.cdap.spi.data.transaction.TransactionRunner transactionRunner)
public void createRecipe(RecipeId recipeId, RecipeRow recipeRow)
recipeId - id of the reciperecipeRow - recipe to create/updatepublic void updateRecipe(RecipeId recipeId, RecipeRow recipeRow)
recipeId - id of the reciperecipeRow - recipe to create/updatepublic Recipe getRecipeById(RecipeId recipeId) throws RecipeNotFoundException
recipeId - id of the recipe to fetchRecipe metadata for given recipe idRecipeNotFoundException - if recipe is not foundpublic Recipe getRecipeByName(io.cdap.cdap.api.NamespaceSummary namespace, String recipeName) throws RecipeNotFoundException
RecipeNotFoundExceptionnamespace - recipeName - Recipe metadata for given recipe name if existsRecipeNotFoundExceptionpublic RecipeListResponse listRecipes(RecipePageRequest request)
request - RecipePageRequest that contains necessary query parametersRecipeListResponse that contains a page of results and nextPageTokenpublic void deleteRecipe(RecipeId recipeId) throws RecipeNotFoundException
recipeId - id of the recipe to deleteRecipeNotFoundException - if recipe with given id is not foundpublic void clear()
Copyright © 2023 CDAP Licensed under the Apache License, Version 2.0.