Prevalent Repository

Diego Miranda <[email protected]>
Newsgroups gmane.comp.java.prevayler
Message-ID <[email protected]>
Hi to all!

We are using Prevayler in several projects. For those projects we've created
a Prevalent
Repository. This repository allows the objects to be queried and indexed
with Lucene.
We provide a query and indexing abstraction to simplify the search of the
objects stored
in the repository.

Here, some examples:

- Creating a Repository and storing data:

PrevalenceRepository prevalence = PrevalenceRepository.newInstance();
Repository repository = prevalence.openRepository ("MyApp");

repository.storeOrUpdate (person);
repository.storeOrUpdate (collectionOfPersons);

- Creating index:

repository.createIndex (Person.class, "addresses.state");
repository.createIndex (Person.class, "lastName");

- Querying the objects:

QueryCriteria query = from(Person.class).where(
            and(eq("addresses.street", "Melo"),eq("lastName", "Smith"))
            );
Collection<Person> persons = (Collection<Person>)repository.find(query);


- Deleting objects:

repository.delete ( personOid )

- Working with the repository data

repository.executeDeterministic ( new DeterministicOperations (), argument1,
argument2 );


I'd like to know (if possible) what do you think about this!

Best regards!
Diego Miranda
diego.miranda at gmail dot com

-- 
Ley de Hofstadter: Siempre toma más tiempo del que se preveía, aun cuando se
tenga en cuenta la Ley de Hofstadter.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects

_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.