[ 
http://jira.magnolia-cms.com/browse/MGNLSTK-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=30649#action_30649
 ] 

Jörg von Frantzius commented on MGNLSTK-690:
--------------------------------------------

Result from discussing with Philipp:
* existing class hierarchy will be kept
* {{AbstractItemListModel}} methods {{filter()}} and {{sort()}} changed to not 
abstract (so new subclasses don't need to implement them), and instead 
implemented empty in {{AbstractItemListModel}}
* new methods added to {{AbstractItemListModel}}:
** {{protected String getFilterClause()}}
** {{protected String getSortingClause()}}
* {{AbstractItemListModel.search()}} changed to first query using 
{{getFilterClause()}},  {{getSortingClause()}} and {{getMaxResults()}}, and 
afterwards invoke {{filter()}} and {{sort()}} 
** this will keep API compatibility, i.e. for existing subclasses outside STK 
that have overridden these methods
** only currently known problem: will break overridden {{filter()}} in 
subclasses when these filter less restrictive than the originally overridden 
{{filter()}} implementation
* {{AbstractDateContentModel.sort()}}: will still sort in Java if 
{{defaultDate}} is not null, because there is no way to express that behaviour 
in a ORDER BY clause


> Provide for sorting, filtering and shrinking by query in STKUtil
> ----------------------------------------------------------------
>
>                 Key: MGNLSTK-690
>                 URL: http://jira.magnolia-cms.com/browse/MGNLSTK-690
>             Project: Magnolia Standard Templating Kit
>          Issue Type: Improvement
>          Components: base system
>            Reporter: Jörg von Frantzius
>            Assignee: Philipp Bärfuss
>         Attachments: magnolia-module-standard-templating-kit.patch
>
>
> Currently any callers of 
> {{info.magnolia.module.templatingkit.util.STKUtil.getContentListByTemplateName(Content,
>  String)}} will have to implement sorting, filtering and shrinking of results 
> in Java. This leads to intolerable perfomance when thousands of result 
> objects must be processed in Java.
> The provided patch extends some method signatures of STKUtil so a 
> maxResultSize (for shrinking), andClause (for filtering) and orderByClause 
> (for sorting) can be passed in. This will allow subclasses of  
> AbstractListItemModel to perform sorting, filtering and shrinking via JCR 
> query rather than in Java.
> The provided patch requires the application of the patch previously provided 
> in [MAGNOLIA-3331].

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to