001 package org.apache.turbine.services.security.torque.om.map; 002 003 import java.util.Date; 004 import java.math.BigDecimal; 005 006 import org.apache.torque.Torque; 007 import org.apache.torque.TorqueException; 008 import org.apache.torque.map.MapBuilder; 009 import org.apache.torque.map.DatabaseMap; 010 import org.apache.torque.map.TableMap; 011 import org.apache.torque.map.ColumnMap; 012 import org.apache.torque.map.InheritanceMap; 013 014 /** 015 * This class was autogenerated by Torque on: 016 * 017 * [Thu Jun 23 17:25:46 CEST 2011] 018 * 019 */ 020 public class TurbineGroupMapBuilder implements MapBuilder 021 { 022 /** 023 * The name of this class 024 */ 025 public static final String CLASS_NAME = 026 "org.apache.turbine.services.security.torque.om.map.TurbineGroupMapBuilder"; 027 028 /** 029 * The database map. 030 */ 031 private DatabaseMap dbMap = null; 032 033 /** 034 * Tells us if this DatabaseMapBuilder is built so that we 035 * don't have to re-build it every time. 036 * 037 * @return true if this DatabaseMapBuilder is built 038 */ 039 public boolean isBuilt() 040 { 041 return (dbMap != null); 042 } 043 044 /** 045 * Gets the databasemap this map builder built. 046 * 047 * @return the databasemap 048 */ 049 public DatabaseMap getDatabaseMap() 050 { 051 return this.dbMap; 052 } 053 054 /** 055 * The doBuild() method builds the DatabaseMap 056 * 057 * @throws TorqueException 058 */ 059 public synchronized void doBuild() throws TorqueException 060 { 061 if ( isBuilt() ) { 062 return; 063 } 064 dbMap = Torque.getDatabaseMap("default"); 065 066 dbMap.addTable("TURBINE_GROUP"); 067 TableMap tMap = dbMap.getTable("TURBINE_GROUP"); 068 tMap.setJavaName("TurbineGroup"); 069 tMap.setOMClass( org.apache.turbine.services.security.torque.om.TurbineGroup.class ); 070 tMap.setPeerClass( org.apache.turbine.services.security.torque.om.TurbineGroupPeer.class ); 071 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER); 072 tMap.setPrimaryKeyMethodInfo(tMap.getName()); 073 074 ColumnMap cMap = null; 075 076 077 // ------------- Column: GROUP_ID -------------------- 078 cMap = new ColumnMap( "GROUP_ID", tMap); 079 cMap.setType( new Integer(0) ); 080 cMap.setTorqueType( "INTEGER" ); 081 cMap.setUsePrimitive(true); 082 cMap.setPrimaryKey(true); 083 cMap.setNotNull(true); 084 cMap.setJavaName( "GroupId" ); 085 cMap.setAutoIncrement(false); 086 cMap.setProtected(false); 087 cMap.setInheritance("false"); 088 cMap.setPosition(1); 089 tMap.addColumn(cMap); 090 // ------------- Column: GROUP_NAME -------------------- 091 cMap = new ColumnMap( "GROUP_NAME", tMap); 092 cMap.setType( "" ); 093 cMap.setTorqueType( "VARCHAR" ); 094 cMap.setUsePrimitive(true); 095 cMap.setPrimaryKey(false); 096 cMap.setNotNull(true); 097 cMap.setJavaName( "Name" ); 098 cMap.setAutoIncrement(false); 099 cMap.setProtected(false); 100 cMap.setInheritance("false"); 101 cMap.setSize( 64 ); 102 cMap.setPosition(2); 103 tMap.addColumn(cMap); 104 tMap.setUseInheritance(false); 105 } 106 }