java.lang.Object
ru.cg.webbpm.modules.security.api.impl.dao.jooq.BaseDao<org.jooq.Record,UserGroup>
ru.cg.webbpm.modules.security.api.impl.dao.jooq.UserGroupDao

@Repository public class UserGroupDao extends BaseDao<org.jooq.Record,UserGroup>
Author:
m.popov
  • Constructor Details

    • UserGroupDao

      public UserGroupDao()
  • Method Details

    • createRecordMapper

      protected org.jooq.RecordMapper<org.jooq.Record,UserGroup> createRecordMapper()
      Creates user to group record mapper.
      Specified by:
      createRecordMapper in class BaseDao<org.jooq.Record,UserGroup>
      Returns:
      new record mapper.
    • getUserGroupsByUserId

      public List<UserGroup> getUserGroupsByUserId(LoadOptions options, String userId)
      Gets user group links by user account id according to load options.
      Parameters:
      options - indicates load option properties. Instance of LoadOptions type.
      userId - user account id of objects to receive. Instance of String type.
      Returns:
      list of user group links. Instance of List type.
    • getUserGroupsByUserId

      public List<UserGroup> getUserGroupsByUserId(LoadOptions options, String userId, short maxAccessLevel)
      Gets user group links by user account id according to load options and less than passed maximal level access.
      Parameters:
      userId - user account id of objects to receive. Instance of String type.
      options - indicates load options properties. Instance of LoadOptions type.
      maxAccessLevel - maximal level access. Instance of short type.
      Returns:
      list of user group links. Instance of List type.
    • getUserGroupsByGroupId

      public List<UserGroup> getUserGroupsByGroupId(String groupId)
      Return list of user group links by group id
      Parameters:
      groupId - group id
      Returns:
      list of user group links
    • createUserGroup

      public void createUserGroup(UserGroup userGroup)
      Inserts user group link into databases.
      Parameters:
      userGroup - user group link to add. Instance of UserGroup type.
      See Also:
    • createUserGroups

      public void createUserGroups(Collection<UserGroup> userGroups)
      Inserts user group links into databases.
      Parameters:
      userGroups - collection of user group links to add. Instance of Collection type.
    • deleteUserGroup

      public void deleteUserGroup(String userId, String groupsId)
      Removes user group links by user account id and group id.
      Parameters:
      userId - user account id of object to remove. Instance of String type.
      groupsId - group id of object to remove. Instance of String type.
      See Also:
    • deleteUserGroups

      public void deleteUserGroups(String userId, Collection<String> groupsIds)
      Removes user group links by user account id and group ids collection.
      Parameters:
      userId - user account id of objects to remove. Instance of String type.
      groupsIds - group ids of objects to remove. Instance of Collection type.