Class DatabaseResourceHome


  • public final class DatabaseResourceHome
    extends java.lang.Object
    Database resource home
    • Method Detail

      • create

        public static void create​(DatabaseResource resource)
        Create a new database resource
        Parameters:
        resource - The resource to creates
      • update

        public static void update​(DatabaseResource resource)
        Updates a database resource
        Parameters:
        resource - The resource
      • delete

        public static void delete​(int nIdResource)
        Remove a resource from the database
        Parameters:
        nIdResource - the id of the resource
      • findByPrimaryKey

        public static DatabaseResource findByPrimaryKey​(int nIdResource)
        Find a resource from its primary key
        Parameters:
        nIdResource - the id of the resource
        Returns:
        The resource, or null if no resource has the given primary key
      • findAll

        public static java.util.List<DatabaseResource> findAll()
        Get the list of resources
        Returns:
        The list of resources
      • findAllId

        public static java.util.List<java.lang.Integer> findAllId​(DatabaseResourceSort resourceSort)
        Get the list of ids of resources
        Parameters:
        resourceSort - The sort parameters
        Returns:
        The list of ids of resources
      • findByListId

        public static java.util.List<DatabaseResource> findByListId​(java.util.List<java.lang.Integer> listId,
                                                                    DatabaseResourceSort resourceSort)
        Get the list of database resources from an id list
        Parameters:
        listId - The list of ids of resources to get
        resourceSort - The sort parameters
        Returns:
        The list of resources
      • findByResourceType

        public static java.util.List<DatabaseResource> findByResourceType​(java.lang.String strResourceType)
        Get the list of resources that have a given resource type
        Parameters:
        strResourceType - The resource type
        Returns:
        The list of resources, or an empty list if no resource has the given resource type