FlightnumberMapBuilder.java from iTicket at Krugle
Show FlightnumberMapBuilder.java syntax highlighted
package db.map;
import java.util.Date;
import java.math.BigDecimal;
import org.apache.torque.Torque;
import org.apache.torque.TorqueException;
import org.apache.torque.map.MapBuilder;
import org.apache.torque.map.DatabaseMap;
import org.apache.torque.map.TableMap;
/**
* This class was autogenerated by Torque on:
*
* [Mon Apr 17 14:00:39 CEST 2006]
*
*/
public class FlightnumberMapBuilder implements MapBuilder
{
/**
* The name of this class
*/
public static final String CLASS_NAME =
"db.map.FlightnumberMapBuilder";
/**
* The database map.
*/
private DatabaseMap dbMap = null;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return true if this DatabaseMapBuilder is built
*/
public boolean isBuilt()
{
return (dbMap != null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public DatabaseMap getDatabaseMap()
{
return this.dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @throws TorqueException
*/
public void doBuild() throws TorqueException
{
dbMap = Torque.getDatabaseMap("iticket");
dbMap.addTable("flightnumber");
TableMap tMap = dbMap.getTable("flightnumber");
tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
tMap.setPrimaryKeyMethodInfo(tMap.getName());
tMap.addPrimaryKey("flightnumber.FLIGHTNUMBER_ID", new Integer(0) );
tMap.addColumn("flightnumber.FLIGHTNUMBER", "", 255 );
tMap.addForeignKey(
"flightnumber.DEPARTURE_ID", new Integer(0) , "airport" ,
"airport_id");
tMap.addForeignKey(
"flightnumber.DESTINATION_ID", new Integer(0) , "airport" ,
"airport_id");
}
}
See more files for this project here