Class DefaultImageDetailsDao
java.lang.Object
com.atlassian.confluence.pages.attachments.DefaultImageDetailsDao
- All Implemented Interfaces:
ImageDetailsPrefetchDao,ImageDetailsDao
@ParametersAreNonnullByDefault
public class DefaultImageDetailsDao
extends Object
implements ImageDetailsDao, ImageDetailsPrefetchDao
Stores and retrieves
ImageDetails via Hibernate.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetImageDetails(Attachment attachment) Fetch the image details of a specific attachment from the database.static longimageId(Attachment attachment) intprefetchImageDetails(Collection<Attachment> attachments) Attempts to efficiently resolve theImageDetailsDtoof each givenAttachment.voidremoveDetailsFor(Attachment attachment) Remove any storedImageDetailsfor the givenAttachment.voidsave(ImageDetails imageDetails) Save the image details of an attachment.
-
Constructor Details
-
DefaultImageDetailsDao
public DefaultImageDetailsDao(org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
getImageDetails
Description copied from interface:ImageDetailsDaoFetch the image details of a specific attachment from the database.- Specified by:
getImageDetailsin interfaceImageDetailsDao- Parameters:
attachment- for which the image details will be retrieved- Returns:
- null if no image details have been stored for this attachment
-
save
Description copied from interface:ImageDetailsDaoSave the image details of an attachment.- Specified by:
savein interfaceImageDetailsDao- Parameters:
imageDetails- to save.
-
removeDetailsFor
Description copied from interface:ImageDetailsDaoRemove any storedImageDetailsfor the givenAttachment.- Specified by:
removeDetailsForin interfaceImageDetailsDao
-
imageId
-
prefetchImageDetails
Attempts to efficiently resolve theImageDetailsDtoof each givenAttachment. It does this by issuing a query for allImageDetailsDtoentities with IDs that match the IDs of the given attachments.- Specified by:
prefetchImageDetailsin interfaceImageDetailsPrefetchDao- Returns:
- the number of entities that were prefetched
- Since:
- 5.10
-