Class DefaultTicketDao

java.lang.Object
de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
de.hybris.platform.ticket.dao.impl.DefaultTicketDao
All Implemented Interfaces:
Dao, TicketDao

public class DefaultTicketDao extends AbstractItemDao implements TicketDao
Default implementation of TicketDao interface.
  • Constructor Details

    • DefaultTicketDao

      public DefaultTicketDao()
  • Method Details

    • findTicketsByAgentGroupState

      public List<CsTicketModel> findTicketsByAgentGroupState(EmployeeModel agent, CsAgentGroupModel group, CsTicketState state)
      Find tickets by the specified agent, group and state. If any of these parameters are null, they should be considered "don't care" - i.e. don't include in the query
      Specified by:
      findTicketsByAgentGroupState in interface TicketDao
      Parameters:
      agent - The agent to search for or null if none
      group - The group to search for or null if none
      state - The state to search for or null if any
      Returns:
      The list of tickets matching the specified critera
    • findTicketsByStringInTicketOrEvent

      public List<CsTicketModel> findTicketsByStringInTicketOrEvent(String searchString)
      Find tickets which contain the specified search string in the headline or any of the events
      Specified by:
      findTicketsByStringInTicketOrEvent in interface TicketDao
      Parameters:
      searchString - The string to find in the ticket
      Returns:
      The list of tickets matching the criteria
    • findTicketsByStringInTicketOrEventAndStates

      public List<CsTicketModel> findTicketsByStringInTicketOrEventAndStates(String searchString, Set<CsTicketState> states)
      Find tickets which contain the specified search string in the headline or any of the events and that are also in the given list of states. If the list of states is empty or null then the state should not be considered in the query.
      Specified by:
      findTicketsByStringInTicketOrEventAndStates in interface TicketDao
      Parameters:
      searchString - The string to find in the ticket
      states - The states that any returned tickets should be in
      Returns:
      The list of tickets matching the criteria
    • findTicketEventsByTicket

      public List<CsTicketEventModel> findTicketEventsByTicket(CsTicketModel ticket)
      Find all ticket events for CsTicketModel object.
      Specified by:
      findTicketEventsByTicket in interface TicketDao
      Parameters:
      ticket - the CsTicketModel for which to return ticket events.
      Returns:
      A list of ticket events matching search criteria.
    • findTicketEventsForCustomerByTicket

      public List<CsTicketEventModel> findTicketEventsForCustomerByTicket(CsTicketModel ticket)
      Find all ticket events for CsTicketModel object excluding private messages.
      Specified by:
      findTicketEventsForCustomerByTicket in interface TicketDao
      Parameters:
      ticket - the CsTicketModel for which to return ticket events.
      Returns:
      A list of ticket events matching search criteria.
    • findTicketEventsByEventCode

      public List<CsTicketEventModel> findTicketEventsByEventCode(CsTicketModel ticket, String eventCode)
      Lookup events of the specified CsTicketModel object with the specified event code
      Specified by:
      findTicketEventsByEventCode in interface TicketDao
      Parameters:
      ticket - the CsTicketModel for which to return ticket events.
      eventCode - The code of the ticket event to lookup
      Returns:
      The ticket events with that event code
    • findTicketEventsForCustomerByEventCode

      public List<CsTicketEventModel> findTicketEventsForCustomerByEventCode(CsTicketModel ticket, String eventCode)
      Lookup events of the specified CsTicketModel object with the specified event code, excluding private messages
      Specified by:
      findTicketEventsForCustomerByEventCode in interface TicketDao
      Parameters:
      ticket - the CsTicketModel for which to return ticket events.
      eventCode - The code of the ticket event to lookup
      Returns:
      The ticket events with that event code
    • findTicketsByAgent

      public List<CsTicketModel> findTicketsByAgent(EmployeeModel agent)
      Find all the tickets that are assigned to the Agent.
      Specified by:
      findTicketsByAgent in interface TicketDao
      Parameters:
      agent - The agent to find assigned tickets for
      Returns:
      A list of tickets matching search criteria
    • findTicketsByAgentGroup

      public List<CsTicketModel> findTicketsByAgentGroup(CsAgentGroupModel agentGroup)
      Find all the tickets assigned to the AgentGroup.
      Specified by:
      findTicketsByAgentGroup in interface TicketDao
      Parameters:
      agentGroup - The AgentGroup to find assigned tickets for
      Returns:
      A list of tickets matching search criteria
    • findTicketsByCategory

      public List<CsTicketModel> findTicketsByCategory(CsTicketCategory... category)
      Find all the tickets that have the provided categories.
      Specified by:
      findTicketsByCategory in interface TicketDao
      Parameters:
      category - The category/categories for which to return tickets. The number of arguments is variable and may be zero, although zero arguments will return an empty list.
      Returns:
      A list of tickets matching search criteria
    • findTicketsByCustomer

      public List<CsTicketModel> findTicketsByCustomer(UserModel customer)
      Find all tickets that are associated with the customer.
      Specified by:
      findTicketsByCustomer in interface TicketDao
      Parameters:
      customer - The customer to find tickets for
      Returns:
      A list of tickets matching search criteria
    • findTicketsById

      public List<CsTicketModel> findTicketsById(String ticketId)
      Lookup tickets with the specified ticket id
      Specified by:
      findTicketsById in interface TicketDao
      Parameters:
      ticketId - The id of the ticket to lookup
      Returns:
      The tickets with that Id
    • findTicketsByOrder

      public List<CsTicketModel> findTicketsByOrder(OrderModel order)
      Find all the tickets that are associated with the order.
      Specified by:
      findTicketsByOrder in interface TicketDao
      Parameters:
      order - The order to find tickets for
      Returns:
      A list of tickets matching search criteria
    • findTicketsByPriority

      public List<CsTicketModel> findTicketsByPriority(CsTicketPriority... priority)
      Find all the tickets that have the provided priorities.
      Specified by:
      findTicketsByPriority in interface TicketDao
      Parameters:
      priority - The priority/priorities for which to return tickets. The number of arguments is variable and may be zero, although zero arguments will return an empty list.
      Returns:
      A list of tickets matching search criteria
    • findTicketsByResolutionType

      public List<CsTicketModel> findTicketsByResolutionType(CsResolutionType... resolutionType)
      Find all the tickets that have the provided Resolution Type(s).
      Specified by:
      findTicketsByResolutionType in interface TicketDao
      Parameters:
      resolutionType - The Resolution Type(s) for which to return tickets. The number of arguments is variable and may be zero, although zero arguments will return an empty list.
      Returns:
      A list of tickets matching search criteria
    • findTicketsByState

      public List<CsTicketModel> findTicketsByState(CsTicketState... state)
      Find all the tickets that are in the provided states.
      Specified by:
      findTicketsByState in interface TicketDao
      Parameters:
      state - The state(s) for which to return tickets. The number of arguments is variable and may be zero, although zero arguments will return an empty list.
      Returns:
      A list of tickets matching search criteria
    • findTicketsWithNullAgent

      public List<CsTicketModel> findTicketsWithNullAgent()
      Find all the tickets that are not assigned to an agent.
      Specified by:
      findTicketsWithNullAgent in interface TicketDao
      Returns:
      A list of tickets not assigned to an agent
    • findTicketsWithNullAgentGroup

      public List<CsTicketModel> findTicketsWithNullAgentGroup()
      Find all the tickets that are not assigne to an agent group.
      Specified by:
      findTicketsWithNullAgentGroup in interface TicketDao
      Returns:
      A list of tickets not assigned to an agent group
    • findTicketsByCustomerOrderByModifiedTime

      public List<CsTicketModel> findTicketsByCustomerOrderByModifiedTime(UserModel customer)
      Description copied from interface: TicketDao
      Find all tickets that are associated with the customer in descending and order by Modified date time.
      Specified by:
      findTicketsByCustomerOrderByModifiedTime in interface TicketDao
      Returns:
      List
    • findTicketsByCustomerOrderByModifiedTime

      public SearchPageData<CsTicketModel> findTicketsByCustomerOrderByModifiedTime(UserModel user, BaseSiteModel baseSite, PageableData pageableData)
      Description copied from interface: TicketDao
      Find all tickets that are associated with the customer and current site, in descending and order by Modified date time.
      Specified by:
      findTicketsByCustomerOrderByModifiedTime in interface TicketDao
      Returns:
      List
    • createSortQueryData

      protected SortQueryData createSortQueryData(String sortCode, String query)
    • getPagedFlexibleSearchService

      public PagedFlexibleSearchService getPagedFlexibleSearchService()
      Returns:
      the pagedFlexibleSearchService
    • setPagedFlexibleSearchService

      public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
      Parameters:
      pagedFlexibleSearchService - the pagedFlexibleSearchService to set
    • findTicketsBySiteAndCustomer

      public List<CsTicketModel> findTicketsBySiteAndCustomer(BaseSiteModel baseSite, UserModel customer)
      Find all tickets that are associated with the customer in descending and order by Modified date time.
      Specified by:
      findTicketsBySiteAndCustomer in interface TicketDao
      Parameters:
      baseSite - The base site
      customer - The customer to find tickets for
      Returns:
      A list of tickets matching search criteria