Re: how to check the data in Prevayler System

Stephan Schmidt <[email protected]> Mon, 19 May 2003 14:51:45 +0200
Newsgroups gmane.comp.java.nanning.devel
Message-ID <[email protected]>
Hi,

you are supposed to have all objects in memory with prevayler.
You can then use java code to 'query' your object tree.

Even the MySQL guys think memory is the better approach in the future:
http://tools.devchannel.org/article.pl?sid=03/05/07/ 
1659239&mode=thread&tid=39

We use something like this in SnipSnap to query or 'Snip' objects:

   public List storageByRecent(int size) {
     return QueryKit.querySorted(storage.storageAll(), new  
SnipComparator() {
       public int compare(Snip s1, Snip s2) {
         return s2.getMTime().compareTo(s1.getMTime());
       }
     }, size);
   }

(I know, should be static)

and

   public static List query(List list, Query query) {
     Iterator iterator = list.iterator();
     List result = new ArrayList();
     while (iterator.hasNext()) {
       Object object = iterator.next();
       if (query.fit(object)) {
         result.add(object);
       }
     }
     return result;
   }

bye
-stephan

On Montag, Mai 19, 2003, at 02:11  Uhr, yiming wang wrote:

> hi all,
>
> In your projects, how do you check the data in
> Prevayler
> System?Normally, when we use a database to store the
> data
> ,we can use sql to check , view, and modify the data .
> but how now? and are there any "Object Viewer" For
> Prevayler System?
>
> thanks for your replay!
>
> wang yiming
> 2003.5.19
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: If flattening out C++ or Java
> code to make your application fit in a relational database is painful,
> don't do it! Check out ObjectStore. Now part of Progress Software.
> http://www.objectstore.net/sourceforge
> _______________________________________________
> Nanning-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nanning-developer



-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge