Package ru.bgcrm.dao.user
Class UserDAO
java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.dao.user.UserDAO
- Direct Known Subclasses:
UserPermsetDAO
-
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 TypeMethodDescriptionvoidaddUserGroup(int userId, UserGroup group) voidcloseUserGroupPeriod(int userId, int groupId, Date date, Date dateFrom, Date dateTo) voiddeleteUser(int id) voideditStartUserGroupPeriod(int userId, int groupId, Date date, Date dateFrom, Date dateTo) getAllPermissions(String tableName, String selectColumn) @Nullable UsergetByTextParam(int paramId, String expectedValue, Set<Integer> statuses) protected StringgetMySQLLimit(Page page) getPermissions(int userId) getUser(int id) intgetUserByFioAndTabelId(ru.ufanet.ldap.user.user1C.structure.elements.Fio fio, List<String> tabelIds) getUserByLogin(String name) intgetUserERPIdByLoginAD(String loginDomain) getUserGroupIds(int userId) getUserGroupList(int userId, Date date) getUserList(Set<Integer> groupIds) getUserList(Set<Integer> groupIds, String userTitleMask) getUserList(Set<Integer> groupFilter, Date dateGroupFrom, Date dateGroupTo) getUserPermsetIds(int userId) getUserQueueIds(int userId) voidremoveUserGroup(int userId, int groupId, Date dateFrom, Date dateTo) voidsearchUser(SearchResult<User> searchResult) voidsearchUser(SearchResult<User> searchResult, int userId, String filterLike, Set<Integer> groupFilter, Set<Integer> groupSelectFilter, Date date, Set<Integer> permsetFilter, int statusFilter) voidsearchUser(SearchResult<User> searchResult, String titleOrLoginFilter, Set<Integer> groupFilter) voidsearchUser(SearchResult<User> searchResult, String filterLike, Set<Integer> groupFilter, Set<Integer> groupSelectFilter, Date date, Set<Integer> permsetFilter, int statusFilter) voidupdatePermissions(Set<String> action, Set<String> config, int userId) voidupdatePersonalization(String configBefore, User user) Обновить персональныую конфигурацию, только если она отличается от configBefore.voidupdateUser(int userId, String title, String login, String pswd, String description) voidupdateUser(User user) 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, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, update, updateColumn, updateIds, updateIds
-
Constructor Details
-
UserDAO
-
-
Method Details
-
searchUser
- Throws:
BGException
-
searchUser
public void searchUser(SearchResult<User> searchResult, int userId, String filterLike, Set<Integer> groupFilter, Set<Integer> groupSelectFilter, Date date, Set<Integer> permsetFilter, int statusFilter) throws BGException - Throws:
BGException
-
searchUser
public void searchUser(SearchResult<User> searchResult, String filterLike, Set<Integer> groupFilter, Set<Integer> groupSelectFilter, Date date, Set<Integer> permsetFilter, int statusFilter) throws BGException - Throws:
BGException
-
searchUser
public void searchUser(SearchResult<User> searchResult, String titleOrLoginFilter, Set<Integer> groupFilter) throws BGException - Throws:
BGException
-
getUserList
- Throws:
BGException
-
getUserList
- Throws:
BGException
-
getUserList
- Throws:
BGException
-
getUserList
public List<User> getUserList(Set<Integer> groupFilter, Date dateGroupFrom, Date dateGroupTo) throws BGException - Throws:
BGException
-
getAllUserGroups
- Throws:
BGException
-
getUserGroupIds
- Throws:
BGException
-
getAllUserGroupIds
- Throws:
BGException
-
getUserPermsetIds
- Throws:
BGException
-
getAllUserPermsetIds
- Throws:
BGException
-
getUserQueueIds
- Throws:
BGException
-
getAllUserQueueIds
- Throws:
BGException
-
updateUser
public void updateUser(int userId, String title, String login, String pswd, String description) throws BGException, SQLException - Throws:
BGExceptionSQLException
-
updateUser
- Throws:
BGExceptionSQLException
-
getUserByLogin
- Throws:
BGException
-
getUser
- Throws:
BGException
-
deleteUser
- Throws:
BGException
-
getMySQLLimit
- Overrides:
getMySQLLimitin classCommonDAO
-
getAllPermissions
public Map<Integer,Map<String, getAllPermissionsParameterMap>> (String tableName, String selectColumn) throws BGException - Throws:
BGException
-
getAllUserPerm
- Throws:
BGException
-
updatePermissions
public void updatePermissions(Set<String> action, Set<String> config, int userId) throws BGException - Throws:
BGException
-
getPermissions
- Throws:
BGException
-
updatePersonalization
Обновить персональныую конфигурацию, только если она отличается от configBefore.- Parameters:
configBefore- null, если нужно безусловное сохранение.user-- Throws:
BGException
-
addUserGroup
- Throws:
BGException
-
removeUserGroup
- Throws:
BGException
-
getUserGroupList
- Throws:
BGException
-
getUserERPIdByLoginAD
- Throws:
SQLException
-
getUserByFioAndTabelId
public int getUserByFioAndTabelId(ru.ufanet.ldap.user.user1C.structure.elements.Fio fio, List<String> tabelIds) throws Exception - Throws:
Exception
-
closeUserGroupPeriod
public void closeUserGroupPeriod(int userId, int groupId, Date date, Date dateFrom, Date dateTo) throws BGException - Throws:
BGException
-
editStartUserGroupPeriod
public void editStartUserGroupPeriod(int userId, int groupId, Date date, Date dateFrom, Date dateTo) throws BGException - Throws:
BGException
-
getByTextParam
@Nullable public @Nullable User getByTextParam(int paramId, String expectedValue, Set<Integer> statuses) throws BGException - Throws:
BGException
-