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 RdfGroupMapBuilder implements MapBuilder 16 { 17 /*** 18 * The name of this class 19 */ 20 public static final String CLASS_NAME = 21 "olr.om.map.RdfGroupMapBuilder"; 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_group"); 60 TableMap tMap = dbMap.getTable("rdf_group"); 61 62 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER); 63 64 tMap.setPrimaryKeyMethodInfo(tMap.getName()); 65 66 tMap.addPrimaryKey("rdf_group.ID", new Integer(0)); 67 tMap.addColumn("rdf_group.NAME", new String()); 68 tMap.addColumn("rdf_group.DESCRIPTION", new String()); 69 tMap.addColumn("rdf_group.ROLE_ADMIN", new Integer(0)); 70 tMap.addColumn("rdf_group.ROLE_CONTRIBUTOR", new Integer(0)); 71 tMap.addColumn("rdf_group.ROLE_USER", new Integer(0)); 72 tMap.addColumn("rdf_group.TEMPLATE", new String()); 73 } 74 }