package org.thdl.roster.om.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:
  *
  * [Wed May 14 19:01:42 EDT 2003]
  *
  */
public class PersonDataMapBuilder implements MapBuilder
{
    /**
     * The name of this class
     */
    public static final String CLASS_NAME =
        "org.thdl.roster.om.map.PersonDataMapBuilder";


    /**
     * 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()
    {
        if (dbMap != null)
        {
            return true;
        }
        return false;
    }

    /**
     * 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("Roster");

        dbMap.addTable("PersonData");
        TableMap tMap = dbMap.getTable("PersonData");

                tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
        
                tMap.setPrimaryKeyMethodInfo(tMap.getName());
        
                                      tMap.addPrimaryKey("PersonData.ID", new Integer(0));
                                                        tMap.addColumn("PersonData.THDL_USER_ID", new Integer(0));
                                                        tMap.addColumn("PersonData.FIRSTNAME", new String());
                                                        tMap.addColumn("PersonData.MIDDLENAME", new String());
                                                        tMap.addColumn("PersonData.LASTNAME", new String());
                                                        tMap.addColumn("PersonData.BIO", new String());
                                                        tMap.addColumn("PersonData.HISTORY", new String());
                                                        tMap.addColumn("PersonData.PARENT_ORGANIZATION", new String());
                                                        tMap.addColumn("PersonData.SCHOOL", new String());
                                                        tMap.addColumn("PersonData.DEPARTMENT", new String());
                                                        tMap.addColumn("PersonData.PROGRAM", new String());
                                                        tMap.addColumn("PersonData.ADVISOR", new String());
                                                        tMap.addColumn("PersonData.HIGHEST_DEGREE", new String());
                                                        tMap.addColumn("PersonData.YEAR_BEGAN", new Integer(0));
                                                        tMap.addColumn("PersonData.YEAR_FINISHED", new Integer(0));
                                                        tMap.addColumn("PersonData.OTHER_BACKGROUNDS", new String());
                                                        tMap.addColumn("PersonData.ORGANIZATION", new String());
                                                        tMap.addColumn("PersonData.DIVISION", new String());
                                                        tMap.addColumn("PersonData.TITLE", new String());
                                                        tMap.addColumn("PersonData.START_DATE", new Integer(0));
                                                        tMap.addColumn("PersonData.JOB_DESCRIPTION", new String());
                              }
}
