Class AbstractAutopaymentDao
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstractDaoConstant
ru.bitel.bgbilling.common.dao.AbstractDao<Autopayment>
ru.bitel.bgbilling.common.dao.AbstractIdDao<Autopayment>
ru.bitel.bgbilling.kernel.contract.autopayment.server.dao.AbstractAutopaymentDao
public abstract class AbstractAutopaymentDao
extends ru.bitel.bgbilling.common.dao.AbstractIdDao<Autopayment>
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bitel.bgbilling.common.dao.AbstractDao
ru.bitel.bgbilling.common.dao.AbstractDao.ListParams -
Field Summary
Fields 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
ConstructorsConstructorDescriptionAbstractAutopaymentDao(Connection con, String tableNamePrefix, int moduleId) -
Method Summary
Modifier and TypeMethodDescriptionvoidautopaymentOff(Autopayment autopayment) getAutopayment(int id) getCurrentAutopayment(int contractId) protected AutopaymentvoidinvokeAutopayment(int contractId, BigDecimal amount) <T extends BGAbstractTransaction>
TregisterAutopayment(int contractId, ContractAutopaymentMode mode, Function<BigDecimal, T> registerOrder) static <T> AutopaymentregisterAutopayment(Connection con, int moduleId, AbstractAutopaymentDao autopaymentManager, int contractId, ContractAutopaymentMode mode, ru.bitel.common.function.ThrowingFunction<Autopayment, T> registerFunction) Регистрация автоплатежа - создается Autopayment, вызывается registerFunction.voidsearchActivateAutopayment(SearchResult<Autopayment> searchResult, Date date, int mode) voidsearchAutopayment(SearchResult<Autopayment> searchResult, int contractId) voidsearchCurrentAutopayment(SearchResult<Autopayment> searchResult, Date date, AutopaymentMode mode) Выбрать подписки которые должны исполниться в указанный деньstatic voidunregisterAutopayment(Connection con, int moduleId, AbstractAutopaymentDao autopaymentManager, int contractId) Отмена автоплатежа в биллинге.updateAutopayment(Autopayment autopayment) protected voidupdateImpl(Autopayment autopayment) Methods 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
-
Constructor Details
-
AbstractAutopaymentDao
-
-
Method Details
-
getAutopayment
- Throws:
SQLException
-
getCurrentAutopayment
- Throws:
SQLException
-
updateImpl
- Specified by:
updateImplin classru.bitel.bgbilling.common.dao.AbstractDao<Autopayment>- Throws:
SQLException
-
updateAutopayment
- Throws:
SQLException
-
searchAutopayment
public void searchAutopayment(SearchResult<Autopayment> searchResult, int contractId) throws SQLException - Throws:
SQLException
-
searchActivateAutopayment
public void searchActivateAutopayment(SearchResult<Autopayment> searchResult, Date date, int mode) throws SQLException - Throws:
SQLException
-
searchCurrentAutopayment
public void searchCurrentAutopayment(SearchResult<Autopayment> searchResult, Date date, AutopaymentMode mode) throws SQLException Выбрать подписки которые должны исполниться в указанный день- Parameters:
searchResult-date-mode-- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
getFromRS
- Specified by:
getFromRSin classru.bitel.bgbilling.common.dao.AbstractDao<Autopayment>- Throws:
SQLException
-
registerAutopayment
public <T extends BGAbstractTransaction> T registerAutopayment(int contractId, ContractAutopaymentMode mode, Function<BigDecimal, T> registerOrder) throws Exception- Throws:
Exception
-
autopaymentOff
- Throws:
ru.bitel.bgbilling.common.BGException
-
invokeAutopayment
- Throws:
Exception
-
registerAutopayment
public static <T> Autopayment registerAutopayment(Connection con, int moduleId, AbstractAutopaymentDao autopaymentManager, int contractId, ContractAutopaymentMode mode, ru.bitel.common.function.ThrowingFunction<Autopayment, T> registerFunction) throws ExceptionРегистрация автоплатежа - создается Autopayment, вызывается registerFunction.- Parameters:
con-moduleId-contractId-mode-registerFunction-- Throws:
ru.bitel.bgbilling.common.BGExceptionException
-
unregisterAutopayment
public static void unregisterAutopayment(Connection con, int moduleId, AbstractAutopaymentDao autopaymentManager, int contractId) throws Exception Отмена автоплатежа в биллинге. Если есть какой-то вызов к платежной системе - то его нужно вызвать (кроме вызова данного метода).- Parameters:
con-moduleId-contractId-- Throws:
ru.bitel.bgbilling.common.BGExceptionException
-