java.lang.Object
ru.cg.webbpm.modules.security.api.impl.dao.jooq.BaseDao<UserGroupRecord,Group>
ru.cg.webbpm.modules.security.api.impl.dao.jooq.GroupDao

@Repository public class GroupDao extends BaseDao<UserGroupRecord,Group>
Author:
latypov
  • Constructor Details

    • GroupDao

      @Autowired public GroupDao(AccessLevelDao accessLevelDao)
  • Method Details

    • createRecordMapper

      protected org.jooq.RecordMapper<UserGroupRecord,Group> createRecordMapper()
      Creates group record mapper.
      Specified by:
      createRecordMapper in class BaseDao<UserGroupRecord,Group>
      Returns:
      new record mapper.
    • createEnrichedRecordMapper

      protected org.jooq.RecordMapper<org.jooq.Record,Group> createEnrichedRecordMapper()
      Creates group record mapper.
      Overrides:
      createEnrichedRecordMapper in class BaseDao<UserGroupRecord,Group>
      Returns:
      new record mapper.
    • enriched

      protected Group enriched(Group group)
      Populates group instance by AccessLevel instance.
      Overrides:
      enriched in class BaseDao<UserGroupRecord,Group>
      Parameters:
      group - Group to populate by instance of AccessLevel.
      Returns:
      the same populated object or null.
    • getGroup

      public Group getGroup(String groupId)
      Gets group by group id.
      Parameters:
      groupId - group id of group to receive. Instance of String type.
      Returns:
      requested group or null if does not exist. Instance of Group type.
    • getGroupByName

      public Group getGroupByName(String groupName)
      Gets group by group name.
      Parameters:
      groupName - group name of group to receive. Instance of String type.
      Returns:
      requested group or null if does not exist. Instance of Group type.
    • getGroups

      public List<Group> getGroups(LoadOptions options, short maxAccessLevel)
      Gets groups according to load options and less than passed maximal level access.
      Parameters:
      options - indicates load option properties. Instance of LoadOptions type.
      maxAccessLevel - maximal level access. Instance of short type.
      Returns:
      list of groups. Instance of List type.
    • getGroups

      public Collection<Group> getGroups(Collection<String> groupIds)
      Gets groups according to collection of group ids.
      Parameters:
      groupIds - group ids of objects to receive. Instance of Collection type.
      Returns:
      collection of groups. Instance of Collection type.
    • createGroups

      public void createGroups(Collection<Group> groups)
      Inserts groups into database.
      Parameters:
      groups - collection of groups to add. Instance of Collection type.
    • updateGroups

      public void updateGroups(Collection<Group> groups)
      Updates groups in database.
      Parameters:
      groups - collection of groups to update. Instance of Collection type.
    • updateGroupUpdated

      public void updateGroupUpdated(String groupId, Timestamp timestamp)
      Updates group "updated" column value according to timestamp and user account id.
      Parameters:
      groupId - group id of object to update. Instance of String type.
      timestamp - timestamp. Instance of Timestamp type.
    • deleteGroups

      public void deleteGroups(Collection<String> groupIds)
      Removes groups by group ids.
      Parameters:
      groupIds - collection of group ids to remove. Instance of Collection type.