KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > admin > patch > PatchDaoService


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.admin.patch;
18
19 import java.util.Date JavaDoc;
20 import java.util.List JavaDoc;
21
22 import org.alfresco.repo.domain.AppliedPatch;
23
24 /**
25  * Provides data access support for patch persistence.
26  *
27  * @since 1.2
28  * @author Derek Hulley
29  */

30 public interface PatchDaoService
31 {
32     /**
33      * Creates and saves a new instance of the patch. This will not have all the mandatory
34      * properties set - only the ID.
35      *
36      * @param id the unique key
37      * @return Returns a new instance that can be manipulated
38      */

39     public AppliedPatch newAppliedPatch(String JavaDoc id);
40     
41     /**
42      * Retrieve an existing patch
43      *
44      * @param id the patch unique ID
45      * @return Returns the patch instance or null if one has not been persisted
46      */

47     public AppliedPatch getAppliedPatch(String JavaDoc id);
48     
49     /**
50      * Detaches the given instance from the persistence engine. This will
51      * ensure that any changes made to the java object do not get persisted,
52      * allowing the objects to be passed out to external clients without any
53      * concern of their lifecycle.
54      *
55      * @param appliedPatch the object to detach from persistence
56      */

57     public void detach(AppliedPatch appliedPatch);
58     
59     /**
60      * Get a list of all applied patches
61      *
62      * @return Returns a list of all applied patches
63      */

64     public List JavaDoc<AppliedPatch> getAppliedPatches();
65     
66     /**
67      * Get a list of all patches applied between the given dates
68      *
69      * @param from the lower date limit or null to ignore
70      * @param to the upper date limit or null to ignore
71      * @return Returns all applied patches
72      */

73     public List JavaDoc<AppliedPatch> getAppliedPatches(Date JavaDoc from, Date JavaDoc to);
74 }
75
Popular Tags