Server s = null; switch(guessType(key)) { case BY_ID: s = mProv.get(ServerBy.id, key); break; case BY_NAME: default: s = mProv.get(ServerBy.name, key); break; }
Server s = mProv.get(guessServerBy(key), key);
    private Server lookupServer(String key) throws ServiceException {        Server s = null;        switch(guessType(key)) {        case BY_ID:            s = mProv.get(ServerBy.id, key);            break;        case BY_NAME:        default:                        s = mProv.get(ServerBy.name, key);            break;        }                if (s == null)            throw AccountServiceException.NO_SUCH_SERVER(key);        else            return s;    }