KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > distrans > persistence > PersistenceItf


1 /*
2   Copyright (C) 2001-2003 Lionel Seinturier <Lionel.Seinturier@lip6.fr>
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.aspects.distrans.persistence;
19
20 import org.enhydra.jdbc.standard.StandardXADataSource;
21
22 /**
23  * @author Lionel Seinturier <Lionel.Seinturier@lip6.fr>
24  * @version 1.0
25  */

26 public interface PersistenceItf {
27
28     /**
29      * Initialize the persistence storage.
30      * If the storage already exists, reinitialize it.
31      *
32      * @param className the class name for which we want to create a storage
33      * @param ds the data source
34      */

35     public void initStorage( String JavaDoc className, StandardXADataSource ds );
36     
37     /**
38      * Initialize the persistence storage.
39      * If the storage already exists, do not reinitialize it.
40      *
41      * @param className the class name for which we want to create a storage
42      * @param ds the data source
43      */

44     public void initStorageIfNeeded( String JavaDoc className, StandardXADataSource ds );
45     
46     /**
47      * Store an object into the persistence storage.
48      *
49      * @param wrappee the object to store
50      * @param name the identifier for the object
51      * @param ds the data source
52      */

53     public void load( Object JavaDoc wrappee, String JavaDoc name, StandardXADataSource ds )
54         throws Exception JavaDoc;
55
56     /**
57      * Update an object with the values retrieved from the persistent
58      * storage.
59      *
60      * @param wrappee the object to update
61      * @param name the identifier for the object
62      * @param ds the data source
63      */

64     public void store( Object JavaDoc wrappee, String JavaDoc name, StandardXADataSource ds )
65         throws Exception JavaDoc;
66
67 }
68
Popular Tags