org.duraspace.fcrepo.cloudsync.service.dao
Class TaskDao

java.lang.Object
  extended by org.duraspace.fcrepo.cloudsync.service.dao.TaskDao

public class TaskDao
extends Object


Field Summary
protected  org.springframework.jdbc.core.JdbcTemplate db
           
 
Constructor Summary
TaskDao(org.springframework.jdbc.core.JdbcTemplate db, org.springframework.transaction.support.TransactionTemplate tt, ObjectSetDao objectSetDao, ObjectStoreDao objectStoreDao)
           
 
Method Summary
 Task createTask(Task task)
           
 void deleteTask(String id)
           
 Task getTask(String id)
           
 void goIdle(String id)
           
 void initDb()
           
protected  String insert(String sql, Object... values)
           
 List<Task> listTasks()
           
 void setActiveLogId(String id, String activeLogId)
           
 void setTaskState(String id, String newState)
           
 Task updateTask(String id, Task task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

protected final org.springframework.jdbc.core.JdbcTemplate db
Constructor Detail

TaskDao

public TaskDao(org.springframework.jdbc.core.JdbcTemplate db,
               org.springframework.transaction.support.TransactionTemplate tt,
               ObjectSetDao objectSetDao,
               ObjectStoreDao objectStoreDao)
Method Detail

initDb

public void initDb()

createTask

public Task createTask(Task task)

listTasks

public List<Task> listTasks()

getTask

public Task getTask(String id)

setTaskState

public void setTaskState(String id,
                         String newState)

goIdle

public void goIdle(String id)

setActiveLogId

public void setActiveLogId(String id,
                           String activeLogId)

updateTask

public Task updateTask(String id,
                       Task task)
                throws org.springframework.dao.DuplicateKeyException
Throws:
org.springframework.dao.DuplicateKeyException

deleteTask

public void deleteTask(String id)

insert

protected String insert(String sql,
                        Object... values)
                 throws org.springframework.dao.DuplicateKeyException
Throws:
org.springframework.dao.DuplicateKeyException


Copyright © 2012 DuraSpace. All Rights Reserved.