db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: Query and QueryByCriteria
Date Tue, 29 Mar 2005 19:31:49 GMT
Jakob Braeuchi wrote:
> hi vadim,
> i'd prefer to have interfaces for Query, QueryByCriteria, 
> QueryByExample, and ReportQuery. the current interface Query is a mix of 
>  the first three interfaces.

Does it mean you plan to trim Query interface?

> how would your extended Query-interface look like ?

So far it's class, named QueryByFKCriteria, and it is simplification of the 
QueryByCriteria class. It takes (Class, String[] names, String[] values) as 
constructir arguments and internally creates Criteria in the form of "name=value 
AND ...".

After that, if foreign-key stored procedure is declared on the class, my queries 
are executing using this stored procedure. Otherwise, SqlSelectStatement 
generates select as usual.

> immutable queries is a problem in the current version of ojb because 
> some of the criteria are generated at runtime (ie. IdentityCriteria), 
> see preprocess.



> jakob
> Vadim Gritsenko schrieb:
>> Jakob Braeuchi wrote:
>>> hi vadim,
>>> query-refactoring is already on my todo-list. i prefer to convert 
>>> QueryByCriteria into an interface and to have a QueryByCriteriaImpl 
>>> class.
>> You don't want to extend Query interface then, do you?
>> What do you think about possibility of immutable Query objects? It 
>> might be too complex to implement, though...
>> Vadim
>>> jakob


To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message