Class ContractParamDAO
java.lang.Object
ru.bgcrm.plugin.bgbilling.dao.BillingDAO
ru.bgcrm.plugin.bgbilling.proto.dao.ContractParamDAO
-
Field Summary
Fields inherited from class ru.bgcrm.plugin.bgbilling.dao.BillingDAO
COMMENT, DATE_1, DATE_2, dbInfo, jsonMapper, jsonTypeFactory, PARAMETERS, TITLE, transferData, user, VALUE
-
Constructor Summary
ConstructorDescriptionContractParamDAO
(User user, String billingId) ContractParamDAO
(User user, DBInfo dbInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyObjectParamsToContract
(Connection con, int objectId, int contractId) void
copyObjectParamToContract
(int objectId, int contractId, int fromParamId, Connection con) getAddressParam
(int contractId, int paramId) getContractParams
(int contractId) Использовать только для генерации документов! Кэшированние результата убрано, т.к.getEmailParam
(int contractId, int paramId) getListParamValue
(int contractId, int paramId) getParameter
(int contractId, int paramId) getParameterList
(int contractId) ВызываетgetParameterListWithDir(int, boolean, boolean)
с false, false.getParameterListWithDir
(int contractId, boolean loadGroups, boolean onlyGroup) Возвращает параметры договора со справочниками.getParamListValues
(int paramId) getPhoneParam
(int contractId, int paramId) getTextParam
(int contractId, int paramId) static ParamAddressValue
toBillingObject
(ParameterAddressValue parameterAddressValue, Connection connection) Deprecated.static ParameterAddressValue
toCrmObject
(ParamAddressValue item, Connection con) void
updateAddressParameter
(int contractId, int paramId, ParamAddressValue address) void
updateDateParameter
(int contractId, int paramId, String value) void
updateDateParameter
(int contractId, int paramId, Date value) void
updateEmailParameter
(int contractId, int paramId, Collection<ParameterEmailValue> emailValues) void
updateFlagParameter
(int contractId, int paramId, boolean value) void
updateListParameter
(int contractId, int paramId, int value) void
updateListParameter
(int contractId, int paramId, String value) void
updateParameterGroup
(int contractId, int groupId) void
updatePhoneParameter
(int contractId, int paramId, ParameterPhoneValue phoneValue) void
updateTextParameter
(int contractId, int paramId, String value) Methods inherited from class ru.bgcrm.plugin.bgbilling.dao.BillingDAO
doRequest, getDbInfo, getPage, getParameterId, getVersion, linesToString, readJsonValue, setPage
-
Constructor Details
-
ContractParamDAO
-
ContractParamDAO
-
-
Method Details
-
toCrmObject
public static ParameterAddressValue toCrmObject(ParamAddressValue item, Connection con) throws SQLException - Throws:
SQLException
-
toBillingObject
@Deprecated public static ParamAddressValue toBillingObject(ParameterAddressValue parameterAddressValue, Connection connection) throws SQLException Deprecated.- Throws:
SQLException
-
getParameterList
ВызываетgetParameterListWithDir(int, boolean, boolean)
с false, false.- Parameters:
contractId
-- Returns:
-
getParameterListWithDir
public Pair<ParamList,List<ContractParameter>> getParameterListWithDir(int contractId, boolean loadGroups, boolean onlyGroup) Возвращает параметры договора со справочниками.- Parameters:
contractId
- код договора.loadGroups
- загружать группы.onlyGroup
- учитывать группу параметров договора.- Returns:
-
getContractParams
Использовать только для генерации документов! Кэшированние результата убрано, т.к. потенциально может съесть много памяти.- Parameters:
contractId
-- Returns:
-
getTextParam
-
getParameter
-
getParamListValues
-
getPhoneParam
-
getEmailParam
-
getAddressParam
-
getListParamValue
-
updateFlagParameter
public void updateFlagParameter(int contractId, int paramId, boolean value) -
updateTextParameter
-
updateListParameter
public void updateListParameter(int contractId, int paramId, int value) -
updateListParameter
-
updateAddressParameter
-
updateDateParameter
-
updateDateParameter
-
updatePhoneParameter
-
updateEmailParameter
public void updateEmailParameter(int contractId, int paramId, Collection<ParameterEmailValue> emailValues) -
updateParameterGroup
public void updateParameterGroup(int contractId, int groupId) -
copyObjectParamsToContract
public void copyObjectParamsToContract(Connection con, int objectId, int contractId) throws SQLException, BGMessageException - Throws:
SQLException
BGMessageException
-
copyObjectParamToContract
public void copyObjectParamToContract(int objectId, int contractId, int fromParamId, Connection con) throws SQLException, BGMessageException - Throws:
SQLException
BGMessageException
-