generic method getDomain()