public function argsToCriteria()
    {
        $args = func_get_args();
        $first = array_shift($args);
        $criteria = $this->criteria();

        // already converted.
        if ($first instanceof Criteria\Criteria) {
            return $first;
        } elseif ($first instanceof Criteria\BaseCondition) {
            return $first->getCriteria();
        }

        // first argument is int ? then it's id.
        if (is_numeric($first)) {
            $criteria->where(sprintf('%s = ?', $this->getPrimaryKey()), $first);

        // first argument is string ? then simple where.
        } elseif(is_string($first)) {
            array_unshift($args, $first);
            call_user_func_array(array($criteria, 'where'), $args);
        }
        
        return $criteria;
    }