public function import($criteria)
    {
        if ($criteria instanceof WhereCondition) {
            $criteria = $criteria->parent;
        }
        if ($criteria instanceof Criteria) {
            if ($criteria->where->has()) {
                foreach ($criteria->where->conditions as $condition) {
                    $condition->parent = $this->where;
                    $this->where->conditions[] = $condition;
                }
            }
            if ($criteria->order->has()) {
                $this->order->conditions = $criteria->order->conditions;
                $this->order->params = $criteria->order->params;
            }
            if ($criteria->limit !== null) $this->limit($criteria->limit);
            if ($criteria->offset !== null) $this->offset($criteria->offset);
        }
    }