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.StringTABLE_CONTRACT_LABELprotected static java.lang.StringTABLE_CONTRACT_LABEL_LINK -
Constructor Summary
Constructors Constructor Description ContractLabelManager(java.sql.Connection con) -
Method Summary
Modifier and Type Method Description protected voidaddChild(int up, ContractLabelItem rootItem, java.util.List<ContractLabelItem> list)intgetContractCountByLabel(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()ContractLabelItemgetTree()voidremoveContractLabelItem(int contractLabelItemId)voidsetContractLabelIds(int contractId, java.util.List<java.lang.Integer> ids)voidsyncLabelAndGroupContract(int contractId)Синхронизация групп договоров и меток договоров (копирует группы в метки)voidsyncLabelAndGroupDirectory()voidupdateContractLabelTreeItem(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
- 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
-