PageRenderTime 376ms CodeModel.GetById 214ms app.highlight 2ms RepoModel.GetById 159ms app.codeStats 0ms

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

http://thoughtsite.googlecode.com/
Java | 57 lines | 11 code | 8 blank | 38 comment | 0 complexity | 4dd27ff2dcca12e3052ab55f291eda1d 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.Comment;
19import com.google.ie.business.domain.Idea;
20import com.google.ie.business.domain.Project;
21import com.google.ie.dto.RetrievalInfo;
22
23import java.util.List;
24
25/**
26 * A data access object specification for Comment entity.
27 * 
28 * @author Sachneet
29 * 
30 */
31public interface CommentDao extends BaseDao {
32    /**
33     * Saves a Comment object in to data store.
34     * 
35     * @param comment {@link Comment} object to be saved.
36     * @return saved comment object.
37     */
38
39    Comment saveComment(Comment comment);
40
41    /**
42     * Retrieves the list of {@link Comment} objects associated with an Idea
43     * or Project.
44     * 
45     * @param key the String object having key of an {@link Idea} or
46     *        a {@link Project} .
47     * @param retrievalInfo the retrieval information parameter.
48     * @param keyType it can be either ideaKey or projectkey.
49     * 
50     * @return List of comment objects .It can be IdeaComment object list or
51     *         ProjectComment list.
52     */
53    <T extends Comment> List<T> getComments(String key, RetrievalInfo retrievalInfo,
54                    String keyType);
55
56}
57