public function setSQL($sql)
    {
        if ((is_string($sql) && (strlen($sql) <= 0)) || (!is_string($sql) && ($sql !== null))) {
            throw SchemaException::invalidViewSQL($this->getName());
        }

        $this->sql = $sql;
    }