java.lang.Object
ru.cg.webbpm.modules.security.api.impl.dao.jooq.BaseDao<UserRoleRecord,Role>
ru.cg.webbpm.modules.security.api.impl.dao.jooq.RoleDao

@Repository public class RoleDao extends BaseDao<UserRoleRecord,Role>
Author:
m.popov
  • Constructor Details

    • RoleDao

      public RoleDao()
  • Method Details

    • createRecordMapper

      protected org.jooq.RecordMapper<UserRoleRecord,Role> createRecordMapper()
      Creates role record mapper.
      Specified by:
      createRecordMapper in class BaseDao<UserRoleRecord,Role>
      Returns:
      record mapper.
    • getRole

      public Role getRole(String roleId)
      Gets role by role id.
      Parameters:
      roleId - id of role to receive. Instance of String type.
      Returns:
      requested role or null if does not exist. Instance of Role type.
    • getRoleByName

      public Role getRoleByName(String roleName)
      Gets role by role name.
      Parameters:
      roleName - name of role to receive. Instance of String type.
      Returns:
      requested role or null if does not exist. Instance of Role type.
    • getRoles

      public List<Role> getRoles(LoadOptions options)
      Gets roles according to load options.
      Parameters:
      options - indicates load option properties. Instance of LoadOptions type.
      Returns:
      list of roles. Instance of List type.
    • getRoles

      public Collection<Role> getRoles(Collection<String> roleIds)
      Gets roles by collection of role ids.
      Parameters:
      roleIds - role ids of objects to receive. Instance of Collection type.
      Returns:
      collection of roles. Instance of Collection type.
    • createRoles

      public void createRoles(Collection<Role> roles)
      Inserts roles into database.
      Parameters:
      roles - collection of roles to add. Instance of Collection type.
    • updateRoles

      @Transactional public void updateRoles(Collection<Role> roles)
      Updates roles in database.
      Parameters:
      roles - collection of roles to update. Instance of Collection type.
    • updateRoleUpdated

      public void updateRoleUpdated(String roleId, Timestamp timestamp)
      Updates role "updated" column value according to timestamp and role id.
      Parameters:
      roleId - id of role to update. Instance of String type.
      timestamp - timestamp. Instance of Timestamp type.
      See Also:
    • updateRolesUpdated

      public void updateRolesUpdated(Collection<String> roleIds, Timestamp timestamp)
      Updates roles "updated" column value according to timestamp and collection of role ids.
      Parameters:
      roleIds - ids collection of roles to update. Instance of Collection type.
      timestamp - timestamp. Instance of Timestamp type.
    • deleteRoles

      public void deleteRoles(Collection<String> roleIds)
      Removes roles by collection of role ids.
      Parameters:
      roleIds - ids collection of roles to remove. Instance of Collection type.