Package ru.bitel.bgbilling.kernel.contract.label.server.bean

# Class ContractLabelManager

java.lang.Object
ru.bitel.bgbilling.kernel.contract.label.server.bean.ContractLabelManager

    public class ContractLabelManager
    extends java.lang.Object

- ## Field Summary

  Fields
  Modifier and Type | Field | Description
  --- | --- | ---
  `protected static java.lang.String` | `TABLE_CONTRACT_LABEL` |
  `protected static java.lang.String` | `TABLE_CONTRACT_LABEL_LINK` |

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `ContractLabelManager​(java.sql.Connection con)` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `protected void` | `addChild​(int up, ContractLabelItem rootItem, java.util.List<ContractLabelItem> list)` |
  `int` | `getContractCountByLabel​(int labelId)` |
  `java.util.List<java.lang.Integer>` | `getContractLabelIds​(int contractId)` |
  `java.util.List<ContractLabelItem>` | `getContractLabelItemList​(boolean calcCount)` |
  `java.util.Map<java.lang.Integer,​java.util.List<java.lang.Integer>>` | `getContractListWithLabels()` |
  `ContractLabelItem` | `getTree()` |
  `void` | `removeContractLabelItem​(int contractLabelItemId)` |
  `void` | `setContractLabelIds​(int contractId, java.util.List<java.lang.Integer> ids)` |
  `void` | `syncLabelAndGroupContract​(int contractId)` | Синхронизация групп договоров и меток договоров (копирует группы в метки)
  `void` | `syncLabelAndGroupDirectory()` |
  `void` | `updateContractLabelTreeItem​(ContractLabelItem contractLabelItem)` |

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

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

- ## Field Details

  - ### TABLE_CONTRACT_LABEL

    protected static final java.lang.String TABLE_CONTRACT_LABEL
    See Also:
      Constant Field Values

  - ### TABLE_CONTRACT_LABEL_LINK

    protected static final java.lang.String TABLE_CONTRACT_LABEL_LINK
    See Also:
      Constant Field Values

- ## Constructor Details

  - ### ContractLabelManager

    public ContractLabelManager​(java.sql.Connection con)

- ## Method Details

  - ### getContractLabelItemList

    public java.util.List<ContractLabelItem> getContractLabelItemList​(boolean calcCount) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getContractLabelIds

    public java.util.List<java.lang.Integer> getContractLabelIds​(int contractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### setContractLabelIds

    public void setContractLabelIds​(int contractId, java.util.List<java.lang.Integer> ids) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### updateContractLabelTreeItem

    public void updateContractLabelTreeItem​(ContractLabelItem contractLabelItem) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### removeContractLabelItem

    public void removeContractLabelItem​(int contractLabelItemId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getTree

    public ContractLabelItem getTree() throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### syncLabelAndGroupDirectory

    public void syncLabelAndGroupDirectory() throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### syncLabelAndGroupContract

    public void syncLabelAndGroupContract​(int contractId) throws ru.bitel.bgbilling.common.BGException
    Синхронизация групп договоров и меток договоров (копирует группы в метки)
    Parameters:
      `contractId` - больше 0 - для одного договора, иначе для всех договоров
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### addChild

    protected void addChild​(int up, ContractLabelItem rootItem, java.util.List<ContractLabelItem> list)

  - ### getContractListWithLabels

    public java.util.Map<java.lang.Integer,​java.util.List<java.lang.Integer>> getContractListWithLabels() throws ru.bitel.bgbilling.common.BGException
    Returns:
      список всех договоров в базе с их метками
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getContractCountByLabel

    public int getContractCountByLabel​(int labelId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`