PageRenderTime 32ms CodeModel.GetById 25ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/java/com/google/ie/business/dao/ProjectDao.java

http://thoughtsite.googlecode.com/
Java | 98 lines | 15 code | 11 blank | 72 comment | 0 complexity | 8fa4cc3dd8394f688f0502d2e8a1a80c MD5 | raw file
 1/* Copyright 2010 Google Inc.
 2 * 
 3 * Licensed under the Apache License, Version 2.0 (the "License");
 4 * you may not use this file except in compliance with the License.
 5 * You may obtain a copy of the License at
 6 * 
 7 *      http://www.apache.org/licenses/LICENSE-2.0
 8 * 
 9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS.
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License
14 */
15
16package com.google.ie.business.dao;
17
18import com.google.ie.business.domain.Idea;
19import com.google.ie.business.domain.Project;
20import com.google.ie.business.domain.User;
21import com.google.ie.dto.RetrievalInfo;
22
23import java.util.List;
24import java.util.Set;
25
26/**
27 * A data access object specification for Project entity.
28 * 
29 * @author Charanjeet singh
30 */
31public interface ProjectDao extends BaseDao {
32
33    /**
34     * Saves a {@link Project} which is being created from a published
35     * {@link Idea}, into the data store.
36     * 
37     * @param project {@link Project} object
38     * @return Returns the saved project.
39     */
40    Project saveProject(Project project);
41
42    /**
43     * Retrieves the list of projects.
44     * 
45     * All retrieval specific information can be passed using RetrievalInfo
46     * object as a parameter.
47     * 
48     * @param retrievalInfo {@link RetrievalInfo} object containing information
49     *        of startIndex and total number of records
50     * @param statusOfProject the set of status to which the Project status
51     *        should be matched
52     * @return Returns the Project list.
53     */
54    List<Project> getProjects(RetrievalInfo retrievalInfo, Set<String> statusOfProject);
55
56    /**
57     * Retrieves the list of projects associated with a User.
58     * 
59     * All retrieval specific information can be passed using RetrievalInfo
60     * object as a parameter.
61     * 
62     * @param user The User object.
63     * @param retrievalInfo {@link RetrievalInfo} object having information of
64     *        startIndex and total number of records
65     * @param statusOfProject the set of status to which the Project status
66     *        should be matched
67     * @return Returns the Project list.
68     */
69    List<Project> getProjects(User user, RetrievalInfo retrievalInfo, Set<String> statusOfProject);
70
71    /**
72     * Retrieves the details of a project
73     * 
74     * @param projectKey String object holding the key of the project object to
75     *        be retrieved.
76     * @return Project object.
77     */
78    Project getProject(String projectKey);
79
80    /**
81     * Get project by idea key.
82     * 
83     * @param ideaKey primary key of entity Idea
84     * @return List<Project> Returns the list of Projects.
85     */
86    List<Project> getProjectsByIdeaKey(String ideaKey);
87
88    /**
89     * Retrieves the projects by project keys.
90     * 
91     * @param projectKeys Set of project keys.
92     * @param retrievalInfo RetrievalInfo object having information of
93     *        startIndex and total number of records
94     * @return Returns the list of Projects.
95     */
96    List<Project> getProjectsByKeys(Set<String> projectKeys, RetrievalInfo retrievalInfo);
97}
98