01: /**
02: * Speedo: an implementation of JDO compliant personality on top of JORM generic
03: * I/O sub-system.
04: * Copyright (C) 2001-2004 France Telecom R&D
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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: */package org.objectweb.speedo.sequence.api;
25:
26: import javax.jdo.datastore.Sequence;
27:
28: import org.objectweb.jorm.api.PMapper;
29: import org.objectweb.speedo.pm.api.POManagerFactoryItf;
30:
31: /**
32: * Class to manage sequences defined for a pmf.
33: * @author Y.Bersihand
34: */
35: public interface SequenceManager {
36:
37: /**
38: * Get the long generator manager.
39: */
40: Object getLongGenMgr();
41:
42: /**
43: * Set the long generator manager.
44: */
45: void setLongGenMgr(Object longGenMgr);
46:
47: /**
48: * Add the sequence if not already registered in the list of sequences defined for this pmf.
49: * @param sequence
50: */
51: void addSequence(Object sequence);
52:
53: /**
54: * Try to remove the sequence identified by the sequenceName
55: * from the list of sequences defined for this pmf.
56: * If the sequence does not exist, nothing is done.
57: * @param sequenceName the fully qualified name of the sequence,
58: * i.e "packageName.sequenceName".
59: */
60: void removeSequence(String sequenceName);
61:
62: /**
63: * Return the sequence associated to the name parameter.
64: * If no sequence is found, return null.
65: * @param name the fully qualified name of the sequence,
66: * i.e "packageName.sequenceName".
67: */
68: SpeedoSequenceItf getSequence(String name);
69:
70: PMapper getMapper();
71:
72: void setMapper(PMapper mapper);
73:
74: POManagerFactoryItf getPMF();
75:
76: void setPMF(POManagerFactoryItf pmf);
77: }
|