Class DefaultTicketDao
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
-
- de.hybris.platform.ticket.dao.impl.DefaultTicketDao
-
public class DefaultTicketDao extends AbstractItemDao implements TicketDao
Default implementation ofTicketDao
interface.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService
-
-
Constructor Summary
Constructors Constructor Description DefaultTicketDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SortQueryData
createSortQueryData(java.lang.String sortCode, java.lang.String query)
java.util.List<CsTicketEventModel>
findTicketEventsByTicket(CsTicketModel ticket)
Find all ticket events forCsTicketModel
object.java.util.List<CsTicketEventModel>
findTicketEventsForCustomerByTicket(CsTicketModel ticket)
Find all ticket events forCsTicketModel
object excluding private messages.java.util.List<CsTicketModel>
findTicketsByAgent(EmployeeModel agent)
Find all the tickets that are assigned to the Agent.java.util.List<CsTicketModel>
findTicketsByAgentGroup(CsAgentGroupModel agentGroup)
Find all the tickets assigned to the AgentGroup.java.util.List<CsTicketModel>
findTicketsByAgentGroupState(EmployeeModel agent, CsAgentGroupModel group, CsTicketState state)
Find tickets by the specified agent, group and state.java.util.List<CsTicketModel>
findTicketsByCategory(CsTicketCategory... category)
Find all the tickets that have the provided categories.java.util.List<CsTicketModel>
findTicketsByCustomer(UserModel customer)
Find all tickets that are associated with the customer.java.util.List<CsTicketModel>
findTicketsByCustomerOrderByModifiedTime(UserModel customer)
Find all tickets that are associated with the customer in descending and order by Modified date time.SearchPageData<CsTicketModel>
findTicketsByCustomerOrderByModifiedTime(UserModel user, BaseSiteModel baseSite, PageableData pageableData)
Find all tickets that are associated with the customer and current site, in descending and order by Modified date time.java.util.List<CsTicketModel>
findTicketsById(java.lang.String ticketId)
Lookup tickets with the specified ticket idjava.util.List<CsTicketModel>
findTicketsByOrder(OrderModel order)
Find all the tickets that are associated with the order.java.util.List<CsTicketModel>
findTicketsByPriority(CsTicketPriority... priority)
Find all the tickets that have the provided priorities.java.util.List<CsTicketModel>
findTicketsByResolutionType(CsResolutionType... resolutionType)
Find all the tickets that have the provided Resolution Type(s).java.util.List<CsTicketModel>
findTicketsByState(CsTicketState... state)
Find all the tickets that are in the provided states.java.util.List<CsTicketModel>
findTicketsByStringInTicketOrEvent(java.lang.String searchString)
Find tickets which contain the specified search string in the headline or any of the eventsjava.util.List<CsTicketModel>
findTicketsByStringInTicketOrEventAndStates(java.lang.String searchString, java.util.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.java.util.List<CsTicketModel>
findTicketsWithNullAgent()
Find all the tickets that are not assigned to an agent.java.util.List<CsTicketModel>
findTicketsWithNullAgentGroup()
Find all the tickets that are not assigne to an agent group.PagedFlexibleSearchService
getPagedFlexibleSearchService()
void
setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
-
Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
-
-
-
Method Detail
-
findTicketsByAgentGroupState
public java.util.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 interfaceTicketDao
- Parameters:
agent
- The agent to search for or null if nonegroup
- The group to search for or null if nonestate
- The state to search for or null if any- Returns:
- The list of tickets matching the specified critera
-
findTicketsByStringInTicketOrEvent
public java.util.List<CsTicketModel> findTicketsByStringInTicketOrEvent(java.lang.String searchString)
Find tickets which contain the specified search string in the headline or any of the events- Specified by:
findTicketsByStringInTicketOrEvent
in interfaceTicketDao
- Parameters:
searchString
- The string to find in the ticket- Returns:
- The list of tickets matching the criteria
-
findTicketsByStringInTicketOrEventAndStates
public java.util.List<CsTicketModel> findTicketsByStringInTicketOrEventAndStates(java.lang.String searchString, java.util.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 interfaceTicketDao
- Parameters:
searchString
- The string to find in the ticketstates
- The states that any returned tickets should be in- Returns:
- The list of tickets matching the criteria
-
findTicketEventsByTicket
public java.util.List<CsTicketEventModel> findTicketEventsByTicket(CsTicketModel ticket)
Find all ticket events forCsTicketModel
object.- Specified by:
findTicketEventsByTicket
in interfaceTicketDao
- Parameters:
ticket
- theCsTicketModel
for which to return ticket events.- Returns:
- A list of ticket events matching search criteria.
-
findTicketEventsForCustomerByTicket
public java.util.List<CsTicketEventModel> findTicketEventsForCustomerByTicket(CsTicketModel ticket)
Find all ticket events forCsTicketModel
object excluding private messages.- Specified by:
findTicketEventsForCustomerByTicket
in interfaceTicketDao
- Parameters:
ticket
- theCsTicketModel
for which to return ticket events.- Returns:
- A list of ticket events matching search criteria.
-
findTicketsByAgent
public java.util.List<CsTicketModel> findTicketsByAgent(EmployeeModel agent)
Find all the tickets that are assigned to the Agent.- Specified by:
findTicketsByAgent
in interfaceTicketDao
- Parameters:
agent
- The agent to find assigned tickets for- Returns:
- A list of tickets matching search criteria
-
findTicketsByAgentGroup
public java.util.List<CsTicketModel> findTicketsByAgentGroup(CsAgentGroupModel agentGroup)
Find all the tickets assigned to the AgentGroup.- Specified by:
findTicketsByAgentGroup
in interfaceTicketDao
- Parameters:
agentGroup
- The AgentGroup to find assigned tickets for- Returns:
- A list of tickets matching search criteria
-
findTicketsByCategory
public java.util.List<CsTicketModel> findTicketsByCategory(CsTicketCategory... category)
Find all the tickets that have the provided categories.- Specified by:
findTicketsByCategory
in interfaceTicketDao
- 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 java.util.List<CsTicketModel> findTicketsByCustomer(UserModel customer)
Find all tickets that are associated with the customer.- Specified by:
findTicketsByCustomer
in interfaceTicketDao
- Parameters:
customer
- The customer to find tickets for- Returns:
- A list of tickets matching search criteria
-
findTicketsById
public java.util.List<CsTicketModel> findTicketsById(java.lang.String ticketId)
Lookup tickets with the specified ticket id- Specified by:
findTicketsById
in interfaceTicketDao
- Parameters:
ticketId
- The id of the ticket to lookup- Returns:
- The tickets with that Id
-
findTicketsByOrder
public java.util.List<CsTicketModel> findTicketsByOrder(OrderModel order)
Find all the tickets that are associated with the order.- Specified by:
findTicketsByOrder
in interfaceTicketDao
- Parameters:
order
- The order to find tickets for- Returns:
- A list of tickets matching search criteria
-
findTicketsByPriority
public java.util.List<CsTicketModel> findTicketsByPriority(CsTicketPriority... priority)
Find all the tickets that have the provided priorities.- Specified by:
findTicketsByPriority
in interfaceTicketDao
- 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 java.util.List<CsTicketModel> findTicketsByResolutionType(CsResolutionType... resolutionType)
Find all the tickets that have the provided Resolution Type(s).- Specified by:
findTicketsByResolutionType
in interfaceTicketDao
- 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 java.util.List<CsTicketModel> findTicketsByState(CsTicketState... state)
Find all the tickets that are in the provided states.- Specified by:
findTicketsByState
in interfaceTicketDao
- 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 java.util.List<CsTicketModel> findTicketsWithNullAgent()
Find all the tickets that are not assigned to an agent.- Specified by:
findTicketsWithNullAgent
in interfaceTicketDao
- Returns:
- A list of tickets not assigned to an agent
-
findTicketsWithNullAgentGroup
public java.util.List<CsTicketModel> findTicketsWithNullAgentGroup()
Find all the tickets that are not assigne to an agent group.- Specified by:
findTicketsWithNullAgentGroup
in interfaceTicketDao
- Returns:
- A list of tickets not assigned to an agent group
-
findTicketsByCustomerOrderByModifiedTime
public java.util.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 interfaceTicketDao
- 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 interfaceTicketDao
- Returns:
- List
-
createSortQueryData
protected SortQueryData createSortQueryData(java.lang.String sortCode, java.lang.String query)
-
getPagedFlexibleSearchService
public PagedFlexibleSearchService getPagedFlexibleSearchService()
- Returns:
- the pagedFlexibleSearchService
-
setPagedFlexibleSearchService
public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
- Parameters:
pagedFlexibleSearchService
- the pagedFlexibleSearchService to set
-
-