1 package olr.om.map;
2
3 import org.apache.torque.Torque;
4 import org.apache.torque.TorqueException;
5 import org.apache.torque.map.DatabaseMap;
6 import org.apache.torque.map.MapBuilder;
7 import org.apache.torque.map.TableMap;
8
9 /***
10 * This class was autogenerated by Torque on:
11 *
12 * [Tue Jul 13 14:47:47 CEST 2004]
13 *
14 */
15 public class RdfSchemaMapBuilder implements MapBuilder
16 {
17 /***
18 * The name of this class
19 */
20 public static final String CLASS_NAME =
21 "olr.om.map.RdfSchemaMapBuilder";
22
23
24 /***
25 * The database map.
26 */
27 private DatabaseMap dbMap = null;
28
29 /***
30 * Tells us if this DatabaseMapBuilder is built so that we
31 * don't have to re-build it every time.
32 *
33 * @return true if this DatabaseMapBuilder is built
34 */
35 public boolean isBuilt()
36 {
37 return (dbMap != null);
38 }
39
40 /***
41 * Gets the databasemap this map builder built.
42 *
43 * @return the databasemap
44 */
45 public DatabaseMap getDatabaseMap()
46 {
47 return this.dbMap;
48 }
49
50 /***
51 * The doBuild() method builds the DatabaseMap
52 *
53 * @throws TorqueException
54 */
55 public void doBuild() throws TorqueException
56 {
57 dbMap = Torque.getDatabaseMap("default");
58
59 dbMap.addTable("rdf_schema");
60 TableMap tMap = dbMap.getTable("rdf_schema");
61
62 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
63
64 tMap.setPrimaryKeyMethodInfo(tMap.getName());
65
66 tMap.addPrimaryKey("rdf_schema.ID", new Integer(0));
67 tMap.addForeignKey(
68 "rdf_schema.NS_ID", new Integer(0) , "rdf_namespace" ,
69 "id");
70 tMap.addColumn("rdf_schema.SHORT_NAME", new String());
71 tMap.addColumn("rdf_schema.ISCOURSESCHEMA", new String());
72 tMap.addColumn("rdf_schema.ISNECESSARY", new String());
73 }
74 }