Gets all the versions of this object, in incremental order

@param   ConnectionInterface $con the connection to use

@return  ObjectCollection A list of ChildDealerFolderVersion objects
190438
public function getAllVersions($con = null)
    {
        $criteria = new Criteria();
        $criteria->addAscendingOrderByColumn(DealerFolderVersionTableMap::VERSION);

        return $this->getDealerFolderVersions($criteria, $con);
    }
763599
public function getParent(ConnectionInterface $con = null)
    {
        if (null === $this->aNestedSetParent && $this->hasParent()) {
            $this->aNestedSetParent = ChildCategoryQuery::create()
                ->ancestorsOf($this)
                ->orderByLevel(true)
                ->findOne($con);
        }

        return $this->aNestedSetParent;
    }
895780
public function getGroup(ConnectionInterface $con = null)
    {
        if ($this->aGroup === null && ($this->group_id !== null)) {
            $this->aGroup = ChildGroupQuery::create()->findPk($this->group_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aGroup->addSkillGroups($this);
             */
        }

        return $this->aGroup;
    }
357906
public function getLastVersions($number = 10, $criteria = null, $con = null)
    {
        $criteria = ChildDealerContactInfoVersionQuery::create(null, $criteria);
        $criteria->addDescendingOrderByColumn(DealerContactInfoVersionTableMap::VERSION);
        $criteria->limit($number);

        return $this->getDealerContactInfoVersions($criteria, $con);
    }
92431
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;


         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(PersonFunctionVersionTableMap::ID)) {
            $modifiedColumns[':p' . $index++]  = 'ID';
        }
        if ($this->isColumnModified(PersonFunctionVersionTableMap::CODE)) {
            $modifiedColumns[':p' . $index++]  = 'CODE';
        }
        if ($this->isColumnModified(PersonFunctionVersionTableMap::CREATED_AT)) {
            $modifiedColumns[':p' . $index++]  = 'CREATED_AT';
        }
        if ($this->isColumnModified(PersonFunctionVersionTableMap::UPDATED_AT)) {
            $modifiedColumns[':p' . $index++]  = 'UPDATED_AT';
        }
        if ($this->isColumnModified(PersonFunctionVersionTableMap::VERSION)) {
            $modifiedColumns[':p' . $index++]  = 'VERSION';
        }
        if ($this->isColumnModified(PersonFunctionVersionTableMap::VERSION_CREATED_AT)) {
            $modifiedColumns[':p' . $index++]  = 'VERSION_CREATED_AT';
        }
        if ($this->isColumnModified(PersonFunctionVersionTableMap::VERSION_CREATED_BY)) {
            $modifiedColumns[':p' . $index++]  = 'VERSION_CREATED_BY';
        }
        if ($this->isColumnModified(PersonFunctionVersionTableMap::PERSON_FUNCTION_LINK_IDS)) {
            $modifiedColumns[':p' . $index++]  = 'PERSON_FUNCTION_LINK_IDS';
        }
        if ($this->isColumnModified(PersonFunctionVersionTableMap::PERSON_FUNCTION_LINK_VERSIONS)) {
            $modifiedColumns[':p' . $index++]  = 'PERSON_FUNCTION_LINK_VERSIONS';
        }

        $sql = sprintf(
            'INSERT INTO person_function_version (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case 'ID':
                        $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
                        break;
                    case 'CODE':
                        $stmt->bindValue($identifier, $this->code, PDO::PARAM_STR);
                        break;
                    case 'CREATED_AT':
                        $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
                        break;
                    case 'UPDATED_AT':
                        $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
                        break;
                    case 'VERSION':
                        $stmt->bindValue($identifier, $this->version, PDO::PARAM_INT);
                        break;
                    case 'VERSION_CREATED_AT':
                        $stmt->bindValue($identifier, $this->version_created_at ? $this->version_created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
                        break;
                    case 'VERSION_CREATED_BY':
                        $stmt->bindValue($identifier, $this->version_created_by, PDO::PARAM_STR);
                        break;
                    case 'PERSON_FUNCTION_LINK_IDS':
                        $stmt->bindValue($identifier, $this->person_function_link_ids, PDO::PARAM_STR);
                        break;
                    case 'PERSON_FUNCTION_LINK_VERSIONS':
                        $stmt->bindValue($identifier, $this->person_function_link_versions, PDO::PARAM_STR);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        $this->setNew(false);
    }
394834
public function getCategory(ConnectionInterface $con = null)
    {
        if ($this->aCategory === null && ($this->category_id != 0)) {
            $this->aCategory = ChildCategoryQuery::create()->findPk($this->category_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aCategory->addC2Ms($this);
             */
        }

        return $this->aCategory;
    }
1132024
public function getBrand(ConnectionInterface $con = null)
    {
        if ($this->aBrand === null && ($this->brand_id !== null)) {
            $this->aBrand = BrandQuery::create()->findPk($this->brand_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aBrand->addDealerBrands($this);
             */
        }

        return $this->aBrand;
    }
1170564
public function addVersion($con = null)
    {
        $this->enforceVersion = false;

        $version = new ChildDealerShedulesVersion();
        $version->setId($this->getId());
        $version->setDealerId($this->getDealerId());
        $version->setDay($this->getDay());
        $version->setBegin($this->getBegin());
        $version->setEnd($this->getEnd());
        $version->setClosed($this->getClosed());
        $version->setPeriodBegin($this->getPeriodBegin());
        $version->setPeriodEnd($this->getPeriodEnd());
        $version->setCreatedAt($this->getCreatedAt());
        $version->setUpdatedAt($this->getUpdatedAt());
        $version->setVersion($this->getVersion());
        $version->setVersionCreatedAt($this->getVersionCreatedAt());
        $version->setVersionCreatedBy($this->getVersionCreatedBy());
        $version->setDealerShedules($this);
        if (($related = $this->getDealer($con)) && $related->getVersion()) {
            $version->setDealerIdVersion($related->getVersion());
        }
        $version->save($con);

        return $version;
    }
495370
public function getOneVersion($versionNumber, $con = null)
    {
        return ChildDealerVersionQuery::create()
            ->filterByDealer($this)
            ->filterByVersion($versionNumber)
            ->findOne($con);
    }
937769
public function getAllVersions($con = null)
    {
        $criteria = new Criteria();
        $criteria->addAscendingOrderByColumn(DealerVersionTableMap::VERSION);

        return $this->getDealerVersions($criteria, $con);
    }
340160
public function getNextSibling(ConnectionInterface $con = null)
    {
        return ChildCategoryQuery::create()
            ->filterByTreeLeft($this->getRightValue() + 1)
            ->findOne($con);
    }
1174416
public function getAllVersions($con = null)
    {
        $criteria = new Criteria();
        $criteria->addAscendingOrderByColumn(DealerAdminVersionTableMap::VERSION);

        return $this->getDealerAdminVersions($criteria, $con);
    }
1320690
public function getReference(ConnectionInterface $con = null)
    {
        if ($this->aReference === null && ($this->reference_id !== null)) {
            $this->aReference = ChildReferenceQuery::create()->findPk($this->reference_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aReference->addVideos($this);
             */
        }

        return $this->aReference;
    }
135670
public function getLastVersions($number = 10, $criteria = null, $con = null)
    {
        $criteria = ChildDealerBrandVersionQuery::create(null, $criteria);
        $criteria->addDescendingOrderByColumn(DealerBrandVersionTableMap::VERSION);
        $criteria->limit($number);

        return $this->getDealerBrandVersions($criteria, $con);
    }
314462
public function getIndexEngineIndex(ConnectionInterface $con = null)
    {
        if ($this->aIndexEngineIndex === null && ($this->id !== null)) {
            $this->aIndexEngineIndex = ChildIndexEngineIndexQuery::create()->findPk($this->id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aIndexEngineIndex->addIndexEngineIndexVersions($this);
             */
        }

        return $this->aIndexEngineIndex;
    }
129986
public function getMultipleOf(ConnectionInterface $con = null)
    {
        if ($this->aMultipleOf === null && ($this->multiple_of_id !== null)) {
            $this->aMultipleOf = ChildSkillQuery::create()->findPk($this->multiple_of_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aMultipleOf->addMultiples($this);
             */
        }

        return $this->aMultipleOf;
    }
787574
public function getDealerBrand(ConnectionInterface $con = null)
    {
        if ($this->aDealerBrand === null && ($this->id !== null)) {
            $this->aDealerBrand = ChildDealerBrandQuery::create()->findPk($this->id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aDealerBrand->addDealerBrandVersions($this);
             */
        }

        return $this->aDealerBrand;
    }