1 package org.apache.jetspeed.om.security.turbine.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 12 /*** 13 * This class was autogenerated by Torque on: 14 * 15 * [Thu Apr 22 23:12:36 EDT 2004] 16 * 17 */ 18 public class TurbineRolePermissionMapBuilder implements MapBuilder 19 { 20 /*** 21 * The name of this class 22 */ 23 public static final String CLASS_NAME = 24 "org.apache.jetspeed.om.security.turbine.map.TurbineRolePermissionMapBuilder"; 25 26 27 /*** 28 * The database map. 29 */ 30 private DatabaseMap dbMap = null; 31 32 /*** 33 * Tells us if this DatabaseMapBuilder is built so that we 34 * don't have to re-build it every time. 35 * 36 * @return true if this DatabaseMapBuilder is built 37 */ 38 public boolean isBuilt() 39 { 40 return (dbMap != null); 41 } 42 43 /*** 44 * Gets the databasemap this map builder built. 45 * 46 * @return the databasemap 47 */ 48 public DatabaseMap getDatabaseMap() 49 { 50 return this.dbMap; 51 } 52 53 /*** 54 * The doBuild() method builds the DatabaseMap 55 * 56 * @throws TorqueException 57 */ 58 public void doBuild() throws TorqueException 59 { 60 dbMap = Torque.getDatabaseMap("default"); 61 62 dbMap.addTable("TURBINE_ROLE_PERMISSION"); 63 TableMap tMap = dbMap.getTable("TURBINE_ROLE_PERMISSION"); 64 65 tMap.setPrimaryKeyMethod("none"); 66 67 68 tMap.addForeignPrimaryKey( 69 "TURBINE_ROLE_PERMISSION.ROLE_ID", new Integer(0) , "TURBINE_ROLE" , 70 "ROLE_ID"); 71 tMap.addForeignPrimaryKey( 72 "TURBINE_ROLE_PERMISSION.PERMISSION_ID", new Integer(0) , "TURBINE_PERMISSION" , 73 "PERMISSION_ID"); 74 } 75 }