<?php

require_once 'common/bean/Bean.php';
require_once 'orm/mapping/OrmMapElement.php';
require_once 'orm/mapping/OrmMapElementId.php';
require_once 'orm/mapping/OrmMapElementProp.php';
require_once 'orm/mapping/OrmMapElementCollection.php';
require_once 'orm/mapping/OrmMapElementO2o.php';
require_once 'orm/mapping/OrmMapElementM2o.php';
require_once 'orm/mapping/OrmMapElementO2m.php';
require_once 'orm/mapping/OrmMapElementM2m.php';

/**
 * Map class.
 * 
 * This class holds a Map (DB schema mapping definition).
 * 
 * @author  $Author: pruna $
 * @package orm
 * @version $Revision: 1.3 $
 * @created 02-Apr-2005
 * @modified $Date: 2005/12/06 02:56:45 $
 */
class OrmMap extends Bean {
    
    /**
     * Constructor that defines basic properties for this Bean.
     * 
     * It follows Collection rules for constructor.
     * Basic elements are: 
     * <ul>
     * <li>beanName: Bean's name (string)</li>
     * <li>table: DB table's name (string)</li>
     * <li>tableAlias: DB table's name alias (string)</li>
     * <li>id: ElementId (object)</li>
     * <li>props: array of ElementProp objects (array)</li>
     * <li>o2os: array of ElementO2o objects (array)</li>
     * <li>o2ms: array of ElementO2m objects (array)</li>
     * <li>m2os: array of ElementM2o objects (array)</li>
     * <li>m2ms: array of ElementM2m objects (array)</li>
     * </ul>
     * Default values may serve as guide for preferred data types.
     * For a full description about this elements, see @docs
     * 
     * @access  public
     * @param   ICollection    $collection    Initial elements
     */
    public function __construct($collection = null) {
        parent::__construct(array(
            'beanName' => null,
            'table' => null,
            'tableAlias' => null,
            'id' => null,
            'props' => array(),
            'o2os' => array(),
            'o2ms' => array(),
            'm2os' => array(),
            'm2ms' => array(),
        ));
        $this->setAll($collection);
    }
    
}

?>