Class UserCardCopyManager

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
ru.bitel.bgbilling.common.dao.AbstractDao<UserCardCopy>
ru.bitel.bgbilling.common.dao.AbstractIdDao<UserCardCopy>
ru.bitel.common.model.LoggingAbstractManager<UserCardCopy>
ru.bitel.bgbilling.modules.cerbercrypt.server.bean.UserCardCopyManager

public class UserCardCopyManager extends LoggingAbstractManager<UserCardCopy>
Класс менеджер для работы с копиями пользовательских карт.
  • Field Summary

    Fields inherited from class ru.bitel.common.model.LoggingAbstractManager

    userId

    Fields inherited from class ru.bitel.bgbilling.common.dao.AbstractDao

    orderByPattern

    Fields inherited from class ru.bitel.bgbilling.common.dao.AbstarctDaoConstant

    con, ERROR, fields, moduleId, 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, tableName
  • Constructor Summary

    Constructors
    Constructor
    Description
    UserCardCopyManager(Connection con, int moduleId, int userId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Удаляет все копии основной карты.
    int
    getCopyCount(int uid, Date date)
    Возвращает количество копий пользовательской карты, активных на указанную дату.
    protected UserCardCopy
     
    getList(int uid)
    Возвращает список копий по основной карте.
    getListByDate(int uid, LocalDate date)
    Возвращает список копий по основной карте активных на указанную дату.
    protected boolean
    Устанавливает ссылку на основную карту.
    protected void
     

    Methods inherited from class ru.bitel.common.model.LoggingAbstractManager

    delete, logListByCid, logListByOid, update

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstractIdDao

    executeUpdate, get, getAndDelete, getAndUpdate, opt, prepareStatement, sqlCommand, sqlCommandAndTable, sqlQuery, sqlWhereId

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstractDao

    delete, deleteImpl, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, psSetPeriod, queryPeriod, setStatementParam

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstarctDaoConstant

    getSQLOrder, getTableName, sqlLimit

    Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

    error, error, error, getLogger, logError, logError, warn

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UserCardCopyManager

      public UserCardCopyManager(Connection con, int moduleId, int userId)
  • Method Details

    • getList

      public List<UserCardCopy> getList(int uid) throws SQLException
      Возвращает список копий по основной карте. Сортировка по дате начала действия.
      Parameters:
      uid - код основной карты (или -1 если игнорировать)
      Returns:
      список копий
      Throws:
      ru.bitel.bgbilling.common.BGException - ошибки
      SQLException
    • getListByDate

      public List<UserCardCopy> getListByDate(int uid, LocalDate date) throws SQLException
      Возвращает список копий по основной карте активных на указанную дату.
      Parameters:
      uid - код основной карты (или -1 если игнорировать)
      date - указанная дата
      Returns:
      список копий
      Throws:
      ru.bitel.bgbilling.common.BGException - ошибки
      SQLException
    • updateImpl

      protected void updateImpl(UserCardCopy b) throws SQLException
      Specified by:
      updateImpl in class ru.bitel.bgbilling.common.dao.AbstractDao<UserCardCopy>
      Throws:
      SQLException
    • deleteCardCopies

      public void deleteCardCopies(int uid) throws SQLException
      Удаляет все копии основной карты.
      Parameters:
      uid - основная карта
      Throws:
      ru.bitel.bgbilling.common.BGException - ошибки
      SQLException
    • getCopyCount

      public int getCopyCount(int uid, Date date) throws ru.bitel.bgbilling.common.BGException
      Возвращает количество копий пользовательской карты, активных на указанную дату.
      Parameters:
      uid - основная карта
      date - указанная дата
      Returns:
      количество копий
      Throws:
      ru.bitel.bgbilling.common.BGException - ошибки
    • getFromRS

      protected UserCardCopy getFromRS(ResultSet rs) throws SQLException
      Specified by:
      getFromRS in class ru.bitel.bgbilling.common.dao.AbstractDao<UserCardCopy>
      Throws:
      SQLException
    • setParentCard

      protected boolean setParentCard(UserCardCopy b)
      Устанавливает ссылку на основную карту.
      Parameters:
      b - копия
      Returns:
      результат создания ссылки