Class TicketSearchHitValueObject

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

public class TicketSearchHitValueObject extends Object implements Serializable
One row of GET /tickets/search — enough of a ticket to pick it out of a list with confidence, and nothing more.

Deliberately not TicketValueObject: that carries the ticket's targets and events collections, so rendering twenty picker rows for a ticket holding five hundred targets would ship several hundred target rows the picker never draws. This VO carries targetCount instead, counted by the database (see TicketDaoImpl.buildSearchHitHql), and the caller fetches GET /tickets/{id} when it actually wants the targets.

Author:
paul
See Also:
  • Constructor Details

    • TicketSearchHitValueObject

      public TicketSearchHitValueObject()
    • TicketSearchHitValueObject

      public TicketSearchHitValueObject(Long id, String title, TicketState state, TicketType type, long targetCount, Date updatedAt, TicketPriority priority)
  • Method Details

    • fromRow

      public static TicketSearchHitValueObject fromRow(Object[] row)
      Project one row of the /tickets/search HQL projection.

      The columns are positional, so this and the query's select list have to agree. The order is id, title (the NAME column), state, type, targetCount, updatedAt, priority; the query builder that emits it is TicketDaoImpl.buildSearchHitHql, and its select list is asserted against this order in TicketSearchQueryTest.

    • getId

      public Long getId()
    • getTitle

      public String getTitle()
    • getState

      public TicketState getState()
    • getType

      public TicketType getType()
    • getTargetCount

      public long getTargetCount()
      How many TicketTargets the ticket holds. A count, never the targets themselves.
    • getUpdatedAt

      public Date getUpdatedAt()
    • getPriority

      public TicketPriority getPriority()
      The ticket's priority. Never null: Ticket defaults it to TicketPriority.NORMAL.
    • setId

      public void setId(Long id)
    • setTitle

      public void setTitle(String title)
    • setState

      public void setState(TicketState state)
    • setType

      public void setType(TicketType type)
    • setTargetCount

      public void setTargetCount(long targetCount)
      How many TicketTargets the ticket holds. A count, never the targets themselves.
    • setUpdatedAt

      public void setUpdatedAt(Date updatedAt)
    • setPriority

      public void setPriority(TicketPriority priority)
      The ticket's priority. Never null: Ticket defaults it to TicketPriority.NORMAL.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object