I believe that's too far down the line.
What options do you have if you were implementing the above rules with EJB ?
I suppose you'd derive that information from two simpler Entity beans.
There must be a finder (?) method that is the equivalent of UNION.
Creating and developing related CMP entity beans. Related entity beans are sets of EJB components that represent complex data from multiple database tables that have primary/foreign key relationships. There is a new wizard that enables you to select a database connection or schema and generate related CMP entity beans that model the relationships among the tables of the database. The Related CMP Entity Bean wizard generates all the beans and relationships and groups them in an EJB module. The IDE provides editors that enable you to edit and add relationships. The IDE also displays custom, modal property sheets on which you can edit the properties of the beans and the EJB module, and it generates a deployment descriptor from your property settings.
New J2EE CMP Entity EJB Wizard Options. The J2EE CMP Entity EJB wizard has been updated to include two new options. On the first wizard panel, the section Source for Entities and Fields now contains the choices: CMP 2.x Bean Class and CMP 1.x Bean Class. This option allows a user to select the bean class for an existing EJB and the wizard will obtain the CMP field information from the class. Using these new options requires that the user understands several potential issues: 1.) This feature was not created as a robust feature with error checks for incorrect class files, 2) when generating a 2.x CMP EJB with additional finder and ejbSelect methods, the EJBQL will not be generated: you must manually add back all EJBQL statements since these statements are stored with the bean's deployment descriptor rather than in the class files, and 3) Although the Finish button is enabled, the user must continue through all the wizard screens and add the class files for all of the bean's classes (home, remote, localHome, local). If Finish is pressed before this last step is taken, the results will be inconsistent. An exception may appear or the EJB's finder and ejbSelect (for a 2.x bean) may not be generated as expected.
Is it best to use EJB-QL with an IDE rather than writing it out free-hand ?
regards
[ September 21, 2003: Message edited by: HS Thomas ]