Class TariffPlanDao
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<TariffPlan>
ru.bitel.common.dao.AbstractIdDao<TariffPlan>
ru.bitel.common.dao.AbstractDirectoryIdDao<TariffPlan>
ru.bitel.bgbilling.kernel.tariff.server.bean.TariffPlanDao
- All Implemented Interfaces:
AutoCloseable,Directory<TariffPlan>
Управление объектами типа
TariffPlan-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ru.bitel.common.dao.AbstractDao
ru.bitel.common.dao.AbstractDao.ResultSetIterator -
Field Summary
Fields inherited from class ru.bitel.common.dao.AbstractDao
cacheFilter, cacheJoin, cacheOrderBy, cachePaged, cachePS, cacheWhat, con, getByIdPS, moduleId, orderByPattern, tableNameFields inherited from class ru.bitel.common.dao.AbstarctDaoConstant
ERROR, fields, SQL_ALL, SQL_AND, SQL_CALC_FOUND_ROWS, 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_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcopyTariffPlan(int tariffPlanId) Создает новый тарифный план, полностью аналогичный заданномуintСоздает новый тарифный план с такими же значениями полей, как и у заданного плана.Получение элемента по title(name)
Может быть не имплементировано - в этом случае бросаетсяUnsupportedOperationExceptionprotected TariffPlanВозвращает список модулей для которых может быть определено тарифное деревоgetModuleTrees(int treeId) getTariffContractCount(List<Integer> tariffIds) getTariffPlanList(int defaultTariffPlanId, List<Integer> contractLabelIds, int face, String title) Возвращает список тарифных планов по фильтруgetTariffPlanList(List<Integer> idFilter) Deprecated.Получение Map с ключами Integer - код тарифа и значениями типа TariffPlanintgetTariffPlanTreeId(int tariffPlanId) protected intinsertNode(PreparedStatement psInsertNode, ru.bitel.bgbilling.kernel.tariff.server.bean.TreeNode treeNode) protected intinsertNodeCopy(Map<Integer, Integer> linkNodeIds, PreparedStatement psInsertNode, Map<Integer, ru.bitel.bgbilling.kernel.tariff.server.bean.TreeNode> oldNodeMap, ru.bitel.bgbilling.kernel.tariff.server.bean.TreeNode oldTreeNode) list()Список всех объектовTariffPlanс сортировкой по названиюСписок объектовTariffPlanупорядоченный по названиюvoidsearchTariffPlans(SearchResult<TariffPlan> searchResult, int showActual, List<Integer> moduleIds, List<Integer> labelIds, String titleMask) protected voidupdateImpl(TariffPlan tariffPlan) booleanusesModule(int tariffPlanId, int moduleId) Проверяет, использует ли тарифный план данный модульMethods inherited from class ru.bitel.common.dao.AbstractIdDao
delete, executeUpdate, get, getAndDelete, getAndUpdate, optMethods inherited from class ru.bitel.common.dao.AbstractDao
close, delete, deleteImpl, dropTemporaryTable, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, loadData, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, processException, setPageRecordCount, setStatementParam, updateMethods inherited from class ru.bitel.common.dao.AbstarctDaoConstant
getSQLOrder, psSetDate, psSetInt, psSetString, sqlLimitMethods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
error, error, error, getLogger, logError, logError, warn
-
Constructor Details
-
TariffPlanDao
-
-
Method Details
-
getTariffPlanMap
Получение Map с ключами Integer - код тарифа и значениями типа TariffPlan- Returns:
- Map
- Throws:
ru.bitel.bgbilling.common.BGException
-
list
Список всех объектовTariffPlanс сортировкой по названию- Returns:
- List
- Throws:
ru.bitel.bgbilling.common.BGException
-
getTariffPlanList
@Deprecated public List<TariffPlan> getTariffPlanList(List<Integer> idFilter) throws ru.bitel.bgbilling.common.BGException Deprecated.Uselist(List<Integer>)insteadСписок объектовTariffPlanупорядоченный по названию- Parameters:
idFilter- - cписок-фильтр с кодами тарифов- Returns:
- List
- Throws:
ru.bitel.bgbilling.common.BGException
-
list
Список объектовTariffPlanупорядоченный по названию- Parameters:
idFilter- - cписок-фильтр с кодами тарифов- Returns:
- List
- Throws:
ru.bitel.bgbilling.common.BGException
-
getTariffPlanList
public List<TariffPlan> getTariffPlanList(int defaultTariffPlanId, List<Integer> contractLabelIds, int face, String title) throws ru.bitel.bgbilling.common.BGException Возвращает список тарифных планов по фильтру- Parameters:
defaultTariffPlanId- код тарифного плана, который должен быть включен в список независимо от того, удовлетворяет он фильтру или нетface- физ или юр лицо, для которого предписан тарифtitle- номер договора, который должен удовлетворять паттерну тарифаgroups- маска групп- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
copyTariffPlan
public int copyTariffPlan(int tariffPlanId) throws ru.bitel.bgbilling.common.BGException Создает новый тарифный план, полностью аналогичный заданному- Parameters:
tariffPlanId- - копируемый тарифный план- Returns:
- код нового тарифного плана
- Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
insertNodeCopy
protected int insertNodeCopy(Map<Integer, Integer> linkNodeIds, PreparedStatement psInsertNode, Map<Integer, throws SQLExceptionru.bitel.bgbilling.kernel.tariff.server.bean.TreeNode> oldNodeMap, ru.bitel.bgbilling.kernel.tariff.server.bean.TreeNode oldTreeNode) - Throws:
SQLException
-
insertNode
protected int insertNode(PreparedStatement psInsertNode, ru.bitel.bgbilling.kernel.tariff.server.bean.TreeNode treeNode) throws SQLException - Throws:
SQLException
-
copyTariffPlan
Создает новый тарифный план с такими же значениями полей, как и у заданного плана.- Parameters:
tp- - копируемый тарифный план- Returns:
- код скопированного тарифного плана
- Throws:
ru.bitel.bgbilling.common.BGException
-
getTariffPlanTreeId
public int getTariffPlanTreeId(int tariffPlanId) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getModuleTrees
- Parameters:
treeId-- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
usesModule
public boolean usesModule(int tariffPlanId, int moduleId) throws ru.bitel.bgbilling.common.BGException Проверяет, использует ли тарифный план данный модуль- Parameters:
moduleId- код модуляplan- тарифный план- Returns:
- true - если использует
- Throws:
ru.bitel.bgbilling.common.BGException
-
searchTariffPlans
public void searchTariffPlans(SearchResult<TariffPlan> searchResult, int showActual, List<Integer> moduleIds, List<Integer> labelIds, String titleMask) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getTariffContractCount
public Map<Integer,TariffPlanDao.TariffPlanCounts> getTariffContractCount(List<Integer> tariffIds) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getModuleList
Возвращает список модулей для которых может быть определено тарифное дерево- Throws:
ru.bitel.bgbilling.common.BGException
-
getFromRS
protected TariffPlan getFromRS(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException - Specified by:
getFromRSin classru.bitel.common.dao.AbstractDao<TariffPlan>- Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
updateImpl
protected void updateImpl(TariffPlan tariffPlan) throws ru.bitel.bgbilling.common.BGException, SQLException - Specified by:
updateImplin classru.bitel.common.dao.AbstractDao<TariffPlan>- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
get
Description copied from interface:DirectoryПолучение элемента по title(name)
Может быть не имплементировано - в этом случае бросаетсяUnsupportedOperationException- Parameters:
title-- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
list(List<Integer>)instead