KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > speedo > sequence > api > SequenceManager


1 /**
2  * Speedo: an implementation of JDO compliant personality on top of JORM generic
3  * I/O sub-system.
4  * Copyright (C) 2001-2004 France Telecom R&D
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  *
21  *
22  * Contact: speedo@objectweb.org
23  *
24  */

25
26 package org.objectweb.speedo.sequence.api;
27
28 import javax.jdo.datastore.Sequence;
29
30 import org.objectweb.jorm.api.PMapper;
31 import org.objectweb.speedo.pm.api.ProxyManagerFactory;
32
33 /**
34  * Class to manage sequences defined for a pmf.
35  * @author Y.Bersihand
36  */

37 public interface SequenceManager {
38
39     /**
40      * Get the long generator manager.
41      */

42     Object JavaDoc getLongGenMgr ();
43     
44     /**
45      * Set the long generator manager.
46      */

47     void setLongGenMgr (Object JavaDoc longGenMgr);
48     
49     /**
50      * Add the sequence if not already registered in the list of sequences defined for this pmf.
51      * @param sequence
52      */

53     void addSequence(Object JavaDoc sequence);
54     
55     /**
56      * Try to remove the sequence identified by the sequenceName
57      * from the list of sequences defined for this pmf.
58      * If the sequence does not exist, nothing is done.
59      * @param sequenceName the fully qualified name of the sequence,
60      * i.e "packageName.sequenceName".
61      */

62     void removeSequence(String JavaDoc sequenceName);
63     
64     /**
65      * Return the sequence associated to the name parameter.
66      * If no sequence is found, return null.
67      * @param name the fully qualified name of the sequence,
68      * i.e "packageName.sequenceName".
69      */

70     Sequence getSequence(String JavaDoc name);
71     
72     PMapper getMapper();
73
74     void setMapper(PMapper mapper);
75     
76     ProxyManagerFactory getPMF();
77     
78     void setPMF(ProxyManagerFactory pmf);
79 }
80
Popular Tags