1 package org.apache.fulcrum.security.impl.db.entity.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 14 public class TurbineUserGroupRoleMapBuilder implements MapBuilder 15 { 16 19 public static final String CLASS_NAME = 20 "org.apache.fulcrum.security.impl.db.entity.map.TurbineUserGroupRoleMapBuilder"; 21 22 23 26 private DatabaseMap dbMap = null; 27 28 34 public boolean isBuilt() 35 { 36 return (dbMap != null); 37 } 38 39 44 public DatabaseMap getDatabaseMap() 45 { 46 return this.dbMap; 47 } 48 49 54 public void doBuild() throws TorqueException 55 { 56 dbMap = Torque.getDatabaseMap("scarab"); 57 58 dbMap.addTable("TURBINE_USER_GROUP_ROLE"); 59 TableMap tMap = dbMap.getTable("TURBINE_USER_GROUP_ROLE"); 60 61 tMap.setPrimaryKeyMethod("none"); 62 63 64 tMap.addForeignPrimaryKey( 65 "TURBINE_USER_GROUP_ROLE.USER_ID", new Integer (0) , "TURBINE_USER" , 66 "USER_ID"); 67 tMap.addForeignPrimaryKey( 68 "TURBINE_USER_GROUP_ROLE.GROUP_ID", new Integer (0) , "TURBINE_GROUP" , 69 "GROUP_ID"); 70 tMap.addForeignPrimaryKey( 71 "TURBINE_USER_GROUP_ROLE.ROLE_ID", new Integer (0) , "TURBINE_ROLE" , 72 "ROLE_ID"); 73 } 74 } 75 | Popular Tags |