public class AddressManager
extends java.lang.Object
Modifier and Type | Field and 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 and Description |
---|
AddressManager(java.sql.Connection con,
DefaultServerSetup setup) |
Modifier and Type | Method and Description |
---|---|
void |
addAddressCity(AddressCity city) |
void |
addAddressCountry(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)
Возвращает значение параметра типа "Адрес" для данного договора
|
AddressCity |
getAddressCityByTitle(java.lang.String city,
int countryId,
boolean addIfNotExist) |
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) |
AddressCity |
getCity(int cityId) |
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<AddressCity> searchResult,
int countryId,
java.lang.String cityMask,
boolean loadCountryInfo) |
void |
searchCountryList(SearchResult<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) |
public static final java.lang.String TABLE_ADDRESS_COUNTRY
public static final java.lang.String TABLE_ADDRESS_CITY
public static final java.lang.String TABLE_ADDRESS_AREA
public static final java.lang.String TABLE_ADDRESS_QUARTER
public static final java.lang.String TABLE_ADDRESS_STREET
public static final java.lang.String TABLE_ADDRESS_HOUSE
public static final java.lang.String TABLE_ADDRESS_CONFIG
public AddressManager(java.sql.Connection con, DefaultServerSetup setup)
public AddressCountry getCountry(int countryId)
public AddressCity getCity(int cityId)
public AddressItem getAddressItem(int itemId, java.lang.String table)
public AddressHouse getHouse(int houseId)
public java.util.Map<java.lang.String,java.lang.String> getAddressParams(java.lang.String tableId, int recordId)
tableId
- - например "address_house", "address_street"recordId
- - id записи в tableIdpublic java.lang.String getAddressParam(java.lang.String tableId, int recordId, java.lang.String key)
tableId
- - например "address_house", "address_street"recordId
- - id записи в tableIdkey
- - ключ записиpublic void updateAddressParams(java.lang.String tableId, int recordId, java.lang.String key, java.lang.String value)
public void deleteAddressParams(java.lang.String tableId, int recordId)
public void deleteExctraAddressParams(java.lang.String tableId, java.lang.String recordId, java.lang.String key)
public void searchCountryList(SearchResult<AddressCountry> searchResult, java.lang.String countryMask)
public void searchCityList(SearchResult<AddressCity> searchResult, int countryId, java.lang.String cityMask, boolean loadCountryInfo)
public void searchAreaList(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)
public void searchQuarterList(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)
public void searchStreetList(SearchResult<AddressItem> searchResult, int cityId, java.lang.String areaMask, boolean loadCountryInfo, boolean loadCityInfo)
public void searchHouseList(SearchResult<AddressHouse> searchResult, int areaId, int quarterId, int streetId, java.lang.String houseFrac, boolean loadInfo, boolean loadCityInfo, boolean loadCountryInfo)
public AddressStruct getAddress(int contractId, int parameterId)
contractId
- код договораparameterId
- код параметраpublic void updateAddress(int contractId, int parameterId, AddressStruct addressStruct)
contractId
- код договораparameterId
- код параметраaddressStruct
- значение адресаpublic void deleteAddressParam(int contractId, int parameterId) throws java.sql.SQLException
java.sql.SQLException
public void addAddressCountry(AddressCountry addressCountry)
public void addAddressCity(AddressCity city)
public void addAddressStreet(AddressItem street)
public void addAddressHouse(AddressHouse house) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void updateHouse(AddressHouse house)
public AddressCountry getAddressCountryByTitle(java.lang.String country, boolean addIfNotExist)
public AddressCity getAddressCityByTitle(java.lang.String city, int countryId, boolean addIfNotExist)
public AddressItem getAddressStreetByTitle(java.lang.String street, int cityId, boolean addIfNotExist)
public AddressHouse getAddressHouseByHouseAndFrac(java.lang.String houseFrac, int streetId, java.lang.String postIndex, boolean addIfNotExist)
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)