View Javadoc

1   package org.itracker.persistence.dao;
2   
3   import java.util.Date;
4   import java.util.List;
5   
6   import org.itracker.model.Project;
7   
8   /**
9    * 
10   */
11  public interface ProjectDAO extends BaseDAO<Project> {
12      
13      /**
14       * Finds a project by ID. 
15       * 
16       * @param projectId sytem ID
17       * @return project instance or <tt>null</tt>
18       */
19      Project findByPrimaryKey(Integer projectId);
20  
21      /**
22       * Finds all projects. 
23       * 
24       * @return list of all existing projects, in unspecified order
25       */
26      List<Project> findAll();
27  
28      /**
29       * Finds all projects with a given status. 
30       * 
31       * @param status project status
32       * @return list of projects in unspecified order
33       */
34      List<Project> findByStatus(int status);
35      
36      /**
37       * Finds all projects that are active or viewable. 
38       * 
39       * @return list of projects in unspecified order
40       */
41      List<Project> findAllAvailable();
42      /**
43       * Returns the projects with id projectId latest modified issues modification date
44       * 
45       * @param projectId
46       * @return
47       */
48      public Date getLastIssueUpdateDate(Integer projectId); 
49      
50      /**
51       * Finds a project by name. 
52       * 
53       * @param name project
54       * @return the project by name or null if it does not exist in database.
55       */
56      Project findByName(String name);
57  }