public class AddressDistributionDAO extends 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_LEFT_JOIN, SQL_LIMIT, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UPDATE, SQL_WHERE
Constructor and Description |
---|
AddressDistributionDAO(java.sql.Connection con) |
Modifier and Type | Method and Description |
---|---|
void |
addHouseToUser(ru.bgcrm.struts.action.AddressDistributionAction.Distribution distr,
int userId,
java.lang.String[] houseIds) |
void |
addQuarterToGroup(java.util.Set<java.lang.Integer> quarterSet,
int distrId,
int groupId) |
void |
freeUserHouses(int userId) |
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
getAllHouses(java.util.List<java.lang.Integer> cityIds) |
int |
getGroupIdByQuarter(int distrId,
int quarter) |
java.util.List<IdTitle> |
getGroupQuarters(int distrId,
int groupId) |
java.util.List<IdTitle> |
getUndistributedGroups(int distrId,
java.util.List<java.lang.Integer> cityIds) |
java.util.List<IdTitle> |
getUndistributedHouses(int distrId,
java.util.List<java.lang.Integer> cityIds,
java.lang.String quarterMask,
java.lang.String streetMask,
java.lang.String houseMask) |
User |
getUserByHouseId(int distrId,
int houseId) |
java.util.List<IdTitle> |
getUserHouses(int userId,
java.lang.String quarterMask,
java.lang.String streetMask,
java.lang.String houseMask) |
void |
removeHouse(int userId,
int distrId,
java.lang.String[] hid) |
void |
removeQuarters(int distrId) |
void |
removeQuarters(int distrId,
int groupId,
java.util.Set<java.lang.Integer> quarters) |
addLikeSql, convertDateToSqlDate, convertDateToTimestamp, deleteById, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getMySQLLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, updateColumn, updateIds, updateIds
public void addHouseToUser(ru.bgcrm.struts.action.AddressDistributionAction.Distribution distr, int userId, java.lang.String[] houseIds) throws java.sql.SQLException, BGException
java.sql.SQLException
BGException
public void removeHouse(int userId, int distrId, java.lang.String[] hid) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getAllHouses(java.util.List<java.lang.Integer> cityIds) throws java.sql.SQLException
java.sql.SQLException
public void freeUserHouses(int userId) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<IdTitle> getUserHouses(int userId, java.lang.String quarterMask, java.lang.String streetMask, java.lang.String houseMask) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<IdTitle> getUndistributedHouses(int distrId, java.util.List<java.lang.Integer> cityIds, java.lang.String quarterMask, java.lang.String streetMask, java.lang.String houseMask) throws java.sql.SQLException
java.sql.SQLException
public java.util.List<IdTitle> getUndistributedGroups(int distrId, java.util.List<java.lang.Integer> cityIds) throws BGException
BGException
public User getUserByHouseId(int distrId, int houseId) throws BGException
BGException
public void addQuarterToGroup(java.util.Set<java.lang.Integer> quarterSet, int distrId, int groupId) throws BGException
BGException
public java.util.List<IdTitle> getGroupQuarters(int distrId, int groupId) throws BGException
BGException
public void removeQuarters(int distrId) throws BGException
BGException
public void removeQuarters(int distrId, int groupId, java.util.Set<java.lang.Integer> quarters) throws BGException
BGException
public int getGroupIdByQuarter(int distrId, int quarter) throws BGException
BGException