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
        attachment - for which the image details will be retrieved
        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
        imageDetails - to save.
      • imageId

        public static long imageId​(Attachment attachment)
      • prefetchImageDetails

        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
        the number of entities that were prefetched