Class TicketSummaryForTargetValueObject

java.lang.Object
ubic.gemma.model.common.auditAndSecurity.curation.TicketSearchHitValueObject
ubic.gemma.model.common.auditAndSecurity.curation.TicketSummaryForTargetValueObject
All Implemented Interfaces:
Serializable

public class TicketSummaryForTargetValueObject extends TicketSearchHitValueObject
One open ticket as it bears on ONE target — the per-ticket summary plus that target's own TicketTargetStatus.

Why this is a subtype rather than a field on TicketSearchHitValueObject

targetStatus is per-TARGET and a ticket can hold many, so it is not a property of the ticket. TicketSearchHitValueObject is also produced by TicketDaoImpl.buildSearchHitHql, which selects from Ticket with no join to t.targets and so has no target to report a status for. A nullable field on the shared VO would therefore be populated on the bulk summaries route and null on every search route, and that null would be indistinguishable from a TicketTargetStatus.NOT_DONE that failed to load — the reading that NOT_DONE default exists to make impossible.

As a subtype the field exists only where it is always populated. Callers wanting the ticket alone keep the base type, and the JSON is the same object with one more key.

Note the shape this carries: findOpenSummariesForTargets returns one of these per (ticket, target) pair, keyed by target id, so within one target's list every entry is that target's own status. Nothing folds across a ticket's other targets.

Author:
gembro
See Also: