Class AddressManager

java.lang.Object
bitel.billing.server.admin.bean.AddressManager

public class AddressManager
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String TABLE_ADDRESS_AREA  
    static java.lang.String TABLE_ADDRESS_CITY  
    static java.lang.String TABLE_ADDRESS_CONFIG  
    static java.lang.String TABLE_ADDRESS_COUNTRY  
    static java.lang.String TABLE_ADDRESS_HOUSE  
    static java.lang.String TABLE_ADDRESS_QUARTER  
    static java.lang.String TABLE_ADDRESS_STREET  
  • Constructor Summary

    Constructors 
    Constructor Description
    AddressManager​(java.sql.Connection con, DefaultServerSetup setup)  
  • Method Summary

    Modifier and Type Method Description
    void addAddressCity​(ru.bitel.bgbilling.kernel.directory.address.AddressCity city)  
    void addAddressCountry​(ru.bitel.bgbilling.kernel.directory.address.AddressCountry addressCountry)  
    void addAddressHouse​(AddressHouse house)  
    void addAddressStreet​(AddressItem street)  
    void deleteAddressParam​(int contractId, int parameterId)  
    void deleteAddressParams​(java.lang.String tableId, int recordId)  
    void deleteExctraAddressParams​(java.lang.String tableId, java.lang.String recordId, java.lang.String key)  
    AddressStruct getAddress​(int contractId, int parameterId)
    Возвращает значение параметра типа "Адрес" для данного договора
    ru.bitel.bgbilling.kernel.directory.address.AddressCity getAddressCityByTitle​(java.lang.String city, int countryId, boolean addIfNotExist)  
    ru.bitel.bgbilling.kernel.directory.address.AddressCountry getAddressCountryByTitle​(java.lang.String country, boolean addIfNotExist)  
    AddressHouse getAddressHouseByHouseAndFrac​(java.lang.String houseFrac, int streetId, java.lang.String postIndex, boolean addIfNotExist)  
    AddressItem getAddressItem​(int itemId, java.lang.String table)  
    java.lang.String getAddressParam​(java.lang.String tableId, int recordId, java.lang.String key)
    Получение параметра адресного элемента
    java.util.Map<java.lang.String,​java.lang.String> getAddressParams​(java.lang.String tableId, int recordId)
    Получение параметров адресного элемента, в виде ключ - значение
    AddressItem getAddressStreetByTitle​(java.lang.String street, int cityId, boolean addIfNotExist)  
    ru.bitel.bgbilling.kernel.directory.address.AddressCity getCity​(int cityId)  
    ru.bitel.bgbilling.kernel.directory.address.AddressCountry getCountry​(int countryId)  
    AddressHouse getHouse​(int houseId)  
    int getHouseId​(java.lang.String country, java.lang.String city, java.lang.String street, java.lang.String houseFrac, java.lang.String postIndex, boolean addIfNotExist)  
    void searchAreaList​(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)  
    void searchCityList​(SearchResult<ru.bitel.bgbilling.kernel.directory.address.AddressCity> searchResult, int countryId, java.lang.String cityMask, boolean loadCountryInfo)  
    void searchCountryList​(SearchResult<ru.bitel.bgbilling.kernel.directory.address.AddressCountry> searchResult, java.lang.String countryMask)  
    void searchHouseList​(SearchResult<AddressHouse> searchResult, int areaId, int quarterId, int streetId, java.lang.String houseFrac, boolean loadInfo, boolean loadCityInfo, boolean loadCountryInfo)  
    void searchQuarterList​(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)  
    void searchStreetList​(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)  
    void updateAddress​(int contractId, int parameterId, AddressStruct addressStruct)
    Обновляет значение параметра типа адрес
    void updateAddressParams​(java.lang.String tableId, int recordId, java.lang.String key, java.lang.String value)  
    void updateHouse​(AddressHouse house)  

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • getCountry

      public ru.bitel.bgbilling.kernel.directory.address.AddressCountry getCountry​(int countryId)
    • getCity

      public ru.bitel.bgbilling.kernel.directory.address.AddressCity getCity​(int cityId)
    • getAddressItem

      public AddressItem getAddressItem​(int itemId, java.lang.String table)
    • getHouse

      public AddressHouse getHouse​(int houseId)
    • getAddressParams

      public java.util.Map<java.lang.String,​java.lang.String> getAddressParams​(java.lang.String tableId, int recordId)
      Получение параметров адресного элемента, в виде ключ - значение
      Parameters:
      tableId - - например "address_house", "address_street"
      recordId - - id записи в tableId
      Returns:
    • getAddressParam

      public java.lang.String getAddressParam​(java.lang.String tableId, int recordId, java.lang.String key)
      Получение параметра адресного элемента
      Parameters:
      tableId - - например "address_house", "address_street"
      recordId - - id записи в tableId
      key - - ключ записи
      Returns:
    • updateAddressParams

      public void updateAddressParams​(java.lang.String tableId, int recordId, java.lang.String key, java.lang.String value)
    • deleteAddressParams

      public void deleteAddressParams​(java.lang.String tableId, int recordId)
    • deleteExctraAddressParams

      public void deleteExctraAddressParams​(java.lang.String tableId, java.lang.String recordId, java.lang.String key)
    • searchCountryList

      public void searchCountryList​(SearchResult<ru.bitel.bgbilling.kernel.directory.address.AddressCountry> searchResult, java.lang.String countryMask)
    • searchCityList

      public void searchCityList​(SearchResult<ru.bitel.bgbilling.kernel.directory.address.AddressCity> searchResult, int countryId, java.lang.String cityMask, boolean loadCountryInfo)
    • searchAreaList

      public void searchAreaList​(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)
    • searchQuarterList

      public void searchQuarterList​(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)
    • searchStreetList

      public void searchStreetList​(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)
    • searchHouseList

      public void searchHouseList​(SearchResult<AddressHouse> searchResult, int areaId, int quarterId, int streetId, java.lang.String houseFrac, boolean loadInfo, boolean loadCityInfo, boolean loadCountryInfo)
    • getAddress

      public AddressStruct getAddress​(int contractId, int parameterId)
      Возвращает значение параметра типа "Адрес" для данного договора
      Parameters:
      contractId - код договора
      parameterId - код параметра
      Returns:
    • updateAddress

      public void updateAddress​(int contractId, int parameterId, AddressStruct addressStruct)
      Обновляет значение параметра типа адрес
      Parameters:
      contractId - код договора
      parameterId - код параметра
      addressStruct - значение адреса
    • deleteAddressParam

      public void deleteAddressParam​(int contractId, int parameterId) throws java.sql.SQLException
      Throws:
      java.sql.SQLException
    • addAddressCountry

      public void addAddressCountry​(ru.bitel.bgbilling.kernel.directory.address.AddressCountry addressCountry)
    • addAddressCity

      public void addAddressCity​(ru.bitel.bgbilling.kernel.directory.address.AddressCity city)
    • addAddressStreet

      public void addAddressStreet​(AddressItem street)
    • addAddressHouse

      public void addAddressHouse​(AddressHouse house) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateHouse

      public void updateHouse​(AddressHouse house)
    • getAddressCountryByTitle

      public ru.bitel.bgbilling.kernel.directory.address.AddressCountry getAddressCountryByTitle​(java.lang.String country, boolean addIfNotExist)
    • getAddressCityByTitle

      public ru.bitel.bgbilling.kernel.directory.address.AddressCity getAddressCityByTitle​(java.lang.String city, int countryId, boolean addIfNotExist)
    • getAddressStreetByTitle

      public AddressItem getAddressStreetByTitle​(java.lang.String street, int cityId, boolean addIfNotExist)
    • getAddressHouseByHouseAndFrac

      public AddressHouse getAddressHouseByHouseAndFrac​(java.lang.String houseFrac, int streetId, java.lang.String postIndex, boolean addIfNotExist)
    • getHouseId

      public int getHouseId​(java.lang.String country, java.lang.String city, java.lang.String street, java.lang.String houseFrac, java.lang.String postIndex, boolean addIfNotExist)