Class PermissionHbmDAO

java.lang.Object
org.europa.together.application.GenericHbmDAO<PermissionDO,String>
org.europa.together.application.acl.PermissionHbmDAO
All Implemented Interfaces:
Serializable, PermissionDAO, org.europa.together.business.GenericDAO<PermissionDO,String>

@Repository @Transactional public class PermissionHbmDAO extends org.europa.together.application.GenericHbmDAO<PermissionDO,String> implements PermissionDAO
Implementation of the PermissionDAO.
See Also:
  • Field Summary

    Fields inherited from class org.europa.together.application.GenericHbmDAO

    mainEntityManagerFactory

    Fields inherited from interface org.europa.together.business.GenericDAO

    FEATURE_ID
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    find(String permissionId)
    Override the find() method to fetch a permission by the given id.
    find(String roleName, String resource, String view)
    Override the find() method to fetch a permission by the given roleName, resource and view.
    List all permissions of a role.

    Methods inherited from class org.europa.together.application.GenericHbmDAO

    countAllElements, create, delete, deserializeJsonAsList, deserializeJsonAsObject, getPrimaryKeyOfObject, listAllElements, serializeAsJson, update

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.europa.together.business.GenericDAO

    countAllElements, create, delete, deserializeJsonAsList, deserializeJsonAsObject, getPrimaryKeyOfObject, listAllElements, serializeAsJson, update
  • Constructor Details

    • PermissionHbmDAO

      public PermissionHbmDAO()
      Default Constructor.
  • Method Details

    • find

      public PermissionDO find(String permissionId)
      Description copied from interface: PermissionDAO
      Override the find() method to fetch a permission by the given id.
      Specified by:
      find in interface org.europa.together.business.GenericDAO<PermissionDO,String>
      Specified by:
      find in interface PermissionDAO
      Overrides:
      find in class org.europa.together.application.GenericHbmDAO<PermissionDO,String>
      Parameters:
      permissionId - as String
      Returns:
      PermissionDO as Object
    • find

      public PermissionDO find(String roleName, String resource, String view)
      Description copied from interface: PermissionDAO
      Override the find() method to fetch a permission by the given roleName, resource and view.
      Specified by:
      find in interface PermissionDAO
    • listRolePermissions

      @Transactional(readOnly=true) public List<PermissionDO> listRolePermissions(String roleName)
      Description copied from interface: PermissionDAO
      List all permissions of a role. If a role not exist the result will be an empty list.
      Specified by:
      listRolePermissions in interface PermissionDAO
      Parameters:
      roleName - as String
      Returns:
      List of PermissionDO