hi vadim,

Vadim Gritsenko schrieb:
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?

yes, it will onlycontain getSearchClass() and the paging information.



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 ...".

imo there's already a QueryByIdentity that does something similar.

jakob

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.


Ok

Vadim


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


<snip/>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to