[geeklog-cvs] Geeklog-2.x/plugins/content/models/map Gl2ContentMapBuilder.php, NONE, 1.1

Damien Hodgkin dhodgkin at qs1489.pair.com
Wed Aug 8 16:23:47 EDT 2007


Update of /cvsroot/geeklog2/Geeklog-2.x/plugins/content/models/map
In directory qs1489.pair.com:/tmp/cvs-serv13905/plugins/content/models/map

Added Files:
	Gl2ContentMapBuilder.php 
Log Message:
Second commit

--- NEW FILE: Gl2ContentMapBuilder.php ---
<?php

require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';


/**
 * This class adds structure of 'gl2_content' table to 'Geeklog_2' DatabaseMap object.
 *
 *
 * This class was autogenerated by Propel on:
 *
 * Fri Jul 27 14:15:18 2007
 *
 *
 * These statically-built map classes are used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    plugins.content.models.map
 */
class Gl2ContentMapBuilder {

	/**
	 * The (dot-path) name of this class
	 */
	const CLASS_NAME = 'plugins.content.models.map.Gl2ContentMapBuilder';

	/**
	 * The database map.
	 */
	private $dbMap;

	/**
	 * Tells us if this DatabaseMapBuilder is built so that we
	 * don't have to re-build it every time.
	 *
	 * @return     boolean true if this DatabaseMapBuilder is built, false otherwise.
	 */
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	/**
	 * Gets the databasemap this map builder built.
	 *
	 * @return     the databasemap
	 */
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	/**
	 * The doBuild() method builds the DatabaseMap
	 *
	 * @return     void
	 * @throws     PropelException
	 */
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('Geeklog_2');

		$tMap = $this->dbMap->addTable('gl2_content');
		$tMap->setPhpName('Gl2Content');

		$tMap->setUseIdGenerator(true);

		$tMap->addForeignKey('ITEM_ID', 'ItemId', 'int', CreoleTypes::INTEGER, 'gl2_item', 'ITEM_ID', true, null);

		$tMap->addPrimaryKey('CONTENT_ID', 'ContentId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('CONTENT_AUTHOR', 'ContentAuthor', 'string', CreoleTypes::VARCHAR, true, 150);

		$tMap->addColumn('CONTENT_TITLE', 'ContentTitle', 'string', CreoleTypes::VARCHAR, true, 255);

		$tMap->addColumn('DESCRIPTION', 'Description', 'string', CreoleTypes::LONGVARCHAR, false, null);

		$tMap->addColumn('CONTENT_BODY', 'ContentBody', 'string', CreoleTypes::LONGVARCHAR, false, null);

		$tMap->addColumn('CONTENT_URL', 'ContentUrl', 'string', CreoleTypes::VARCHAR, true, 255);

		$tMap->addForeignKey('CONTENT_TYPE', 'ContentType', 'int', CreoleTypes::INTEGER, 'gl2_list_item', 'LIST_ITEM_ID', true, null);

		$tMap->addColumn('NUM_CLICKS', 'NumClicks', 'int', CreoleTypes::INTEGER, true, null);

	} // doBuild()

} // Gl2ContentMapBuilder




More information about the geeklog-cvs mailing list