@_uses_db<EOL><INDENT>def get_domain(self, domain_name):<DEDENT>
protocol = self.database_uri.split('<STR_LIT::>', <NUM_LIT:1>)[<NUM_LIT:0>]<EOL>if protocol in ('<STR_LIT>', '<STR_LIT:http>'):<EOL><INDENT>return self._get_domain_from_rest_api(domain_name)<EOL><DEDENT>else:<EOL><INDENT>domain = self._get_domain_from_db(domain_name)<EOL>if domain:<EOL><INDENT>return domain<EOL><DEDENT>else:<EOL><INDENT>raise NoSuchDomainException<EOL><DEDENT><DEDENT>
Get the :class:`Domain <pwm.Domain>` object from a name.

        :param domain_name: The domain name to fetch the object for.
        :returns: The :class:`Domain <pwm.core.Domain>` class with this domain_name if found, else
            None.