Interface TaskRepository
-
- All Known Implementing Classes:
DefaultTaskRepository
public interface TaskRepository
A repository providing general operations on tasks.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description TaskRef
create(TaskDefinition definition, boolean replace, boolean ifNotExists)
Creates or replaces task with given definition in the database.TaskRef
fetch(ObjectName objectName)
Provides database reference to task without executing database call.static TaskRepository
getInstance(Session session)
Returns a new instance of the default implementation forTaskRepository
-
-
-
Method Detail
-
create
TaskRef create(TaskDefinition definition, boolean replace, boolean ifNotExists)
Creates or replaces task with given definition in the database.- Parameters:
definition
- set of properties defining task to be createdreplace
- flag to replace task if it existedifNotExists
- flag to create task only when it did not exist- Returns:
- Reference to the created task.
- Throws:
TaskCreationException
- when any of the parameters/properties are incorrect.
-
fetch
TaskRef fetch(ObjectName objectName)
Provides database reference to task without executing database call.- Parameters:
objectName
- name of the referenced task- Returns:
- Reference task object.
-
getInstance
static TaskRepository getInstance(Session session)
Returns a new instance of the default implementation forTaskRepository
- Parameters:
session
- Snowpark session object- Returns:
TaskRepository
instance
-
-