ammulder    2005/07/07 17:37:08

  Modified:    
modules/openejb-builder/src/test/org/openejb/deployment/entity/cmp/ejbql
                        EJBQLTest.java
  Log:

  Add option to configure PK generation via direct schema elements instead
    of only using references to GBeans.
  The old style configuration is still supported, though the syntax is
    different (if you want to use a GBean reference, put it in a
    key-generator/custom-generator element)
  There's also a placeholder commented out of the XML Schema for key
    generation using IDs inserted directly into the target table by the
    database (using AUTO_INCREMENT columns or triggers) though that
    requires additional features from TranQL before it works.
  
  Revision  Changes    Path
  1.13      +4 -3      
openejb/modules/openejb-builder/src/test/org/openejb/deployment/entity/cmp/ejbql/EJBQLTest.java
  
  Index: EJBQLTest.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/openejb-builder/src/test/org/openejb/deployment/entity/cmp/ejbql/EJBQLTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- EJBQLTest.java    25 Jun 2005 18:48:20 -0000      1.12
  +++ EJBQLTest.java    7 Jul 2005 21:37:08 -0000       1.13
  @@ -53,7 +53,6 @@
   import java.sql.Connection;
   import java.sql.SQLException;
   import java.sql.Statement;
  -import java.util.Collections;
   import java.util.HashMap;
   import java.util.HashSet;
   import java.util.Set;
  @@ -84,6 +83,7 @@
   import org.openejb.deployment.KernelHelper;
   import org.openejb.deployment.MockConnectionProxyFactory;
   import org.openejb.deployment.OpenEJBModuleBuilder;
  +import org.openejb.deployment.pkgen.TranQLPKGenBuilder;
   import org.openejb.dispatch.InterfaceMethodSignature;
   import org.openejb.transaction.TransactionPolicySource;
   import org.openejb.transaction.TransactionPolicyType;
  @@ -188,6 +188,7 @@
   
           OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(null, 
null, repository);
           CMPEntityBuilderTestUtil builder = new 
CMPEntityBuilderTestUtil(moduleBuilder);
  +        TranQLPKGenBuilder pkGen = new TranQLPKGenBuilder();
           File tempDir = DeploymentUtil.createTempDir();
   
           try {
  @@ -204,7 +205,7 @@
                       null, null);
   
               ClassLoader cl = Thread.currentThread().getContextClassLoader();
  -            builder.buildCMPSchema(earContext, j2eeContext, ejbJarType, 
openejbJarType, cl, ejbSchema, sqlSchema, cacheSchema);
  +            builder.buildCMPSchema(earContext, j2eeContext, ejbJarType, 
openejbJarType, cl, ejbSchema, sqlSchema, cacheSchema, pkGen, null);
               GBeanData containerIndex = new 
GBeanData(ContainerIndex.GBEAN_INFO);
               Set patterns = new HashSet();
               patterns.add(C_NAME_A);
  
  
  

Reply via email to