require_once 'propel/map/MapBuilder.php'; include_once 'creole/CreoleTypes.php'; /** * This class adds structure of 'getName() ?>' table to 'getDatabase()->getName() ?>' DatabaseMap object. * * 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). * * This class was autogenerated by Propel on: * * [] * * @see BasePeer * @see DatabaseMap * @package .map; */ class getPhpName() ?>MapBuilder extends MapBuilder { /** * Returns the name of this class. */ function CLASS_NAME() { return ("getPhpName() ?>MapBuilder"); } /** * The database map. */ var $dbMap = null; /** * 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 */ function isBuilt() { return ($this->dbMap !== null); } /** * Gets the databasemap this map builder built. * * @return DatabaseMap This database map. */ function & getDatabaseMap() { return $this->dbMap; } /** * The doBuild() method builds the DatabaseMap * * @return void * @throws PropelException */ function doBuild() { $this->dbMap =& Propel::getDatabaseMap("getDatabase()->getName() ?>"); $tMap =& $this->dbMap->addTable("getName()?>"); $tMap->setPhpName("getPhpName()?>"); getIdMethod() == "native") { ?> $tMap->setUseIdGenerator(true); $tMap->setUseIdGenerator(false); getIdMethodParameters()) { $params = $table->getIdMethodParameters(); $imp = $params[0]; ?> $tMap->setPrimaryKeyMethodInfo("getValue() ?>"); getIdMethod() == "native" && ($platform->getNativeIdMethod() == Platform::SEQUENCE)) { ?> $tMap->setPrimaryKeyMethodInfo("getSequenceName() ?>"); getIdMethod() == "native" && ($platform->getNativeIdMethod() == Platform::SEQUENCE)) { ?> $tMap->setPrimaryKeyMethodInfo("getName() ?>"); // Add columns to map getColumns() as $col) { $tfc=$table->getPhpName(); $cfc=$col->getPhpName(); $cup=strtoupper($col->getName()); if($col->isPrimaryKey()) { if($col->isForeignKey()) { ?> $tMap->addForeignPrimaryKey("", "", "getPhpType() ?>" , CreoleTypes::getType() ?>(), "getRelatedTableName()?>" , "getRelatedColumnName()) ?>", isNotNull() ? 'true' : 'false' ?>); $tMap->addPrimaryKey("", "", "getPhpType() ?>", CreoleTypes::getType() ?>(), isNotNull() ? 'true' : 'false' ?>); isForeignKey()) { ?> $tMap->addForeignKey("", "", "getPhpType()?>", CreoleTypes::getType() ?>(), "getRelatedTableName() ?>" , "getRelatedColumnName()) ?>", isNotNull() ? 'true' : 'false' ?>); getSize()) { $size = "null"; } else { $size = $col->getSize(); } ?> $tMap->addColumn("", "", "getPhpType()?>", CreoleTypes::getType() ?>(), isNotNull() ? 'true' : 'false' ?>, ); getValidators() as $val) { $col = $val->getColumn(); $cup = strtoupper($col->getName()); foreach($val->getRules() as $rule) { if ($val->getTranslate() !== Validator::TRANSLATE_NONE) { ?> $tMap->addValidator("", "getName() ?>", "getClass() ?>", "getValue()?>", getTranslate() ?>("getMessage()) ?>")); $tMap->addValidator("", "getName() ?>", "getClass() ?>", "getValue()?>", "getMessage()) ?>"); getTranslation() ... } // foreach validator } ?> } }