public class AddressDAO extends CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id>
Modifier and Type | Field and Description |
---|---|
static int |
LOAD_LEVEL_CITY |
static int |
LOAD_LEVEL_COUNTRY |
static int |
LOAD_LEVEL_HOUSE |
static int |
LOAD_LEVEL_STREET |
static int |
PARAM_SUBJECT |
con, dateFormat_DDMMYYYY, dateFormat_DDMMYYYY_HHMM, log, SQL_AND, SQL_DELETE, SQL_DESC, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT, SQL_INSERT_IGNORE, SQL_LEFT_JOIN, SQL_LEFT_OUTER_JOIN, SQL_LIMIT, SQL_ON_DUP_KEY_UPDATE, SQL_OR, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UPDATE, SQL_WHERE
Constructor and Description |
---|
AddressDAO(java.sql.Connection con) |
Modifier and Type | Method and Description |
---|---|
void |
addHouseSelectQueryJoins(java.lang.StringBuilder query,
int loadLevel) |
java.sql.PreparedStatement |
checkItem(int id,
java.lang.String table,
java.lang.String title) |
void |
deleteAddressArea(int id) |
void |
deleteAddressCity(int id) |
void |
deleteAddressCountry(int id) |
void |
deleteAddressHouse(int id) |
void |
deleteAddressQuarter(int id) |
void |
deleteAddressStreet(int id) |
static AddressAgglomeration |
getAddressAgglomerationFromRs(java.sql.ResultSet rs,
java.lang.String prefix) |
AddressItem |
getAddressArea(int id,
boolean loadCountryData,
boolean loadCityData) |
AddressCity |
getAddressCity(int id,
boolean loadCountryData) |
AddressAgglomeration |
getAddressCityAgglomeration(int cityId)
Deprecated.
|
static AddressCity |
getAddressCityFromRs(java.sql.ResultSet rs,
java.lang.String prefix) |
AddressCountry |
getAddressCountry(int id) |
static AddressCountry |
getAddressCountryFromRs(java.sql.ResultSet rs,
java.lang.String prefix) |
AddressHouse |
getAddressHouse(int id,
boolean loadCountryData,
boolean loadCityData,
boolean loadStreetData) |
static AddressHouse |
getAddressHouseFromRs(java.sql.ResultSet rs,
java.lang.String prefix,
int loadLevel) |
static AddressItem |
getAddressItemFromRs(java.sql.ResultSet rs,
java.lang.String prefix) |
AddressItem |
getAddressQuarter(int id,
boolean loadCountryData,
boolean loadCityData) |
AddressItem |
getAddressStreet(int id,
boolean loadCountryData,
boolean loadCityData) |
java.util.List<AddressItem> |
getAddressStreetsBySubstring(java.lang.String streetTitleLike,
java.util.List<java.lang.Integer> cityIds)
Поиск улиц по подстроке в заданных городах
|
static AddressSubjectArea |
getAddressSubjectAreaFromRs(java.sql.ResultSet rs,
java.lang.String prefix) |
static AddressSubject |
getAddressSubjectFromRs(java.sql.ResultSet rs,
java.lang.String prefix) |
AddressAgglomeration |
getAgglomerationByCity(int cityId) |
AddressAgglomeration |
getAgglomerationByHouseId(int houseId) |
java.util.List<AddressCity> |
getCitiesByAgglomeration(int agglomerationId) |
java.util.List<IdTitle> |
getCitiesList() |
java.util.Map<java.lang.Integer,java.lang.String> |
getCitiesMap() |
int |
getCityIdByAddress(java.lang.String address) |
java.util.Set<java.lang.Integer> |
getCityIdsByAgglomerationId(int agglomerationId) |
java.lang.String |
getCityTitle(int cityId) |
java.util.List<java.lang.Integer> |
getCountryIdByCityId(java.util.List<java.lang.Integer> countryIds) |
java.util.List<java.lang.Integer> |
getHouseIdsByStreetAndHouse(int streetId,
java.lang.String house,
java.util.List<java.lang.Integer> cityIds) |
void |
getHouseListByTerm(SearchResult searchResult,
java.lang.String term) |
java.util.Map<java.lang.Integer,java.util.List<IdTitle>> |
getQuartersInCitiesMap() |
java.util.List<IdTitle> |
getQuartersList(int cityId) |
java.util.Map<IdTitle,java.util.List<java.lang.String>> |
getSegmentsInCitiesMap(java.util.List<java.lang.Integer> cityIds) |
java.util.List<java.lang.String> |
getSegmentsList(int cityId) |
java.util.List<AddressItem> |
getUpdatedAreas(long time,
java.util.List<java.lang.Integer> citiesId) |
java.util.List<AddressCity> |
getUpdatedCities(long time,
java.util.List<java.lang.Integer> citiesId) |
java.util.List<AddressCountry> |
getUpdatedCountries(long time,
java.util.List<java.lang.Integer> countriesId) |
java.util.List<AddressHouse> |
getUpdatedHouses(long time,
java.util.List<java.lang.Integer> citiesId) |
java.util.List<AddressItem> |
getUpdatedQuarters(long time,
java.util.List<java.lang.Integer> citiesId) |
java.util.List<AddressItem> |
getUpdatedStreets(long time,
java.util.List<java.lang.Integer> citiesId) |
void |
searchAddressAgglomerationList(SearchResult<AddressAgglomeration> searchResult) |
void |
searchAddressAreaList(SearchResult<AddressItem> searchResult,
int cityId) |
void |
searchAddressAreaList(SearchResult<AddressItem> searchResult,
int cityId,
java.lang.String title,
boolean loadCountryData,
boolean loadCityData) |
void |
searchAddressCityList(SearchResult<AddressCity> searchResult,
int countryId,
java.lang.String title,
boolean loadCountryData,
java.util.Set<java.lang.Integer> cityIdFilter) |
void |
searchAddressCountryList(SearchResult<AddressCountry> searchResult,
java.lang.String title) |
void |
searchAddressHouseList(SearchResult<AddressHouse> searchResult,
int streetId,
java.lang.String housePrefix) |
void |
searchAddressHouseList(SearchResult<AddressHouse> searchResult,
int streetId,
java.lang.String house,
boolean absolute,
boolean loadCountryData,
boolean loadCityData,
boolean loadStreetData) |
void |
searchAddressHouseList(SearchResult<AddressHouse> searchResult,
java.util.Set<java.lang.Integer> streetIds,
java.lang.String house,
boolean absolute,
boolean loadCountryData,
boolean loadCityData,
boolean loadStreetData) |
void |
searchAddressQuarterList(SearchResult<AddressItem> searchResult,
int cityId) |
void |
searchAddressQuarterList(SearchResult<AddressItem> searchResult,
int cityId,
java.lang.String title,
boolean loadCountryData,
boolean loadCityData) |
void |
searchAddressQuarterList(SearchResult<AddressItem> searchResult,
java.util.Set<java.lang.Integer> cityIds,
java.lang.String title,
boolean loadCityData) |
void |
searchAddressStreetList(SearchResult<AddressItem> searchResult,
int cityId) |
void |
searchAddressStreetList(SearchResult<AddressItem> searchResult,
java.util.Set<java.lang.Integer> cityIds,
java.lang.String title,
boolean loadCountryData,
boolean loadCityData) |
void |
searchAddressStreetList(SearchResult<AddressItem> searchResult,
java.util.Set<java.lang.Integer> cityIds,
java.lang.String title,
boolean loadCountryData,
boolean loadCityData,
boolean sorted)
Ищет адреса с сортировкой
|
java.util.List<java.lang.String> |
searchFullAddressList(java.lang.String title) |
void |
updateAddressArea(AddressItem addressItem) |
void |
updateAddressCity(AddressCity addressCity) |
void |
updateAddressCityAgglomeration(int cityId,
int agglomerationId) |
void |
updateAddressCountry(AddressCountry addressCountry) |
void |
updateAddressHouse(AddressHouse addressHouse) |
void |
updateAddressQuarter(AddressItem addressItem) |
void |
updateAddressStreet(AddressItem addressItem) |
void |
updateLastUpdateColumn(int id) |
deleteById, execute, execute, execute, executeInsert, executeUpdate, getById, getFoundRows, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getLikePatternEnd, getLikePatternStart, getLikePatternSub, getMySQLLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, update, updateColumn, updateIds, updateIds
public static final int LOAD_LEVEL_HOUSE
public static final int LOAD_LEVEL_STREET
public static final int LOAD_LEVEL_CITY
public static final int LOAD_LEVEL_COUNTRY
public static final int PARAM_SUBJECT
public void searchAddressCountryList(SearchResult<AddressCountry> searchResult, java.lang.String title) throws java.sql.SQLException
java.sql.SQLException
public AddressCountry getAddressCountry(int id) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressAgglomerationList(SearchResult<AddressAgglomeration> searchResult) throws java.sql.SQLException
java.sql.SQLException
public AddressAgglomeration getAgglomerationByCity(int cityId)
@Deprecated public AddressAgglomeration getAddressCityAgglomeration(int cityId) throws java.sql.SQLException
java.sql.SQLException
getAgglomerationByCity(int)
public void searchAddressCityList(SearchResult<AddressCity> searchResult, int countryId, java.lang.String title, boolean loadCountryData, java.util.Set<java.lang.Integer> cityIdFilter) throws java.sql.SQLException
java.sql.SQLException
public AddressCity getAddressCity(int id, boolean loadCountryData) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressAreaList(SearchResult<AddressItem> searchResult, int cityId) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressAreaList(SearchResult<AddressItem> searchResult, int cityId, java.lang.String title, boolean loadCountryData, boolean loadCityData) throws java.sql.SQLException
java.sql.SQLException
public AddressItem getAddressArea(int id, boolean loadCountryData, boolean loadCityData) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressQuarterList(SearchResult<AddressItem> searchResult, int cityId) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressQuarterList(SearchResult<AddressItem> searchResult, int cityId, java.lang.String title, boolean loadCountryData, boolean loadCityData) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressQuarterList(SearchResult<AddressItem> searchResult, java.util.Set<java.lang.Integer> cityIds, java.lang.String title, boolean loadCityData)
public AddressItem getAddressQuarter(int id, boolean loadCountryData, boolean loadCityData) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressStreetList(SearchResult<AddressItem> searchResult, int cityId) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressStreetList(SearchResult<AddressItem> searchResult, java.util.Set<java.lang.Integer> cityIds, java.lang.String title, boolean loadCountryData, boolean loadCityData) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressStreetList(SearchResult<AddressItem> searchResult, java.util.Set<java.lang.Integer> cityIds, java.lang.String title, boolean loadCountryData, boolean loadCityData, boolean sorted) throws java.sql.SQLException
java.sql.SQLException
public AddressItem getAddressStreet(int id, boolean loadCountryData, boolean loadCityData) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<java.lang.String> searchFullAddressList(java.lang.String title) throws java.sql.SQLException
java.sql.SQLException
public AddressAgglomeration getAgglomerationByHouseId(int houseId) throws BGException
BGException
public void searchAddressHouseList(SearchResult<AddressHouse> searchResult, int streetId, java.lang.String housePrefix) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressHouseList(SearchResult<AddressHouse> searchResult, int streetId, java.lang.String house, boolean absolute, boolean loadCountryData, boolean loadCityData, boolean loadStreetData) throws java.sql.SQLException
java.sql.SQLException
public void searchAddressHouseList(SearchResult<AddressHouse> searchResult, java.util.Set<java.lang.Integer> streetIds, java.lang.String house, boolean absolute, boolean loadCountryData, boolean loadCityData, boolean loadStreetData) throws java.sql.SQLException
java.sql.SQLException
public AddressHouse getAddressHouse(int id, boolean loadCountryData, boolean loadCityData, boolean loadStreetData) throws BGException
BGException
public void addHouseSelectQueryJoins(java.lang.StringBuilder query, int loadLevel)
public void updateAddressCountry(AddressCountry addressCountry) throws BGException
BGException
public void deleteAddressCountry(int id) throws BGException
BGException
public void updateAddressCity(AddressCity addressCity) throws BGException
BGException
public void updateAddressCityAgglomeration(int cityId, int agglomerationId) throws BGException
BGException
public void deleteAddressCity(int id) throws BGException
BGException
public java.sql.PreparedStatement checkItem(int id, java.lang.String table, java.lang.String title) throws java.sql.SQLException, BGMessageException
java.sql.SQLException
BGMessageException
public void updateAddressArea(AddressItem addressItem) throws BGException
BGException
public void updateAddressQuarter(AddressItem addressItem) throws BGException
BGException
public void updateAddressStreet(AddressItem addressItem) throws BGException
BGException
public void deleteAddressArea(int id) throws BGException
BGException
public void deleteAddressQuarter(int id) throws BGException
BGException
public void deleteAddressStreet(int id) throws BGException
BGException
public void updateAddressHouse(AddressHouse addressHouse) throws java.sql.SQLException
java.sql.SQLException
public void updateLastUpdateColumn(int id) throws java.sql.SQLException
java.sql.SQLException
public void deleteAddressHouse(int id) throws BGException
BGException
public static AddressHouse getAddressHouseFromRs(java.sql.ResultSet rs, java.lang.String prefix, int loadLevel) throws java.sql.SQLException
java.sql.SQLException
public static AddressItem getAddressItemFromRs(java.sql.ResultSet rs, java.lang.String prefix) throws java.sql.SQLException
java.sql.SQLException
public static AddressSubjectArea getAddressSubjectAreaFromRs(java.sql.ResultSet rs, java.lang.String prefix) throws java.sql.SQLException
java.sql.SQLException
public static AddressSubject getAddressSubjectFromRs(java.sql.ResultSet rs, java.lang.String prefix) throws java.sql.SQLException
java.sql.SQLException
public static AddressCountry getAddressCountryFromRs(java.sql.ResultSet rs, java.lang.String prefix) throws java.sql.SQLException
java.sql.SQLException
public static AddressAgglomeration getAddressAgglomerationFromRs(java.sql.ResultSet rs, java.lang.String prefix) throws java.sql.SQLException
java.sql.SQLException
public static AddressCity getAddressCityFromRs(java.sql.ResultSet rs, java.lang.String prefix) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<AddressCountry> getUpdatedCountries(long time, java.util.List<java.lang.Integer> countriesId) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<AddressCity> getUpdatedCities(long time, java.util.List<java.lang.Integer> citiesId) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<AddressHouse> getUpdatedHouses(long time, java.util.List<java.lang.Integer> citiesId) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<AddressItem> getUpdatedAreas(long time, java.util.List<java.lang.Integer> citiesId) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<AddressItem> getUpdatedQuarters(long time, java.util.List<java.lang.Integer> citiesId) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<AddressItem> getUpdatedStreets(long time, java.util.List<java.lang.Integer> citiesId) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<java.lang.Integer> getCountryIdByCityId(java.util.List<java.lang.Integer> countryIds) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<AddressItem> getAddressStreetsBySubstring(java.lang.String streetTitleLike, java.util.List<java.lang.Integer> cityIds) throws java.sql.SQLException
streetTitleLike
- подстрока поиска в формате SQL-likecityIds
- список id городов, в которых нужно искать
если cityIds == null, то поиск по всем городам (город не задан)java.sql.SQLException
public int getCityIdByAddress(java.lang.String address) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<java.lang.Integer> getHouseIdsByStreetAndHouse(int streetId, java.lang.String house, java.util.List<java.lang.Integer> cityIds) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<AddressCity> getCitiesByAgglomeration(int agglomerationId) throws BGException
BGException
public java.util.Set<java.lang.Integer> getCityIdsByAgglomerationId(int agglomerationId) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getCityTitle(int cityId) throws BGException
BGException
public java.util.List<IdTitle> getCitiesList() throws BGException
BGException
public java.util.Map<java.lang.Integer,java.lang.String> getCitiesMap() throws BGException
BGException
public java.util.List<IdTitle> getQuartersList(int cityId) throws BGException
BGException
public java.util.Map<java.lang.Integer,java.util.List<IdTitle>> getQuartersInCitiesMap() throws BGException
BGException
public java.util.List<java.lang.String> getSegmentsList(int cityId) throws BGException
BGException
public java.util.Map<IdTitle,java.util.List<java.lang.String>> getSegmentsInCitiesMap(java.util.List<java.lang.Integer> cityIds) throws BGException
BGException
public void getHouseListByTerm(SearchResult searchResult, java.lang.String term) throws BGException
BGException