Interface IDatabaseResourceDAO

All Known Implementing Classes:
DatabaseResourceDAO

public interface IDatabaseResourceDAO
Interface of DAO to manage database resources
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the bean of the DAO
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Remove a resource from the database
    findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the list of resources
    findAllId(DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the list of resource ids
    findByListId(List<Integer> listId, DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the list of database resources from an id list
    findByPrimaryKey(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Find a resource from its primary key
    findByResourceType(String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the list of resources that have a given resource type
    void
    insert(DatabaseResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    insert a new resource into the database
    void
    update(DatabaseResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Updates a database resource
  • Field Details

  • Method Details

    • insert

      void insert(DatabaseResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      insert a new resource into the database
      Parameters:
      resource - The resource to creates
      plugin - The plugin
    • update

      void update(DatabaseResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Updates a database resource
      Parameters:
      resource - The resource
      plugin - The plugin
    • delete

      void delete(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a resource from the database
      Parameters:
      nIdResource - the id of the resource
      plugin - the plugin
    • findByPrimaryKey

      DatabaseResource findByPrimaryKey(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find a resource from its primary key
      Parameters:
      nIdResource - the id of the resource
      plugin - The plugin
      Returns:
      The resource, or null if no resource has the given primary key
    • findAll

      List<DatabaseResource> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of resources
      Parameters:
      plugin - the plugin
      Returns:
      The list of resources
    • findAllId

      List<Integer> findAllId(DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of resource ids
      Parameters:
      resourceSort - The sort parameters
      plugin - The plugin
      Returns:
      the list of resource ids
    • findByListId

      List<DatabaseResource> findByListId(List<Integer> listId, DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of database resources from an id list
      Parameters:
      listId - The list of ids of resources to get
      resourceSort - The sort parameters
      plugin - The plugin
      Returns:
      The list of resources
    • findByResourceType

      List<DatabaseResource> findByResourceType(String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of resources that have a given resource type
      Parameters:
      strResourceType - The resource type
      plugin - The plugin
      Returns:
      The list of resources, or an empty list if no resource has the given resource type