public class UserDAO extends CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id>
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 |
---|
UserDAO(java.sql.Connection con) |
Modifier and Type | Method and Description |
---|---|
void |
addUserGroup(int userId,
UserGroup group) |
void |
closeUserGroupPeriod(int userId,
int groupId,
java.util.Date date,
java.util.Date dateFrom,
java.util.Date dateTo) |
void |
deleteUser(int id) |
void |
editStartUserGroupPeriod(int userId,
int groupId,
java.util.Date date,
java.util.Date dateFrom,
java.util.Date dateTo) |
java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,ParameterMap>> |
getAllPermissions(java.lang.String tableName,
java.lang.String selectColumn) |
java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> |
getAllUserGroupIds() |
java.util.Map<java.lang.Integer,java.util.List<UserGroup>> |
getAllUserGroups() |
java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,ParameterMap>> |
getAllUserPerm() |
java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> |
getAllUserPermsetIds() |
java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> |
getAllUserQueueIds() |
User |
getByTextParam(int paramId,
java.lang.String expectedValue,
java.util.Set<java.lang.Integer> statuses) |
protected java.lang.String |
getMySQLLimit(Page page) |
java.util.Map<java.lang.String,ParameterMap> |
getPermissions(int userId) |
User |
getUser(int id) |
int |
getUserByFioAndTabelId(Fio fio,
java.util.List<java.lang.String> tabelIds) |
User |
getUserByLogin(java.lang.String name) |
int |
getUserERPIdByLoginAD(java.lang.String loginDomain) |
java.util.Set<java.lang.Integer> |
getUserGroupIds(int userId) |
java.util.List<UserGroup> |
getUserGroupList(int userId,
java.util.Date date) |
java.util.List<User> |
getUserList() |
java.util.List<User> |
getUserList(java.util.Set<java.lang.Integer> groupIds) |
java.util.List<User> |
getUserList(java.util.Set<java.lang.Integer> groupFilter,
java.util.Date dateGroupFrom,
java.util.Date dateGroupTo) |
java.util.List<User> |
getUserList(java.util.Set<java.lang.Integer> groupIds,
java.lang.String userTitleMask) |
java.util.List<java.lang.Integer> |
getUserPermsetIds(int userId) |
java.util.Set<java.lang.Integer> |
getUserQueueIds(int userId) |
void |
removeUserGroup(int userId,
int groupId,
java.util.Date dateFrom,
java.util.Date dateTo) |
void |
searchUser(SearchResult<User> searchResult) |
void |
searchUser(SearchResult<User> searchResult,
int userId,
java.lang.String filterLike,
java.util.Set<java.lang.Integer> groupFilter,
java.util.Set<java.lang.Integer> groupSelectFilter,
java.util.Date date,
java.util.Set<java.lang.Integer> permsetFilter,
int statusFilter) |
void |
searchUser(SearchResult<User> searchResult,
java.lang.String titleOrLoginFilter,
java.util.Set<java.lang.Integer> groupFilter) |
void |
searchUser(SearchResult<User> searchResult,
java.lang.String filterLike,
java.util.Set<java.lang.Integer> groupFilter,
java.util.Set<java.lang.Integer> groupSelectFilter,
java.util.Date date,
java.util.Set<java.lang.Integer> permsetFilter,
int statusFilter) |
void |
updatePermissions(java.util.Set<java.lang.String> action,
java.util.Set<java.lang.String> config,
int userId) |
void |
updatePersonalization(java.lang.String configBefore,
User user)
Обновить персональныую конфигурацию, только если она отличается от configBefore.
|
void |
updateUser(int userId,
java.lang.String title,
java.lang.String login,
java.lang.String pswd,
java.lang.String description) |
void |
updateUser(User user) |
deleteById, execute, execute, execute, executeInsert, executeUpdate, getById, getFoundRows, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getLikePatternEnd, getLikePatternStart, getLikePatternSub, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, update, updateColumn, updateIds, updateIds
public void searchUser(SearchResult<User> searchResult) throws BGException
BGException
public void searchUser(SearchResult<User> searchResult, int userId, java.lang.String filterLike, java.util.Set<java.lang.Integer> groupFilter, java.util.Set<java.lang.Integer> groupSelectFilter, java.util.Date date, java.util.Set<java.lang.Integer> permsetFilter, int statusFilter) throws BGException
BGException
public void searchUser(SearchResult<User> searchResult, java.lang.String filterLike, java.util.Set<java.lang.Integer> groupFilter, java.util.Set<java.lang.Integer> groupSelectFilter, java.util.Date date, java.util.Set<java.lang.Integer> permsetFilter, int statusFilter) throws BGException
BGException
public void searchUser(SearchResult<User> searchResult, java.lang.String titleOrLoginFilter, java.util.Set<java.lang.Integer> groupFilter) throws BGException
BGException
public java.util.List<User> getUserList() throws BGException
BGException
public java.util.List<User> getUserList(java.util.Set<java.lang.Integer> groupIds) throws BGException
BGException
public java.util.List<User> getUserList(java.util.Set<java.lang.Integer> groupIds, java.lang.String userTitleMask) throws BGException
BGException
public java.util.List<User> getUserList(java.util.Set<java.lang.Integer> groupFilter, java.util.Date dateGroupFrom, java.util.Date dateGroupTo) throws BGException
BGException
public java.util.Map<java.lang.Integer,java.util.List<UserGroup>> getAllUserGroups() throws BGException
BGException
public java.util.Set<java.lang.Integer> getUserGroupIds(int userId) throws BGException
BGException
public java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> getAllUserGroupIds() throws BGException
BGException
public java.util.List<java.lang.Integer> getUserPermsetIds(int userId) throws BGException
BGException
public java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> getAllUserPermsetIds() throws BGException
BGException
public java.util.Set<java.lang.Integer> getUserQueueIds(int userId) throws BGException
BGException
public java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> getAllUserQueueIds() throws BGException
BGException
public void updateUser(int userId, java.lang.String title, java.lang.String login, java.lang.String pswd, java.lang.String description) throws BGException, java.sql.SQLException
BGException
java.sql.SQLException
public void updateUser(User user) throws BGException, java.sql.SQLException
BGException
java.sql.SQLException
public User getUserByLogin(java.lang.String name) throws BGException
BGException
public User getUser(int id) throws BGException
BGException
public void deleteUser(int id) throws BGException
BGException
protected java.lang.String getMySQLLimit(Page page)
getMySQLLimit
in class CommonDAO
public java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,ParameterMap>> getAllPermissions(java.lang.String tableName, java.lang.String selectColumn) throws BGException
BGException
public java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,ParameterMap>> getAllUserPerm() throws BGException
BGException
public void updatePermissions(java.util.Set<java.lang.String> action, java.util.Set<java.lang.String> config, int userId) throws BGException
BGException
public java.util.Map<java.lang.String,ParameterMap> getPermissions(int userId) throws BGException
BGException
public void updatePersonalization(java.lang.String configBefore, User user) throws BGException
configBefore
- null, если нужно безусловное сохранение.user
- BGException
public void addUserGroup(int userId, UserGroup group) throws BGException
BGException
public void removeUserGroup(int userId, int groupId, java.util.Date dateFrom, java.util.Date dateTo) throws BGException
BGException
public java.util.List<UserGroup> getUserGroupList(int userId, java.util.Date date) throws BGException
BGException
public int getUserERPIdByLoginAD(java.lang.String loginDomain) throws java.sql.SQLException
java.sql.SQLException
public int getUserByFioAndTabelId(Fio fio, java.util.List<java.lang.String> tabelIds) throws java.lang.Exception
java.lang.Exception
public void closeUserGroupPeriod(int userId, int groupId, java.util.Date date, java.util.Date dateFrom, java.util.Date dateTo) throws BGException
BGException
public void editStartUserGroupPeriod(int userId, int groupId, java.util.Date date, java.util.Date dateFrom, java.util.Date dateTo) throws BGException
BGException
public User getByTextParam(int paramId, java.lang.String expectedValue, java.util.Set<java.lang.Integer> statuses) throws BGException
BGException