Class TicketService.TargetAddition

java.lang.Object
ubic.gemma.persistence.service.common.auditAndSecurity.curation.TicketService.TargetAddition
Enclosing interface:
TicketService

public static class TicketService.TargetAddition extends Object
What TicketService.addTarget(Ticket, TicketTargetType, Long, Contact) did: the saved ticket, and whether the target was new to it.

🛑 The flag is reported here rather than left for the caller to infer, because inferring it means measuring ticket.getTargets() before and after — a LAZY collection that a caller outside the service's transaction holds detached. POST /tickets/{id}/targets did exactly that and threw LazyInitializationException on every call, so the one verb that grows a queue was a 500 while its mocked test stayed green.

Author:
paul
  • Constructor Details

    • TargetAddition

      public TargetAddition(Ticket ticket, boolean added)
  • Method Details

    • getTicket

      public Ticket getTicket()
    • isAdded

      public boolean isAdded()
      False when the target was already on the ticket.