Class TicketSearchHitValueObject
java.lang.Object
ubic.gemma.model.common.auditAndSecurity.curation.TicketSearchHitValueObject
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TicketSummaryForTargetValueObject
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 Summary
ConstructorsConstructorDescriptionTicketSearchHitValueObject(Long id, String title, TicketState state, TicketType type, long targetCount, Date updatedAt, TicketPriority priority) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanstatic TicketSearchHitValueObjectProject one row of the/tickets/searchHQL projection.getId()The ticket's priority.getState()longHow manyTicketTargets the ticket holds.getTitle()getType()inthashCode()voidvoidsetPriority(TicketPriority priority) The ticket's priority.voidsetState(TicketState state) voidsetTargetCount(long targetCount) How manyTicketTargets the ticket holds.voidvoidsetType(TicketType type) voidsetUpdatedAt(Date updatedAt) toString()
-
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
Project one row of the/tickets/searchHQL 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 isTicketDaoImpl.buildSearchHitHql, and its select list is asserted against this order inTicketSearchQueryTest. -
getId
-
getTitle
-
getState
-
getType
-
getTargetCount
public long getTargetCount()How manyTicketTargets the ticket holds. A count, never the targets themselves. -
getUpdatedAt
-
getPriority
The ticket's priority. Never null:Ticketdefaults it toTicketPriority.NORMAL. -
setId
-
setTitle
-
setState
-
setType
-
setTargetCount
public void setTargetCount(long targetCount) How manyTicketTargets the ticket holds. A count, never the targets themselves. -
setUpdatedAt
-
setPriority
The ticket's priority. Never null:Ticketdefaults it toTicketPriority.NORMAL. -
equals
-
canEqual
-
hashCode
-
toString
-