01: /**
02: * Copyright (C) 2001-2004 France Telecom R&D
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library 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 GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */package org.objectweb.speedo.mapper.api;
18:
19: import org.objectweb.fractal.api.control.AttributeController;
20: import org.objectweb.speedo.lib.Personality;
21:
22: import java.util.Properties;
23:
24: /**
25: * defines the attributes (Fractal attribute Controller) of the JormFactory
26: * component.
27: *
28: * @see org.objectweb.speedo.mapper.api.JormFactory
29: * @author S.Chassande-Barrioz
30: */
31: public interface JormFactoryAttributes extends AttributeController {
32:
33: /**
34: * nothing is done. Then the mapping structures already exist at the Speedo
35: * starting
36: */
37: byte DO_NOTHING = 0;
38:
39: /**
40: * The mapping structures are created if they are not already present
41: */
42: byte CREATE_IF_REQUIRED = 1;
43:
44: /**
45: * The mapping structures are removed (if they already exist), and created.
46: */
47: byte FORCE_CREATE = 2;
48:
49: /**
50: * The data present in the mapping structure are removed. Of course if the
51: * mapping structure do not exist, they are created.
52: */
53: byte DELETE_DATA = 3;
54:
55: /**
56: * @return the default mapping structure rule applied during the map
57: * operation of the persistent classes.
58: */
59: byte getMappingStructureRule();
60:
61: /**
62: *
63: * @param rule is the default mapping structure rule to apply during the map
64: * operation of the persistent classes.
65: */
66: void setMappingStructureRule(byte rule);
67:
68: Personality getPersonality();
69:
70: void setPersonality(Personality p);
71:
72: /**
73: * Assignes speedo properties which permits to configure each home
74: * (caching, ...)
75: */
76: void setSpeedoProperties(Properties p);
77:
78: void setSpeedoProperty(String[] name_n_value);
79:
80: /**
81: * Returns speedo properties used to configure each home
82: * (caching, ...)
83: */
84: Properties getSpeedoProperties();
85: }
|