Class UserCardCopyManager
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<UserCardCopy>
ru.bitel.common.dao.AbstractIdDao<UserCardCopy>
ru.bitel.common.model.LoggingAbstractManager<UserCardCopy>
ru.bitel.bgbilling.modules.cerbercrypt.server.bean.UserCardCopyManager
- All Implemented Interfaces:
AutoCloseable
Класс менеджер для работы с копиями пользовательских карт.
-
Nested Class Summary
Nested 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.model.LoggingAbstractManager
userIdFields 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 TypeMethodDescriptionvoidclose()voiddeleteCardCopies(int uid) Удаляет все копии основной карты.intgetCopyCount(int uid, Date date) Возвращает количество копий пользовательской карты, активных на указанную дату.protected UserCardCopygetList(int uid) Возвращает список копий по основной карте.getListByDate(int uid, LocalDate date) Возвращает список копий по основной карте активных на указанную дату.protected booleanУстанавливает ссылку на основную карту.protected voidMethods inherited from class ru.bitel.common.model.LoggingAbstractManager
delete, logListByCid, logListByOid, updateMethods inherited from class ru.bitel.common.dao.AbstractIdDao
executeUpdate, get, getAndDelete, getAndUpdate, optMethods inherited from class ru.bitel.common.dao.AbstractDao
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, setStatementParamMethods 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
-
UserCardCopyManager
-
-
Method Details
-
getList
Возвращает список копий по основной карте. Сортировка по дате начала действия.- Parameters:
uid- код основной карты (или -1 если игнорировать)- Returns:
- список копий
- Throws:
ru.bitel.bgbilling.common.BGException- ошибки
-
getListByDate
public List<UserCardCopy> getListByDate(int uid, LocalDate date) throws ru.bitel.bgbilling.common.BGException Возвращает список копий по основной карте активных на указанную дату.- Parameters:
uid- код основной карты (или -1 если игнорировать)date- указанная дата- Returns:
- список копий
- Throws:
ru.bitel.bgbilling.common.BGException- ошибки
-
updateImpl
protected void updateImpl(UserCardCopy b) throws ru.bitel.bgbilling.common.BGException, SQLException - Specified by:
updateImplin classru.bitel.common.dao.AbstractDao<UserCardCopy>- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
deleteCardCopies
public void deleteCardCopies(int uid) throws ru.bitel.bgbilling.common.BGException Удаляет все копии основной карты.- Parameters:
uid- основная карта- Throws:
ru.bitel.bgbilling.common.BGException- ошибки
-
getCopyCount
Возвращает количество копий пользовательской карты, активных на указанную дату.- Parameters:
uid- основная картаdate- указанная дата- Returns:
- количество копий
- Throws:
ru.bitel.bgbilling.common.BGException- ошибки
-
getFromRS
protected UserCardCopy getFromRS(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException - Specified by:
getFromRSin classru.bitel.common.dao.AbstractDao<UserCardCopy>- Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
setParentCard
Устанавливает ссылку на основную карту.- Parameters:
b- копия- Returns:
- результат создания ссылки
- Throws:
ru.bitel.bgbilling.common.BGException- ошибки
-
close
public void close() throws ru.bitel.bgbilling.common.BGException- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classru.bitel.common.dao.AbstractDao<UserCardCopy>- Throws:
ru.bitel.bgbilling.common.BGException
-