Class DefaultImageDetailsDao

    • Constructor Detail

      • DefaultImageDetailsDao

        public DefaultImageDetailsDao​(org.hibernate.SessionFactory sessionFactory)
    • Method Detail

      • getImageDetails

        public ImageDetails getImageDetails​(Attachment attachment)
        Description copied from interface: ImageDetailsDao
        Fetch the image details of a specific attachment from the database.
        Specified by:
        getImageDetails in interface ImageDetailsDao
        Parameters:
        attachment - for which the image details will be retrieved
        Returns:
        null if no image details have been stored for this attachment
      • save

        public void save​(ImageDetails imageDetails)
        Description copied from interface: ImageDetailsDao
        Save the image details of an attachment.
        Specified by:
        save in interface ImageDetailsDao
        Parameters:
        imageDetails - to save.
      • imageId

        public static long imageId​(Attachment attachment)
      • prefetchImageDetails

        @Internal
        public int prefetchImageDetails​(Collection<Attachment> attachments)
        Attempts to efficiently resolve the ImageDetailsDto of each given Attachment. It does this by issuing a query for all ImageDetailsDto entities with IDs that match the IDs of the given attachments.
        Specified by:
        prefetchImageDetails in interface ImageDetailsPrefetchDao
        Returns:
        the number of entities that were prefetched
        Since:
        5.10