public class AttachmentToAttachmentDataQueryResultConverter extends DirectQueryResultConverter<Attachment,AttachmentData>
| Constructor and Description |
|---|
AttachmentToAttachmentDataQueryResultConverter(Locale locale)
Create a new converter which will return the converted list sorted by filename.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
convert(Attachment source,
AttachmentData target)
Converts the temporary object of the query to a list object
|
PageableList<AttachmentData> |
convert(PageableList<Attachment> queryResult)
Converts the temporary object of the query to a list object
|
AttachmentData |
create()
Creates a new pageable list object to fill
|
void |
sortByName(PageableList<AttachmentData> attachments)
Sort the attachments alphabetically by filename using the locale passed to the constructor.
|
convertconvertCollectionpublic AttachmentToAttachmentDataQueryResultConverter(Locale locale)
locale - the locale to use for sortingpublic boolean convert(Attachment source, AttachmentData target)
QueryResultConverterconvert in class QueryResultConverter<Attachment,AttachmentData>source - The temporary object returned by the executed querytarget - The converted list objectpublic PageableList<AttachmentData> convert(PageableList<Attachment> queryResult)
QueryResultConverterconvert in class QueryResultConverter<Attachment,AttachmentData>queryResult - the temporary object returned by the executed querypublic AttachmentData create()
QueryResultConvertercreate in class QueryResultConverter<Attachment,AttachmentData>public void sortByName(PageableList<AttachmentData> attachments)
attachments - the attachments to sortCopyright © 2019 Communote team. All rights reserved.