Package ru.bgcrm.plugin.bgbilling.proto.dao

# Class HelpDeskDAO

java.lang.Object
ru.bgcrm.plugin.bgbilling.dao.BillingDAO
ru.bgcrm.plugin.bgbilling.proto.dao.HelpDeskDAO

public class HelpDeskDAO extends BillingDAO

- ## Field Summary

  ### Fields inherited from class ru.bgcrm.plugin.bgbilling.dao.BillingDAO

  `dbInfo, jsonMapper, jsonTypeFactory, transferData, user`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HelpDeskDAO(User user, DBInfo dbInfo)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getAttach(int contractId, int id)`
  `HdMessage`
  `getMessage(int topicId, int messageId)`
  `Pair<HdTopic,List<HdMessage>>`
  `getTopicWithMessages(int topicId)`
  Requests a single topic with related massages.
  `void`
  `markMessageRead(int messageId)`
  `void`
  `putAttach(int messageId, String title, byte[] data)`
  `void`
  `searchTopicsWithMessages(Pageable<Pair<HdTopic,List<HdMessage>>> result, int topicId)`
  `void`
  `setTopicAutoClose(int contractId, int topicId, boolean value)`
  `void`
  `setTopicCost(int contractId, int topicId, BigDecimal cost)`
  `void`
  `setTopicExecutor(int topicId, int billingUserId)`
  `void`
  `setTopicExecutorMe(int topicId)`
  `void`
  `setTopicState(int topicId, boolean stateClose)`
  `void`
  `setTopicStatus(int contractId, int topicId, int status)`
  `void`
  `updateMessage(int topicId, HdMessage msg)`

  ### Methods inherited from class ru.bgcrm.plugin.bgbilling.dao.BillingDAO

  `doRequest, getDbInfo, getPage, getParameterId, getVersion, linesToString, readJsonValue, setPage`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HelpDeskDAO

    public HelpDeskDAO(User user, DBInfo dbInfo)

- ## Method Details

  - ### getTopicWithMessages

    public Pair<HdTopic,List<HdMessage>> getTopicWithMessages(int topicId)
    Requests a single topic with related massages.
    Parameters:
      `topicId` - the topic ID.
    Returns:
      the topic - messages pair, or `null`

  - ### updateMessage

    public void updateMessage(int topicId, HdMessage msg)

  - ### getMessage

    public HdMessage getMessage(int topicId, int messageId)

  - ### searchTopicsWithMessages

    public void searchTopicsWithMessages(Pageable<Pair<HdTopic,List<HdMessage>>> result, int topicId)

  - ### markMessageRead

    public void markMessageRead(int messageId)

  - ### setTopicState

    public void setTopicState(int topicId, boolean stateClose)

  - ### setTopicExecutor

    public void setTopicExecutor(int topicId, int billingUserId)

  - ### setTopicExecutorMe

    public void setTopicExecutorMe(int topicId)

  - ### setTopicStatus

    public void setTopicStatus(int contractId, int topicId, int status)

  - ### setTopicAutoClose

    public void setTopicAutoClose(int contractId, int topicId, boolean value)

  - ### setTopicCost

    public void setTopicCost(int contractId, int topicId, BigDecimal cost)

  - ### getAttach

    public byte[] getAttach(int contractId, int id) throws Exception
    Throws:
      `Exception`

  - ### putAttach

    public void putAttach(int messageId, String title, byte[] data) throws Exception
    Throws:
      `Exception`