Sure,
Basically the CBQueryBuilder is the high level SQL orientied builder, and EJBQL is the high level Query language. Most application queries can be issued with EJBQL which is built into the facade. For example:
Vector paramVector = new Vector();
paramVector.add(new Integer(1));
Vector v = cbf.executeQLQuery("select object(c) from com.mypkg.Customer c where c.id = ?1", paramVector);
The EJBQL syntax supports object model queries, and in cb4 you can find complex samples in the demos\pguide\ejbqlconsole folder EJBQL_examples.txt
If there's some query option that you can't implement with EJBQL, then the CBQueryBuilder/CBQuery interfaces can also be used. What you can do is implement a subclass of the CBFacade and produce customer queryies that share the same dataSource/Navigation system as the rest of the application model.
Check the EJBQL syntax first, and if there's something that requires a Query interface in the facade, let us know and we can assist you by sending you a prototype of how you can accomplish this.
THOUGHT Support
|