Class ProjectManagerDAO
java.lang.Object
org.silverpeas.components.projectmanager.model.ProjectManagerDAO
- Author:
- neysseri
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidactionEstDecomposee(Connection con, int id, int estDecomposee) static intaddResource(Connection con, TaskResourceDetail resource) static intaddTask(Connection con, TaskDetail task) static DatedbDate2Date(String dbDate, String fieldName) static voiddeleteAllResources(Connection con, int taskId, String instanceId) static List<TaskDetail>getAllTasks(Connection con, String instanceId, Filtre filtre) static TaskDetailgetMostDistantTask(Connection con, int taskId) static List<TaskDetail>getNextTasks(Connection con, int taskId) static intgetOccupationByUser(Connection con, String userId, Date dateDeb, Date dateFin) static intgetOccupationByUser(Connection con, String userId, Date dateDeb, Date dateFin, int excludedTaskId) static List<TaskResourceDetail>getResources(Connection con, int taskId, String instanceId) static TaskDetailgetTask(Connection con, int id) static TaskDetailgetTask(Connection con, String id) static List<TaskDetail>getTasksByMotherId(Connection con, String instanceId, int motherId) Gets the tasks by mother identifier if no filter, or filtered tasks on filter if any (so not on mother id in that case).static List<TaskDetail>getTasksByMotherIdAndPreviousId(Connection con, String instanceId, int motherId, int previousId) static List<TaskDetail>getTree(Connection con, int actionId) static voidremoveAllTasks(Connection con, String instanceId) Deletes all the tasks and their associated resources in the specified project manager.static voidremoveTask(Connection con, int id) static voidupdateTask(Connection con, TaskDetail task)
-
Method Details
-
addTask
- Throws:
SQLException
-
addResource
- Throws:
SQLException
-
updateTask
- Throws:
SQLException
-
deleteAllResources
public static void deleteAllResources(Connection con, int taskId, String instanceId) throws SQLException - Throws:
SQLException
-
actionEstDecomposee
public static void actionEstDecomposee(Connection con, int id, int estDecomposee) throws SQLException - Throws:
SQLException
-
removeTask
- Throws:
SQLException
-
removeAllTasks
Deletes all the tasks and their associated resources in the specified project manager.- Parameters:
con- a connection to the data source into which are stored the tasks and the resources.instanceId- the unique identifier of a ProjectManager instance.- Throws:
SQLException- if an error occurs while deleting the tasks and the associated resources.
-
getTask
- Throws:
SQLException
-
getTask
- Throws:
SQLException
-
getResources
public static List<TaskResourceDetail> getResources(Connection con, int taskId, String instanceId) throws SQLException - Throws:
SQLException
-
getAllTasks
public static List<TaskDetail> getAllTasks(Connection con, String instanceId, Filtre filtre) throws SQLException - Throws:
SQLException
-
getNextTasks
- Throws:
SQLException
-
getMostDistantTask
- Throws:
SQLException
-
getTree
- Parameters:
con- a Connection to databaseactionId- the root of the tree- Returns:
- the tree - a List of TaskDetail
- Throws:
SQLException- if there is a SQL error.
-
getTasksByMotherId
public static List<TaskDetail> getTasksByMotherId(Connection con, String instanceId, int motherId) throws SQLException Gets the tasks by mother identifier if no filter, or filtered tasks on filter if any (so not on mother id in that case).- Parameters:
con- the current database connection.instanceId- the identifier of the component instance.motherId- the identifier of the parent task.- Returns:
- a list of
TaskDetailinstances. - Throws:
SQLException- on database error.
-
getTasksByMotherIdAndPreviousId
public static List<TaskDetail> getTasksByMotherIdAndPreviousId(Connection con, String instanceId, int motherId, int previousId) throws SQLException - Throws:
SQLException
-
getOccupationByUser
public static int getOccupationByUser(Connection con, String userId, Date dateDeb, Date dateFin) throws SQLException - Throws:
SQLException
-
getOccupationByUser
public static int getOccupationByUser(Connection con, String userId, Date dateDeb, Date dateFin, int excludedTaskId) throws SQLException - Throws:
SQLException
-
dbDate2Date
- Throws:
SQLException
-