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.environment.persistence;
16  
17  import org.figure8.join.core.persistence.ObjectDao;
18  import org.figure8.join.businessobjects.environment.VersionedResource;
19  import org.figure8.join.businessobjects.environment.VersionedResourceUpdate;
20  
21  import java.util.Date;
22  import java.util.List;
23  /**
24   * Data access interface for VersionedResourceUpdate business objects.
25   * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
26   * @version $Revision: 1.1 $
27   */
28  public interface VersionedResourceUpdateDao extends ObjectDao{
29  
30     // Public -------------------------------------------------------------------
31  
32     /**
33      * Retrieve the VersionedResourceUpdate having this identifier
34      * @param id The unique identifier of update to retrieve
35      * @return The VersionedResourceUpdate having this identifier or null if no one match
36      */
37     public abstract VersionedResourceUpdate getVersionedResourceUpdate(long id);
38  
39     /**
40      * Retrieve the resource update for a resource that was active at specified date
41      * @param resource The VersionedResource to retrieve update for
42      * @param date The date to retrieve active update
43      * @return The active {@link VersionedResourceUpdate} at date 
44      */
45     public abstract VersionedResourceUpdate getVersionedResourceUpdateForResource(VersionedResource resource, Date date);
46  
47     /**
48      * Retrieve a list of resource updates done onto a resource during a specified interval
49      * @param resource The VersionedResource to retrieve updates for
50      * @param startDate The starting date of time interval to search
51      * @param endDate The ending date of time interval to search
52      * @return A list of {@link org.figure8.join.businessobjects.environment.VersionedResourceUpdate} objects
53      */
54     public abstract List getVersionedResourceUpdatesForResource(VersionedResource resource, Date startDate, Date endDate);
55  }