1 package org.apache.turbine.services.security.torque.om.map;
2
3 import java.util.Date;
4 import java.math.BigDecimal;
5
6 import org.apache.torque.Torque;
7 import org.apache.torque.TorqueException;
8 import org.apache.torque.map.MapBuilder;
9 import org.apache.torque.map.DatabaseMap;
10 import org.apache.torque.map.TableMap;
11 import org.apache.torque.map.ColumnMap;
12 import org.apache.torque.map.InheritanceMap;
13
14 /***
15 * This class was autogenerated by Torque on:
16 *
17 * [Tue Nov 04 15:53:51 CET 2008]
18 *
19 */
20 public class TurbineRolePermissionMapBuilder implements MapBuilder
21 {
22 /***
23 * The name of this class
24 */
25 public static final String CLASS_NAME =
26 "org.apache.turbine.services.security.torque.om.map.TurbineRolePermissionMapBuilder";
27
28 /***
29 * The database map.
30 */
31 private DatabaseMap dbMap = null;
32
33 /***
34 * Tells us if this DatabaseMapBuilder is built so that we
35 * don't have to re-build it every time.
36 *
37 * @return true if this DatabaseMapBuilder is built
38 */
39 public boolean isBuilt()
40 {
41 return (dbMap != null);
42 }
43
44 /***
45 * Gets the databasemap this map builder built.
46 *
47 * @return the databasemap
48 */
49 public DatabaseMap getDatabaseMap()
50 {
51 return this.dbMap;
52 }
53
54 /***
55 * The doBuild() method builds the DatabaseMap
56 *
57 * @throws TorqueException
58 */
59 public synchronized void doBuild() throws TorqueException
60 {
61 if ( isBuilt() ) {
62 return;
63 }
64 dbMap = Torque.getDatabaseMap("default");
65
66 dbMap.addTable("TURBINE_ROLE_PERMISSION");
67 TableMap tMap = dbMap.getTable("TURBINE_ROLE_PERMISSION");
68 tMap.setJavaName("TurbineRolePermission");
69 tMap.setOMClass( org.apache.turbine.services.security.torque.om.TurbineRolePermission.class );
70 tMap.setPeerClass( org.apache.turbine.services.security.torque.om.TurbineRolePermissionPeer.class );
71 tMap.setPrimaryKeyMethod("none");
72
73 ColumnMap cMap = null;
74
75
76
77 cMap = new ColumnMap( "ROLE_ID", tMap);
78 cMap.setType( new Integer(0) );
79 cMap.setTorqueType( "INTEGER" );
80 cMap.setUsePrimitive(true);
81 cMap.setPrimaryKey(true);
82 cMap.setNotNull(true);
83 cMap.setJavaName( "RoleId" );
84 cMap.setAutoIncrement(false);
85 cMap.setProtected(false);
86 cMap.setInheritance("false");
87 cMap.setForeignKey("TURBINE_ROLE", "ROLE_ID");
88 cMap.setPosition(1);
89 tMap.addColumn(cMap);
90
91 cMap = new ColumnMap( "PERMISSION_ID", tMap);
92 cMap.setType( new Integer(0) );
93 cMap.setTorqueType( "INTEGER" );
94 cMap.setUsePrimitive(true);
95 cMap.setPrimaryKey(true);
96 cMap.setNotNull(true);
97 cMap.setJavaName( "PermissionId" );
98 cMap.setAutoIncrement(false);
99 cMap.setProtected(false);
100 cMap.setInheritance("false");
101 cMap.setForeignKey("TURBINE_PERMISSION", "PERMISSION_ID");
102 cMap.setPosition(2);
103 tMap.addColumn(cMap);
104 tMap.setUseInheritance(false);
105 }
106 }