private Option<Address> findAddressOfOwnerByPhoneNumber(String number, Integer ownerId) { if (checkOwner) { return addressDAO.findAddressOfOwnerByCategoryAndPhoneNumber(ownerId, category, number); } else { return addressDAO.findAddressByCategoryAndPhoneNumber(category, number); } }
@Override public Option<Address> findAddressOfOwnerByPhoneNumber(PhoneNumber number, Integer ownerId) { if (checkOwner) { return addressDAO.findAddressOfOwnerByCategoryAndPhoneNumber(ownerId, category, number); } else { return addressDAO.findAddressByCategoryAndPhoneNumber(category, number); } }