Class ContractServiceDao
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstractDaoConstant
ru.bitel.bgbilling.common.dao.AbstractDao<ContractService>
ru.bitel.bgbilling.common.dao.AbstractIdDao<ContractService>
ru.bitel.bgbilling.kernel.contract.api.server.dao.ContractServiceDao
public class ContractServiceDao
extends ru.bitel.bgbilling.common.dao.AbstractIdDao<ContractService>
Класс управления разрешенными услугами договора
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bitel.bgbilling.common.dao.AbstractDao
ru.bitel.bgbilling.common.dao.AbstractDao.ListParams -
Field Summary
FieldsFields inherited from class ru.bitel.bgbilling.common.dao.AbstractDao
orderByPatternFields inherited from class ru.bitel.bgbilling.common.dao.AbstractDaoConstant
con, ERROR, fields, moduleId, SQL_ALL, SQL_AND, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_JOIN, SQL_LEFT_JOIN, SQL_LIMIT, SQL_NOT_IN, SQL_ON, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE, tableName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdeleteContractService(int id) Удаление записи из базы.voiddeleteContractService(int contractId, int moduleId) Удаляет все услуги из базы для данного договора и данного модуляintdeleteContractService(List<Integer> ids) Удаление нескольких записей из базы.getContractServiceById(int id) Получает записи из базы по уникальному коду.getContractServiceList(int contractId, int moduleId) Возвращает список услуг для данного договора и модуляgetContractServiceList(int contractId, int moduleId, Date onDate) Список разрешенных услуг на дату.getContractServiceList(int contractId, Calendar date) Список разрешенных услуг на дату.getContractServiceList(int contractId, List<Integer> serviceIds, Calendar date1, Calendar date2) Перечень разрешенных услуг, активных в какой-то период.getContractServiceSet(int contractId, Date onDate) Коды разрешенных на какую-то дату услуг.getContractServiceTitles(int contractId, int moduleId) protected ContractServicevoidupdateContractService(ContractService contractService) Обновление/добавление записи в базу.protected voidMethods inherited from class ru.bitel.bgbilling.common.dao.AbstractIdDao
delete, executeUpdate, get, getAndDelete, getAndUpdate, loadData, opt, prepareStatement, sqlCommand, sqlCommandAndTable, sqlInsertValues, sqlQuery, sqlUpdateSet, sqlWhereIdMethods inherited from class ru.bitel.bgbilling.common.dao.AbstractDao
deleteImpl, dropTemporaryTable, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getQueryWithFilter, getSQLOrder, list, list, list, listCountImplPS, listImpl, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, queryPeriod, setPageRecordCount, updateMethods inherited from class ru.bitel.bgbilling.common.dao.AbstractDaoConstant
getPlaceholders, getSQLOrder, getSQLOrderFields, getTableName, psSetDate, psSetDateOrNull, psSetInt, psSetIntOrNull, psSetPeriod, psSetString, psSetStringOrNull, psSetTimestampOrNull, queryAndIn, setStatementParam, sqlDelete, sqlDeleteBatch, sqlInsert, sqlInsertBatch, sqlInsertGetId, sqlInsertGetLongId, sqlInsertOnDuplicateKeyUpdate, sqlInsertSelect, sqlInsertUpdateById, sqlSelectCountAsInt, sqlUpdate, sqlUpdateBatchMethods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
error, error, error, getLogger, logError, logError, warn
-
Field Details
-
TABLE_CONTRACT_SERVICE
- See Also:
-
-
Constructor Details
-
ContractServiceDao
-
-
Method Details
-
getContractServiceTitles
- Throws:
SQLException
-
getContractServiceList
public List<ContractService> getContractServiceList(int contractId, int moduleId) throws SQLException Возвращает список услуг для данного договора и модуля- Parameters:
contractId- код договораmoduleId- код модуля- Returns:
- Throws:
SQLException
-
getContractServiceList
public List<ContractService> getContractServiceList(int contractId, Calendar date) throws SQLException Список разрешенных услуг на дату.- Parameters:
contractId- код договораdate- дата- Returns:
- Throws:
SQLException
-
getContractServiceList
public List<ContractService> getContractServiceList(int contractId, int moduleId, Date onDate) throws SQLException Список разрешенных услуг на дату.- Parameters:
contractId- код договораmoduleId- код экземпляра модуляonDate- дата- Returns:
- Throws:
SQLException
-
getContractServiceSet
Коды разрешенных на какую-то дату услуг.- Parameters:
contractId- код договораonDate- дата- Returns:
- Throws:
SQLException
-
getContractServiceById
Получает записи из базы по уникальному коду.- Parameters:
id- код записи- Returns:
- Throws:
SQLException
-
updateContractService
Обновление/добавление записи в базу.- Parameters:
contractService- параметры разрешенной услуги- Throws:
SQLException
-
deleteContractService
Удаление записи из базы.- Parameters:
id- код записи- Throws:
SQLException
-
deleteContractService
Удаляет все услуги из базы для данного договора и данного модуля- Parameters:
contractId- код договораmoduleId- код модуля- Throws:
SQLException
-
deleteContractService
Удаление нескольких записей из базы.- Parameters:
ids- коды записей через запятую- Throws:
SQLException
-
getContractServiceList
public List<ContractService> getContractServiceList(int contractId, List<Integer> serviceIds, Calendar date1, Calendar date2) throws SQLException Перечень разрешенных услуг, активных в какой-то период.- Parameters:
contractId- код договораserviceIds- коды услуг через запятуюdate1- начало периодаdate2- конец периода- Returns:
- Throws:
SQLException
-
getFromRS
- Specified by:
getFromRSin classru.bitel.bgbilling.common.dao.AbstractDao<ContractService>- Throws:
SQLException
-
updateImpl
- Specified by:
updateImplin classru.bitel.bgbilling.common.dao.AbstractDao<ContractService>- Throws:
SQLException
-