Class TvAccountDao

java.lang.Object
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<B>
ru.bitel.common.dao.AbstractIdDao<TvAccount>
ru.bitel.bgbilling.modules.tv.server.bean.TvAccountDao
All Implemented Interfaces:
AutoCloseable

public class TvAccountDao extends ru.bitel.common.dao.AbstractIdDao<TvAccount>
  • Constructor Details

    • TvAccountDao

      public TvAccountDao(Connection con, int mid)
  • Method Details

    • getFromRS

      public static TvAccount getFromRS(ResultSet rs, boolean contractLoad, boolean specAndDeviceLoad) throws SQLException, ru.bitel.bgbilling.common.BGException
      Throws:
      SQLException
      ru.bitel.bgbilling.common.BGException
    • getFromRS

      public TvAccount getFromRS(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException
      Specified by:
      getFromRS in class ru.bitel.common.dao.AbstractDao<TvAccount>
      Throws:
      SQLException
      ru.bitel.bgbilling.common.BGException
    • updateImpl

      protected void updateImpl(TvAccount tvAccount) throws ru.bitel.bgbilling.common.BGException, SQLException
      Specified by:
      updateImpl in class ru.bitel.common.dao.AbstractDao<TvAccount>
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • list

      public List<TvAccount> list(int contractId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • list

      public List<TvAccount> list(int contractId, boolean specAndDeviceLoad) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • listRuntime

      public List<TvAccount> listRuntime(int deviceId, Set<Integer> tvAccountSpecIds) throws ru.bitel.bgbilling.common.BGException
      Получение списка сервисов для runtime. Отсортированы по parentId.
      Parameters:
      deviceId -
      servIds -
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
    • get

      public TvAccount get(String login, Date time) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getByIdentifier

      public TvAccount getByIdentifier(String identifier, LocalDate date) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getByDeviceAccountId

      public TvAccount getByDeviceAccountId(String deviceAccountId, Date time) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • optByDeviceAccountId

      public Optional<TvAccount> optByDeviceAccountId(String deviceAccountId, Date time) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • listChildren

      public List<TvAccount> listChildren(int parentId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • list

      public List<TvAccount> list(int deviceId, String login, Date dateFrom, Date dateTo) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • list

      public List<TvAccount> list(int deviceId, String login, Date dateFrom, Date dateTo, boolean onlyRoot, String orderBy) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateDeviceStateAndOptions

      public void updateDeviceStateAndOptions(int tvAccountId, String deviceAccountId, short state, Set<Integer> deviceOptions, int accessCode) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • listToCreate

      public List<TvAccount> listToCreate(Date now) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • listToCancel

      public List<TvAccount> listToCancel(Date now) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • lastNumericLogin

      public int lastNumericLogin(int max) throws ru.bitel.bgbilling.common.BGException
      Возвращает последний (наибольший) цифровой логин
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • search

      public List<TvAccount> search(String login, String deviceAccountId, int tvAccountSpecId, String identifier, String macAddress, boolean loginStrictCheck) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • recycle

      public void recycle() throws ru.bitel.bgbilling.common.BGException
      Overrides:
      recycle in class ru.bitel.common.dao.AbstractDao<TvAccount>
      Throws:
      ru.bitel.bgbilling.common.BGException