test_class.declarator: guestService
test_class.modifier: private
test_class.original_string: private GuestService guestService;
test_class.type: GuestService
test_class.var_name: guestService
test_class.declarator: WELL_KNOWN_ID = 9999L
test_class.modifier: private static final
test_class.original_string: private static final Long WELL_KNOWN_ID = 9999L;
test_class.type: Long
test_class.var_name: WELL_KNOWN_ID
test_class.file: guest/src/test/java/org/koenighotze/jee7hotel/guest/business/GuestServiceTest.java
test_class.identifier: GuestServiceTest
test_class.superclass: extends AbstractBasePersistenceTest
test_case.body: @Test
      public void saving_a_guest_sets_the_technical_id() {
          Guest guest = new Guest("jjjkl", "name", "email@foo.de");
  
          guestService.saveGuest(guest);
          getEntityManager().flush(); // fore id pickup
  
          assertThat(guest.getId()).isNotNull();
      }
test_case.class_method_signature: GuestServiceTest.saving_a_guest_sets_the_technical_id()
test_case.full_signature: @Test public void saving_a_guest_sets_the_technical_id()
test_case.identifier: saving_a_guest_sets_the_technical_id
test_case.invocations: saveGuest flush getEntityManager isNotNull assertThat getId
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void saving_a_guest_sets_the_technical_id()
focal_class.declarator: LOGGER = Logger.getLogger(GuestService.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(GuestService.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: em
focal_class.modifier: @PersistenceContext
      private
focal_class.original_string: @PersistenceContext
      private EntityManager em;
focal_class.type: EntityManager
focal_class.var_name: em
focal_class.declarator: guestEvents
focal_class.modifier: private
focal_class.original_string: private Event<Guest> guestEvents;
focal_class.type: Event<Guest>
focal_class.var_name: guestEvents
focal_class.file: guest/src/main/java/org/koenighotze/jee7hotel/guest/business/GuestService.java
focal_class.identifier: GuestService
focal_class.class_method_signature: GuestService.GuestService()
focal_class.full_signature: public  GuestService()
focal_class.identifier: GuestService
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  GuestService()
focal_class.class_method_signature: GuestService.GuestService(@Background Event<Guest> guestEvents)
focal_class.full_signature: @Inject public  GuestService(@Background Event<Guest> guestEvents)
focal_class.identifier: GuestService
focal_class.modifiers: @Inject public
focal_class.parameters: (@Background Event<Guest> guestEvents)
focal_class.signature:  GuestService(@Background Event<Guest> guestEvents)
focal_class.class_method_signature: GuestService.setEntityManager(EntityManager em)
focal_class.full_signature: public void setEntityManager(EntityManager em)
focal_class.identifier: setEntityManager
focal_class.modifiers: public
focal_class.parameters: (EntityManager em)
focal_class.return: void
focal_class.signature: void setEntityManager(EntityManager em)
focal_class.class_method_signature: GuestService.saveGuest(Guest guest)
focal_class.full_signature: public void saveGuest(Guest guest)
focal_class.identifier: saveGuest
focal_class.modifiers: public
focal_class.parameters: (Guest guest)
focal_class.return: void
focal_class.signature: void saveGuest(Guest guest)
focal_class.class_method_signature: GuestService.findSingleGuestById(@PathParam("guestId") Long guestId)
focal_class.full_signature: public Guest findSingleGuestById(@PathParam("guestId") Long guestId)
focal_class.identifier: findSingleGuestById
focal_class.modifiers: public
focal_class.parameters: (@PathParam("guestId") Long guestId)
focal_class.return: Guest
focal_class.signature: Guest findSingleGuestById(@PathParam("guestId") Long guestId)
focal_class.class_method_signature: GuestService.getAllGuests()
focal_class.full_signature: public List<Guest> getAllGuests()
focal_class.identifier: getAllGuests
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Guest>
focal_class.signature: List<Guest> getAllGuests()
focal_class.class_method_signature: GuestService.findById(@PathParam("guestId") Long guestId)
focal_class.full_signature: public Optional<Guest> findById(@PathParam("guestId") Long guestId)
focal_class.identifier: findById
focal_class.modifiers: public
focal_class.parameters: (@PathParam("guestId") Long guestId)
focal_class.return: Optional<Guest>
focal_class.signature: Optional<Guest> findById(@PathParam("guestId") Long guestId)
focal_class.class_method_signature: GuestService.updateGuestDetails(Guest guest)
focal_class.full_signature: public Optional<Guest> updateGuestDetails(Guest guest)
focal_class.identifier: updateGuestDetails
focal_class.modifiers: public
focal_class.parameters: (Guest guest)
focal_class.return: Optional<Guest>
focal_class.signature: Optional<Guest> updateGuestDetails(Guest guest)
focal_class.class_method_signature: GuestService.findByPublicId(String publicId)
focal_class.full_signature: public Optional<Guest> findByPublicId(String publicId)
focal_class.identifier: findByPublicId
focal_class.modifiers: public
focal_class.parameters: (String publicId)
focal_class.return: Optional<Guest>
focal_class.signature: Optional<Guest> findByPublicId(String publicId)
focal_class.class_method_signature: GuestService.deleteGuest(@NotNull String publicId)
focal_class.full_signature: public boolean deleteGuest(@NotNull String publicId)
focal_class.identifier: deleteGuest
focal_class.modifiers: public
focal_class.parameters: (@NotNull String publicId)
focal_class.return: boolean
focal_class.signature: boolean deleteGuest(@NotNull String publicId)
focal_method.body: public void saveGuest(Guest guest) {
          LOGGER.info(() -> "Saving guest " + guest);
  
          if (isBlank(guest.getPublicId())) {
              guest.setPublicId(randomUUID().toString());
          }
  
          this.em.persist(guest);
  
          guestEvents.fire(guest);
      }
focal_method.class_method_signature: GuestService.saveGuest(Guest guest)
focal_method.full_signature: public void saveGuest(Guest guest)
focal_method.identifier: saveGuest
focal_method.invocations: info isBlank getPublicId setPublicId toString randomUUID persist fire
focal_method.modifiers: public
focal_method.parameters: (Guest guest)
focal_method.return: void
focal_method.signature: void saveGuest(Guest guest)