Package ru.bgcrm.dao
Class AddressDistributionDAO
java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.dao.AddressDistributionDAO
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bgcrm.dao.CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id> -
Field Summary
Fields inherited from class ru.bgcrm.dao.CommonDAO
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHouseToUser(AddressDistributionAction.Distribution distr, int userId, String[] houseIds) voidaddQuarterToGroup(Set<Integer> quarterSet, int distrId, int groupId) voidfreeUserHouses(int userId) getAllHouses(List<Integer> cityIds) intgetFlatCount(int userId) intgetGroupIdByQuarter(int distrId, int quarter) getGroupQuarterMap(int groupId) getGroupQuarters(int distrId, int groupId) getGroupQuarters(int distrId, int groupId, int cityId) getUndistributedGroups(int distrId, List<Integer> cityIds) getUndistributedHouses(int distrId, List<Integer> cityIds, String quarterMask, String streetMask, String houseMask) getUserByHouseId(int distrId, int houseId) getUserGroupHouses(int userId) getUserHouses(int userId, String quarterMask, String streetMask, String houseMask) getUserQuarters(int userId) voidremoveHouse(int userId, int distrId, String[] hid) voidremoveQuarters(int distrId) voidremoveQuarters(int distrId, int groupId, Set<Integer> quarters) Methods inherited from class ru.bgcrm.dao.CommonDAO
buildPlaceholders, deleteById, execute, execute, execute, executeBatch, executeInsert, executeUpdate, getById, getFoundRows, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getLikePatternEnd, getLikePatternStart, getLikePatternSub, getMySQLLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, update, updateColumn, updateIds, updateIds
-
Constructor Details
-
AddressDistributionDAO
-
-
Method Details
-
addHouseToUser
public void addHouseToUser(AddressDistributionAction.Distribution distr, int userId, String[] houseIds) throws SQLException, BGException - Throws:
SQLExceptionBGException
-
removeHouse
- Throws:
SQLException
-
getAllHouses
- Throws:
SQLException
-
freeUserHouses
- Throws:
SQLException
-
getUserHouses
public List<IdTitle> getUserHouses(int userId, String quarterMask, String streetMask, String houseMask) throws SQLException - Throws:
SQLException
-
getUndistributedHouses
public List<IdTitle> getUndistributedHouses(int distrId, List<Integer> cityIds, String quarterMask, String streetMask, String houseMask) throws SQLException - Throws:
SQLException
-
getUndistributedGroups
- Throws:
BGException
-
getUserByHouseId
- Throws:
BGException
-
addQuarterToGroup
- Throws:
BGException
-
getUserQuarters
- Throws:
BGException
-
getUserGroupHouses
- Throws:
BGException
-
getGroupQuarters
- Throws:
BGException
-
getGroupQuarters
- Throws:
BGException
-
removeQuarters
- Throws:
BGException
-
removeQuarters
- Throws:
BGException
-
getGroupIdByQuarter
- Throws:
BGException
-
getFlatCount
- Throws:
BGException
-
getGroupQuarterMap
- Throws:
BGException
-