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 java.lang.String BEAN_NAME
      The name of the bean of the DAO
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void delete​(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a resource from the database
      java.util.List<DatabaseResource> findAll​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of resources
      java.util.List<java.lang.Integer> findAllId​(DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of resource ids
      java.util.List<DatabaseResource> findByListId​(java.util.List<java.lang.Integer> listId, DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of database resources from an id list
      DatabaseResource findByPrimaryKey​(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find a resource from its primary key
      java.util.List<DatabaseResource> findByResourceType​(java.lang.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 Detail

      • BEAN_NAME

        static final java.lang.String BEAN_NAME
        The name of the bean of the DAO
        See Also:
        Constant Field Values
    • Method Detail

      • 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

        java.util.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

        java.util.List<java.lang.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

        java.util.List<DatabaseResource> findByListId​(java.util.List<java.lang.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

        java.util.List<DatabaseResource> findByResourceType​(java.lang.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