Class TaskDAO

java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.plugin.task.dao.TaskDAO

public class TaskDAO extends CommonDAO
  • Constructor Details

  • Method Details

    • searchTasks

      public void searchTasks(Pageable<Task> result, int processId, int typeId, boolean onlyOpen) throws SQLException
      Returns a list of tasks filtered by process and type
      Parameters:
      processId - the required process filter
      typeId - if > 0, filter by process type
      onlyOpen - only not executed ones
      Throws:
      SQLException
    • getScheduledTasks

      public List<Task> getScheduledTasks(int limit) throws SQLException
      Returns a list of tasks scheduled for execution
      Parameters:
      limit - the max count
      Returns:
      the scheduled tasks
      Throws:
      SQLException
    • updateTask

      public void updateTask(Task task) throws SQLException
      Adds a new task (id <= 0), or updates the execution date and log of an existing one
      Parameters:
      task - the task
      Throws:
      SQLException
    • deleteTasks

      public void deleteTasks(int processId, String typeId) throws SQLException
      Deletes tasks by process and type
      Parameters:
      processId - the process ID
      typeId - the type ID
      Throws:
      SQLException