public class ContractDao extends AbstractEntityAttrDao<Contract>
AbstractEntityAttrDao.AddressItemModifiedEventListener
CONTRACT_OBJECT_SUPPORT, CONTRACT_SUPPORT, ENTITY_SUPPORT, entitySpecAttrDirectory, entitySpecDirectory, filterWeightComparator, userId
Constructor and Description |
---|
ContractDao(java.sql.Connection con,
int userId) |
Modifier and Type | Method and Description |
---|---|
static void |
addContractGroupFilter(java.lang.StringBuilder where,
int userId) |
void |
checkContractParameter(EntityAttr entityAttr) |
Contract |
getByTitle(java.lang.String title)
Возвращает договор по заголовку.
|
EntityAttr |
getContractParameter(int contractId,
int parameterId)
Получение параметра договора.
|
java.util.Map<java.lang.Integer,EntityAttr> |
getContractParameters(int contractId,
int paramGroupId)
Возвращает map параметров договора.
Если параметр не заведен (не указан, не добавлен), то данный параметр будет отсутствовать в результате. |
java.util.List<Contract> |
getContracts(java.lang.String idList)
Возвращает список Договоров по строке с кодами договоров, перечисленными
через запятую
|
protected ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpecAttr> |
getEntitySpecAttrDirectory() |
ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpec> |
getEntitySpecDirectory() |
protected Contract |
getFromRS(java.sql.ResultSet rs,
boolean loadAttributes,
boolean loadEntityTitle) |
java.util.List<Contract> |
getSubContracts(int contractId,
int subMode)
Получает зависимые, независимые или все(subMode==-1) субдоговора данного договора.
|
java.util.List<Contract> |
list(java.lang.String title,
java.lang.String comment,
int fc,
long groupMaskAnd,
int firm,
java.util.List<FilterEntityAttr> entityFilter,
boolean subContracts,
boolean closed,
boolean hidden,
Page page) |
java.util.List<Contract> |
list(java.lang.String title,
java.lang.String comment,
int fc,
long groupMaskAnd,
int firm,
java.util.List<FilterEntityAttr> entityFilter,
boolean subContracts,
boolean closed,
boolean hidden,
java.lang.String orderBy,
Page page) |
boolean |
updateContractParameter(int contractId,
EntityAttr entityAttr) |
void |
updateContractParameters(int contractId,
java.util.Map<java.lang.Integer,EntityAttr> entityAttributes)
Deprecated.
|
void |
updateDomain(int contractId,
int domainId) |
protected void |
updateImpl(Contract contract) |
void |
updateParameter(int contractId,
EntityAttr a)
Deprecated.
|
void |
updatePassword(int contractId,
java.lang.String password) |
checkEntityAttribute, checkEntitySpecAttrDelete, filterInit, filterJoin, filterToPS, getAllEntityAttributes, getAttribute, getEntityAttribute, getEntityAttributes, getEntityTableName, getFromRS, list, listImpl, onAddressItemUpdate, updateEntityAttribute, updateEntityAttributes
delete, get, getAndDelete, getAndUpdate
public ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpec> getEntitySpecDirectory() throws ru.bitel.bgbilling.common.BGException
getEntitySpecDirectory
in class AbstractEntityAttrDao<Contract>
ru.bitel.bgbilling.common.BGException
protected ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpecAttr> getEntitySpecAttrDirectory() throws ru.bitel.bgbilling.common.BGException
getEntitySpecAttrDirectory
in class AbstractEntityAttrDao<Contract>
ru.bitel.bgbilling.common.BGException
protected Contract getFromRS(java.sql.ResultSet rs, boolean loadAttributes, boolean loadEntityTitle) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException
getFromRS
in class AbstractEntityAttrDao<Contract>
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
public boolean updateContractParameter(int contractId, EntityAttr entityAttr) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
@Deprecated public void updateContractParameters(int contractId, java.util.Map<java.lang.Integer,EntityAttr> entityAttributes) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.Map<java.lang.Integer,EntityAttr> getContractParameters(int contractId, int paramGroupId) throws ru.bitel.bgbilling.common.BGException
contractId
- ID договора.paramGroupId
- ID группы параметров. Если значение >0, то выдаются параметры указанной группы, иначе - все параметры.ru.bitel.bgbilling.common.BGException
public EntityAttr getContractParameter(int contractId, int parameterId) throws ru.bitel.bgbilling.common.BGException
contractId
- ID договораparameterId
- ID параметраru.bitel.bgbilling.common.BGException
protected void updateImpl(Contract contract) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException
updateImpl
in class ru.bitel.common.dao.AbstractDao<Contract>
ru.bitel.bgbilling.common.BGException
java.sql.SQLException
@Deprecated public void updateParameter(int contractId, EntityAttr a) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<Contract> list(java.lang.String title, java.lang.String comment, int fc, long groupMaskAnd, int firm, java.util.List<FilterEntityAttr> entityFilter, boolean subContracts, boolean closed, boolean hidden, Page page) throws ru.bitel.bgbilling.common.BGException
title
- comment
- fc
- -1 - всеgroupMaskAnd
- маска группgroup
- = маске группfirm
- reservedentityFilter
- subContracts
- включать ли субдоговора в результатclosed
- включать ли закрытые на текущий моментhidden
- включать ли скрытыеpage
- ru.bitel.bgbilling.common.BGException
public java.util.List<Contract> list(java.lang.String title, java.lang.String comment, int fc, long groupMaskAnd, int firm, java.util.List<FilterEntityAttr> entityFilter, boolean subContracts, boolean closed, boolean hidden, java.lang.String orderBy, Page page) throws ru.bitel.bgbilling.common.BGException
title
- comment
- fc
- -1 - всеgroupMaskAnd
- маска группgroup
- = маске группfirm
- reservedentityFilter
- subContracts
- включать ли субдоговора в результатclosed
- включать ли закрытые на текущий моментhidden
- включать ли скрытыеpage
- ru.bitel.bgbilling.common.BGException
public java.util.List<Contract> getContracts(java.lang.String idList) throws ru.bitel.bgbilling.common.BGException
idList
- ru.bitel.bgbilling.common.BGException
public java.util.List<Contract> getSubContracts(int contractId, int subMode) throws ru.bitel.bgbilling.common.BGException
cid
- - код супер договора.subMode
- зависимый(0), независимый(1)(из KernelConst) или все(-1).ru.bitel.bgbilling.common.BGException
public Contract getByTitle(java.lang.String title) throws ru.bitel.bgbilling.common.BGException
title
- заголовок.ru.bitel.bgbilling.common.BGException
- ошибка.public void updatePassword(int contractId, java.lang.String password) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public static void addContractGroupFilter(java.lang.StringBuilder where, int userId)
public void updateDomain(int contractId, int domainId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void checkContractParameter(EntityAttr entityAttr) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException