cluster5.server.datastorage.dao
Class ProjectDao

java.lang.Object
  extended by cluster5.server.datastorage.dao.ProjectDao

public class ProjectDao
extends java.lang.Object


Constructor Summary
ProjectDao()
           
 
Method Summary
 boolean deleteProject(java.lang.Long projectId)
          Deletes specified project
 Project getById(java.lang.Long projectId)
           
 java.lang.Long getByUserIdAndName(java.lang.Long userId, java.lang.String projectName)
           
 float getProjectProgress(java.lang.Long projectId)
           
 java.util.List<java.lang.String> listProjectNamesByUserId(java.lang.Long userId)
           
 Project save(Project project)
          Saves or updates a Project in(to) the database.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectDao

public ProjectDao()
Method Detail

getById

public Project getById(java.lang.Long projectId)

listProjectNamesByUserId

public java.util.List<java.lang.String> listProjectNamesByUserId(java.lang.Long userId)
Parameters:
userId -
Returns:
list of project names or an empty list

getByUserIdAndName

public java.lang.Long getByUserIdAndName(java.lang.Long userId,
                                         java.lang.String projectName)
Parameters:
userId -
projectName -
Returns:
project ID by given user ID and project name

save

public Project save(Project project)
Saves or updates a Project in(to) the database.

Parameters:
project -
Returns:
instance of project with the ID set

deleteProject

public boolean deleteProject(java.lang.Long projectId)
Deletes specified project

Parameters:
projectId -
Returns:
true on operation success

getProjectProgress

public float getProjectProgress(java.lang.Long projectId)