View Javadoc

1   /**
2    * Copyright 2005-2006 the original author or authors.
3    *
4    * Licensed under the Gnu General Pubic License, Version 2.0 (the
5    * "License"); you may not use this file except in compliance with
6    * the License. You may obtain a copy of the License at
7    *
8    *      http://www.opensource.org/licenses/gpl-license.php
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13   * See the Gnu General Public License for more details.
14   */
15  package org.figure8.join.businessobjects.artifact.persistence;
16  
17  import org.figure8.join.core.persistence.ObjectDao;
18  import org.figure8.join.businessobjects.commons.Release;
19  import org.figure8.join.businessobjects.artifact.Deliverable;
20  import org.figure8.join.businessobjects.artifact.DeliverableType;
21  
22  import java.util.List;
23  /**
24   * Data Access interface for Deliverable business objects.
25   * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
26   * @version $Revision: 1.1 $
27   */
28  public interface DeliverableDao extends ObjectDao{
29     
30     // Public -------------------------------------------------------------------
31  
32     /**
33      * Retrieve a deliverable using its unique business key
34      * @param key The key of deliverable to retrieve
35      * @return The deliverable having this ey or null if key not found
36      */
37     public abstract Deliverable getDeliverable(String key);
38  
39     /**
40      * Retrieve the last deliverables for a specified type. 'Last' are the one with
41      * most recent delivery creation date. Limit the result size with <b>maxResult</b>
42      * @param type The deliverables type
43      * @param maxResult The maximum number of returned deliverables
44      * @return A list of <code>org.figure8.join.businessobjects.artifact.Deliverable</code>s
45      */
46     public abstract List getLastDeliverables(DeliverableType type, int maxResult);
47  
48     /**
49      * Retrieve deliverables of specified type for a specified release
50      * @param type The deliverables type
51      * @param release The release deliverables have been done for
52      * @return A list of <code>org.figure8.join.businessobjects.artifact.Deliverable</code>s
53      */
54     public abstract List getDeliverablesByRelease(DeliverableType type, Release release);
55  
56     /**
57      * Retrieve deliverables supplied by a specified user
58      * @param userId The unique identifier of the supplier
59      * @return A list of <code>org.figure8.join.businessobjects.artifact.Deliverable</code>s
60      */
61     public abstract List getDeliverablesSuppliedByUser(String userId);
62  }