You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Kevin Meyer (JIRA)" <ji...@apache.org> on 2013/02/08 14:57:14 UTC

[jira] [Reopened] (ISIS-220) Add "Paging" support to Objectstore API

     [ https://issues.apache.org/jira/browse/ISIS-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Meyer reopened ISIS-220:
------------------------------


Comments from mail thread:
Dan Haywood:
The issue I have, I think (and I'm kinda thinking aloud here) is that the
paging support ought to apply to all the subtypes of QueryAbstract (in the
applib) and the corresponding subtypes of PersistentQueryAbstract.

For the record (and for anyone following this who wants to know more) the
original four subtypes were:

* QueryFindAllInstances & PersistentQueryFindAllInstances - simply "select *"
* QueryFindByPattern & PersistentQueryFindByPattern - a query by example
using a prototype "pattern" object
* QueryFindByTitle & PersistentQueryFindByTitle - search for an object by its title
* QueryDefault & PersistenceQueryFindUsingApplibQueryDefault  -  execute a
named query (eg a stored procedure or prepared statement)

>From what I see, you've now created a new subtype:

* QueryFindPaged & PersistentQueryFindPaged - simply "select *" plus start, count

However, I can see that this is paging support is orthogonal to the
original four; in other words it ought to be that all four of the query
subtypes should be enhanced.  Rather than having 8 subtypes, I think I'd
rather that they all have an optional paging parameters.

What say you?
---
Kevin Meyer
...
So, sure, I guess I can look into enhancing QueryAbstract with optional parameters. 
...
---
+1's from:
Jeroen van der Wal
Dan Haywood

                
> Add "Paging" support to Objectstore API
> ---------------------------------------
>
>                 Key: ISIS-220
>                 URL: https://issues.apache.org/jira/browse/ISIS-220
>             Project: Isis
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: core-1.0.0
>            Reporter: Kevin Meyer
>            Assignee: Kevin Meyer
>             Fix For: core-2.0.0
>
>
> The org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.ObjectStorePersistence method "boolean hasInstances(ObjectSpecification specification);" could do with a "boolean hasInstances(ObjectSpecification specification, final int start, final int count);" method to support paging through results.
> This impacts all object stores. 
> The "org.apache.isis.applib.AbstractContainedObject" and "org.apache.isis.applib.DomainObjectContainer" methods "protected <T> List<T> allInstances(final Class<T> ofType)" and all the "allMatches(*)" should also get paging equivalents. This will expose paging to services and all POJOs via the inject DomainObjectContainer container.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira