class GuestService {

    public Optional<Guest> findByPublicId(String publicId) {
        TypedQuery<Guest> query = em.createNamedQuery(Guest.GUEST_FIND_BY_PUBLIC_ID, Guest.class);
        query.setParameter("publicId", publicId);
        List<Guest> resultList = query.getResultList();
        if (resultList.isEmpty()) {
            return empty();
        }
        return of(resultList.get(0));
    }

    public  GuestService();
    @Inject public  GuestService(@Background Event<Guest> guestEvents);

}