KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jorm > mapper > rdb > genclass > RdbGenClassProp


1 /**
2  * JORM: an implementation of a generic mapping system for persistent Java
3  * objects. Two mapping are supported: to RDBMS and to binary files.
4  * Copyright (C) 2001-2003 France Telecom R&D - INRIA
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  * Contact: jorm-team@objectweb.org
21  *
22  */

23
24 package org.objectweb.jorm.mapper.rdb.genclass;
25
26 import org.objectweb.jorm.api.PClassMapping;
27 import org.objectweb.jorm.genclass.api.GenClassProp;
28 import org.objectweb.jorm.mapper.rdb.adapter.api.RdbAdapter;
29 import org.objectweb.jorm.mapper.rdb.lib.RdbPrefetchablePCM;
30
31 /**
32  * It dscribes the setters for defining the properties that can be set when
33  * initialising a RdbGenClassMapping.
34  * @author P. D?chamboux
35  */

36 public interface RdbGenClassProp extends GenClassProp {
37     /**
38      * Defines the table name property of a generic class instance mapped to
39      * a RDB.
40      * @param tn The table name
41      */

42     void setTableName(String JavaDoc tn);
43
44     /**
45      * Defines the table name property of a generic class instance mapped to
46      * a RDB for a table that owns extension fields of a reference element.
47      * @param retn The table name of the extension fields
48      */

49     void setRefExtTableName(String JavaDoc retn);
50
51     /**
52      * Defines the two sets of columns that are used to join the main table with
53      * the extension table.
54      * @param maincols Names of columns within the main table.
55      * @param extcols Names of columns within the extension table.
56      */

57     void defineJoinColumns(String JavaDoc[] maincols, String JavaDoc[] extcols);
58
59     /**
60      * Defines the type converter property of a generic class instance mapped to
61      * a RDB.
62      * @param adapter The associated type.
63      */

64     void setTypeConverter(RdbAdapter adapter);
65
66     /**
67      * Indicates if the table of the genclass is colocated
68      */

69     void setColocated(boolean colocated);
70
71     /**
72      * Indicates if the table of the genclass is colocated
73      */

74     void setColocatedMaster(boolean cm);
75
76     /**
77      * Indicates if the table must be only read.
78      * @param readonly
79      */

80     void setReadOnly(boolean readonly);
81     
82     /**
83      * Specify the PClassMapping of the persistent class which must be prefetched
84      */

85     void setPrefetchElementPCM(RdbPrefetchablePCM pcm);
86 }
87
Popular Tags