static public function doSelectOrderByRank(Criteria $criteria = null, $order = Criteria::ASC, ConnectionInterface $con = null)
    {
        if (null === $con) {
            $con = Propel::getServiceContainer()->getReadConnection(CustomerGroupTableMap::DATABASE_NAME);
        }

        if (null === $criteria) {
            $criteria = new Criteria();
        } elseif ($criteria instanceof Criteria) {
            $criteria = clone $criteria;
        }

        $criteria->clearOrderByColumns();

        if (Criteria::ASC == $order) {
            $criteria->addAscendingOrderByColumn(CustomerGroupTableMap::RANK_COL);
        } else {
            $criteria->addDescendingOrderByColumn(CustomerGroupTableMap::RANK_COL);
        }

        return ChildCustomerGroupQuery::create(null, $criteria)->find($con);
    }