Class MegogoSubscriptionDao
java.lang.Object
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<B>
ru.bitel.common.dao.AbstractIdDao<MegogoSubscription>
ru.bitel.bgbilling.modules.megogo.server.bean.MegogoSubscriptionDao
- All Implemented Interfaces:
java.lang.AutoCloseable
public class MegogoSubscriptionDao extends ru.bitel.common.dao.AbstractIdDao<MegogoSubscription>
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bitel.common.dao.AbstractDao
ru.bitel.common.dao.AbstractDao.ResultSetIterator -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMEGOGO_SUBSCRIPTION_TABLE_NAMEFields 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_CALC_FOUND_ROWS, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_LIMIT, SQL_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE -
Constructor Summary
Constructors Constructor Description MegogoSubscriptionDao(java.sql.Connection con, int moduleId) -
Method Summary
Modifier and Type Method Description MegogoSubscriptiongetByServiceId(int serviceId)Получить подписку по коду услуги.protected MegogoSubscriptiongetFromRS(java.sql.ResultSet rs)java.util.List<java.lang.Integer>getMainSubscriptionsServiceIds()Получить список кодов основных услугjava.util.List<MegogoSubscription>getSubscriptionList(java.lang.Boolean used, int type)Получить список подписок.protected voidupdateImpl(MegogoSubscription subscription)Methods inherited from class ru.bitel.common.dao.AbstractIdDao
delete, get, getAndDelete, getAndUpdateMethods inherited from class ru.bitel.common.dao.AbstractDao
close, delete, deleteImpl, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, processException, recycle, setStatementParam, updateMethods inherited from class ru.bitel.common.dao.AbstarctDaoConstant
getSQLOrderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MEGOGO_SUBSCRIPTION_TABLE_NAME
public static final java.lang.String MEGOGO_SUBSCRIPTION_TABLE_NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
MegogoSubscriptionDao
public MegogoSubscriptionDao(java.sql.Connection con, int moduleId)
-
-
Method Details
-
getMainSubscriptionsServiceIds
public java.util.List<java.lang.Integer> getMainSubscriptionsServiceIds() throws ru.bitel.bgbilling.common.BGExceptionПолучить список кодов основных услуг- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
getSubscriptionList
public java.util.List<MegogoSubscription> getSubscriptionList(java.lang.Boolean used, int type) throws ru.bitel.bgbilling.common.BGExceptionПолучить список подписок.- Parameters:
used- - если true - то только используемые, false - не используемые, null - все.type- - тип услуги. 1- основные, 2 - дополнительные независемые, -1 - все.- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
getByServiceId
public MegogoSubscription getByServiceId(int serviceId) throws ru.bitel.bgbilling.common.BGExceptionПолучить подписку по коду услуги. Без
Код услуги и подписки соотносятся один к одному.- Parameters:
serviceId- - код услуги модуля- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
getFromRS
protected MegogoSubscription getFromRS(java.sql.ResultSet rs) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException- Specified by:
getFromRSin classru.bitel.common.dao.AbstractDao<MegogoSubscription>- Throws:
java.sql.SQLExceptionru.bitel.bgbilling.common.BGException
-
updateImpl
protected void updateImpl(MegogoSubscription subscription) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException- Specified by:
updateImplin classru.bitel.common.dao.AbstractDao<MegogoSubscription>- Throws:
ru.bitel.bgbilling.common.BGExceptionjava.sql.SQLException
-