The general solution to the trace of the 4-dimensional Einstein equations for static, spherically symmetric configurations is used for finding general classes of black hole (BH) and wormhole metrics which may be asymptotically flat or have any other prescribed asymptotics. The procedure generically leads to families of solutions unifying globally regular BHs with a Kerr-like global structure and symmetric wormholes. The BH event horizons are generically simple or double, but inside matter distributions, they can be of any order under some special conditions. A few simple examples are discussed. A natural application of the above results, is the brane world concept, in which the trace of the 4D gravity equations is the only unambiguous equation for the 4D metric, and its solutions can be continued into the 5D bulk according to the embedding theorems.