You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by to...@apache.org on 2005/05/08 16:22:47 UTC

cvs commit: db-ojb/src/xdoclet/java/src/xdoclet/modules/ojb/resources intermediate-representation.xdt

tomdz       2005/05/08 07:22:47

  Modified:    .        .classpath
               src/xdoclet/test/xdoclet/modules/ojb/tests RunAllTests.java
               src/xdoclet/java/src/xdoclet/modules/ojb/resources
                        intermediate-representation.xdt
  Added:       src/xdoclet/test/xdoclet/modules/ojb/tests
                        SelectByFKProcedureTagTests.java
                        SelectByPKProcedureTagTests.java
               lib      xdoclet-1.2.3.jar xdoclet-ojb-module-1.2.3.jar
  Removed:     lib      xdoclet-1.2.2.jar xdoclet-ojb-module-1.2.2.jar
  Log:
  Added XDoclet tags for the two new procedure types
  Updated to XDoclet 1.2.3
  
  Revision  Changes    Path
  1.49      +2 -3      db-ojb/.classpath
  
  Index: .classpath
  ===================================================================
  RCS file: /home/cvs/db-ojb/.classpath,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- .classpath	2 Apr 2005 09:44:40 -0000	1.48
  +++ .classpath	8 May 2005 14:22:46 -0000	1.49
  @@ -18,7 +18,6 @@
   	<classpathentry kind="lib" path="lib/jdo.jar"/>
   	<classpathentry kind="lib" path="lib/junit.jar"/>
   	<classpathentry kind="lib" path="lib/xalan.jar"/>
  -	<classpathentry kind="lib" path="lib/xercesImpl.jar"/>
   	<classpathentry kind="lib" path="lib/xml-apis.jar"/>
   	<classpathentry kind="lib" path="lib/jcs.jar"/>
   	<classpathentry kind="lib" path="lib/jdori.jar"/>
  @@ -36,8 +35,8 @@
   	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
   	<classpathentry kind="lib" path="lib/geronimo-spec-j2ee-1.4-rc2.jar"/>
   	<classpathentry kind="lib" path="lib/p6spy-1.3-patched.jar"/>
  -	<classpathentry kind="lib" path="lib/xdoclet-1.2.2.jar"/>
  -	<classpathentry kind="lib" path="lib/xdoclet-ojb-module-1.2.2.jar"/>
  +	<classpathentry kind="lib" path="lib/xdoclet-1.2.3.jar"/>
  +	<classpathentry kind="lib" path="lib/xdoclet-ojb-module-1.2.3.jar"/>
   	<classpathentry kind="lib" path="lib/xjavadoc-1.1.jar"/>
   	<classpathentry kind="lib" path="lib/cglib-2.1.jar"/>
   	<classpathentry kind="output" path="target/classes/main"/>
  
  
  
  1.15      +4 -2      db-ojb/src/xdoclet/test/xdoclet/modules/ojb/tests/RunAllTests.java
  
  Index: RunAllTests.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/xdoclet/test/xdoclet/modules/ojb/tests/RunAllTests.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- RunAllTests.java	22 Mar 2005 21:30:39 -0000	1.14
  +++ RunAllTests.java	8 May 2005 14:22:46 -0000	1.15
  @@ -101,8 +101,8 @@
           suite.addTest(new TestSuite(CollectionTagAttributesAttributeTests.class));
           suite.addTest(new TestSuite(CollectionTagAutoDeleteAttributeTests.class));
           suite.addTest(new TestSuite(CollectionTagAutoRetrieveAttributeTests.class));
  -        suite.addTest(new TestSuite(CollectionTagAutoUpdateAttributeTests.class));*/
  -        suite.addTest(new TestSuite(CollectionTagCollectionClassAttributeTests.class));/*
  +        suite.addTest(new TestSuite(CollectionTagAutoUpdateAttributeTests.class));
  +        suite.addTest(new TestSuite(CollectionTagCollectionClassAttributeTests.class));
           suite.addTest(new TestSuite(CollectionTagDocumentationAttributeTests.class));
           suite.addTest(new TestSuite(CollectionTagElementClassRefAttributeTests.class));
           suite.addTest(new TestSuite(CollectionTagForeignkeyAttributeTests.class));
  @@ -152,6 +152,8 @@
           suite.addTest(new TestSuite(InsertProcedureTagTests.class));
           suite.addTest(new TestSuite(UpdateProcedureTagTests.class));
           suite.addTest(new TestSuite(ProcedureArgumentTagTests.class));
  +        suite.addTest(new TestSuite(SelectByPKProcedureTagTests.class));
  +        suite.addTest(new TestSuite(SelectByFKProcedureTagTests.class));
   */
           
           return suite;
  
  
  
  1.1                  db-ojb/src/xdoclet/test/xdoclet/modules/ojb/tests/SelectByFKProcedureTagTests.java
  
  Index: SelectByFKProcedureTagTests.java
  ===================================================================
  package xdoclet.modules.ojb.tests;
  
  /* Copyright 2002-2004 The Apache Software Foundation
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  /**
   * Tests for the ojb.select-by-fk-procedure tag.
   *
   * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
   */
  public class SelectByFKProcedureTagTests extends OjbTestBase
  {
      public SelectByFKProcedureTagTests(String name)
      {
          super(name);
      }
  
      // Test: no arguments
      public void testNoAttributes()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-fk-procedure name=\"select-proc\"\n"+
              "  */\n"+
              "public class A {}\n");
  
          assertEqualsOjbDescriptorFile(
              "<class-descriptor\n"+
              "    class=\"test.A\"\n"+
              "    table=\"A\"\n"+
              ">\n"+
              "    <select-by-fk-procedure\n"+
              "        name=\"select-proc\"" +
              "    >\n"+
              "    </select-by-fk-procedure>\n"+
              "</class-descriptor>",
              runOjbXDoclet(OJB_DEST_FILE));
          assertEqualsTorqueSchemaFile(
              "<database name=\"ojbtest\">\n"+
              "    <table name=\"A\">\n"+
              "    </table>\n"+
              "</database>",
              runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: without a name
      public void testNoName()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-fk-procedure\n"+
              "  */\n"+
              "public class A {}\n");
  
          assertNull(runOjbXDoclet(OJB_DEST_FILE));
          assertNull(runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with valid return-field-ref
      public void testValidFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-fk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"attr\"\n"+
              "  */\n"+
              "public class A {\n"+
              "  /** @ojb.field */\n"+
              "  private int attr;\n"+
              "}\n");
  
          assertEqualsOjbDescriptorFile(
              "<class-descriptor\n"+
              "    class=\"test.A\"\n"+
              "    table=\"A\"\n"+
              ">\n"+
              "    <field-descriptor\n"+
              "        name=\"attr\"\n"+
              "        column=\"attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "    <select-by-fk-procedure\n"+
              "        name=\"select-proc\"" +
              "        return-field-ref=\"attr\"" +
              "    >\n"+
              "    </select-by-fk-procedure>\n"+
              "</class-descriptor>",
              runOjbXDoclet(OJB_DEST_FILE));
          assertEqualsTorqueSchemaFile(
              "<database name=\"ojbtest\">\n"+
              "    <table name=\"A\">\n"+
              "        <column name=\"attr\"\n"+
              "                javaName=\"attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "</database>",
              runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with valid return-field-ref pointing to inherited field
      public void testValidInheritedFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class */\n"+
              "public class A {\n"+
              "  /** @ojb.field */\n"+
              "  private int attr;\n"+
              "}\n");
          addClass(
              "test.B",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-fk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"attr\"\n"+
              "  */\n"+
              "public class B extends A {}\n");
  
          assertEqualsOjbDescriptorFile(
              "<class-descriptor\n"+
              "    class=\"test.A\"\n"+
              "    table=\"A\"\n"+
              ">\n"+
              "    <extent-class class-ref=\"test.B\"/>\n"+
              "    <field-descriptor\n"+
              "        name=\"attr\"\n"+
              "        column=\"attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "</class-descriptor>\n"+
              "<class-descriptor\n"+
              "    class=\"test.B\"\n"+
              "    table=\"B\"\n"+
              ">\n"+
              "    <field-descriptor\n"+
              "        name=\"attr\"\n"+
              "        column=\"attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "    <select-by-fk-procedure\n"+
              "        name=\"select-proc\"\n" +
              "        return-field-ref=\"attr\"\n" +
              "    >\n"+
              "    </select-by-fk-procedure>\n"+
              "</class-descriptor>",
              runOjbXDoclet(OJB_DEST_FILE));
          assertEqualsTorqueSchemaFile(
              "<database name=\"ojbtest\">\n"+
              "    <table name=\"A\">\n"+
              "        <column name=\"attr\"\n"+
              "                javaName=\"attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "    <table name=\"B\">\n"+
              "        <column name=\"attr\"\n"+
              "                javaName=\"attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "</database>",
              runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with valid return-field-ref pointing to nested field
      public void testValidNestedFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class */\n"+
              "public class A {\n"+
              "  /** @ojb.field */\n"+
              "  private int attr;\n"+
              "}\n");
          addClass(
              "test.B",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-fk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"attr::attr\"\n"+
              "  */\n"+
              "public class B {\n"+
              "  /** @ojb.nested */\n"+
              "  private A attr;\n"+
              "}\n");
          
          assertEqualsOjbDescriptorFile(
              "<class-descriptor\n"+
              "    class=\"test.A\"\n"+
              "    table=\"A\"\n"+
              ">\n"+
              "    <field-descriptor\n"+
              "        name=\"attr\"\n"+
              "        column=\"attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "</class-descriptor>\n"+
              "<class-descriptor\n"+
              "    class=\"test.B\"\n"+
              "    table=\"B\"\n"+
              ">\n"+
              "    <field-descriptor\n"+
              "        name=\"attr::attr\"\n"+
              "        column=\"attr_attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "    <select-by-fk-procedure\n"+
              "        name=\"select-proc\"\n" +
              "        return-field-ref=\"attr::attr\"\n" +
              "    >\n"+
              "    </select-by-fk-procedure>\n"+
              "</class-descriptor>",
              runOjbXDoclet(OJB_DEST_FILE));
          assertEqualsTorqueSchemaFile(
              "<database name=\"ojbtest\">\n"+
              "    <table name=\"A\">\n"+
              "        <column name=\"attr\"\n"+
              "                javaName=\"attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "    <table name=\"B\">\n"+
              "        <column name=\"attr_attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "</database>",
              runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with invalid return-field-ref (no such field)
      public void testUnknownFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-fk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"id\"\n"+
              "  */\n"+
              "public class A {\n"+
              "  /** @ojb.field */\n"+
              "  private int attr;\n"+
              "}\n");
  
          assertNull(runOjbXDoclet(OJB_DEST_FILE));
          assertNull(runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with invalid return-field-ref (field not persistent)
      public void testNonpersistentFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-fk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"attr\"\n"+
              "  */\n"+
              "public class A {\n"+
              "  private int attr;\n"+
              "}\n");
  
          assertNull(runOjbXDoclet(OJB_DEST_FILE));
          assertNull(runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  }
  
  
  
  1.1                  db-ojb/src/xdoclet/test/xdoclet/modules/ojb/tests/SelectByPKProcedureTagTests.java
  
  Index: SelectByPKProcedureTagTests.java
  ===================================================================
  package xdoclet.modules.ojb.tests;
  
  /* Copyright 2002-2004 The Apache Software Foundation
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  /**
   * Tests for the ojb.select-by-pk-procedure tag.
   *
   * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
   */
  public class SelectByPKProcedureTagTests extends OjbTestBase
  {
      public SelectByPKProcedureTagTests(String name)
      {
          super(name);
      }
  
      // Test: no arguments
      public void testNoAttributes()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-pk-procedure name=\"select-proc\"\n"+
              "  */\n"+
              "public class A {}\n");
  
          assertEqualsOjbDescriptorFile(
              "<class-descriptor\n"+
              "    class=\"test.A\"\n"+
              "    table=\"A\"\n"+
              ">\n"+
              "    <select-by-pk-procedure\n"+
              "        name=\"select-proc\"" +
              "    >\n"+
              "    </select-by-pk-procedure>\n"+
              "</class-descriptor>",
              runOjbXDoclet(OJB_DEST_FILE));
          assertEqualsTorqueSchemaFile(
              "<database name=\"ojbtest\">\n"+
              "    <table name=\"A\">\n"+
              "    </table>\n"+
              "</database>",
              runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: without a name
      public void testNoName()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-pk-procedure\n"+
              "  */\n"+
              "public class A {}\n");
  
          assertNull(runOjbXDoclet(OJB_DEST_FILE));
          assertNull(runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with valid return-field-ref
      public void testValidFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-pk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"attr\"\n"+
              "  */\n"+
              "public class A {\n"+
              "  /** @ojb.field */\n"+
              "  private int attr;\n"+
              "}\n");
  
          assertEqualsOjbDescriptorFile(
              "<class-descriptor\n"+
              "    class=\"test.A\"\n"+
              "    table=\"A\"\n"+
              ">\n"+
              "    <field-descriptor\n"+
              "        name=\"attr\"\n"+
              "        column=\"attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "    <select-by-pk-procedure\n"+
              "        name=\"select-proc\"" +
              "        return-field-ref=\"attr\"" +
              "    >\n"+
              "    </select-by-pk-procedure>\n"+
              "</class-descriptor>",
              runOjbXDoclet(OJB_DEST_FILE));
          assertEqualsTorqueSchemaFile(
              "<database name=\"ojbtest\">\n"+
              "    <table name=\"A\">\n"+
              "        <column name=\"attr\"\n"+
              "                javaName=\"attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "</database>",
              runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with valid return-field-ref pointing to inherited field
      public void testValidInheritedFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class */\n"+
              "public class A {\n"+
              "  /** @ojb.field */\n"+
              "  private int attr;\n"+
              "}\n");
          addClass(
              "test.B",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-pk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"attr\"\n"+
              "  */\n"+
              "public class B extends A {}\n");
  
          assertEqualsOjbDescriptorFile(
              "<class-descriptor\n"+
              "    class=\"test.A\"\n"+
              "    table=\"A\"\n"+
              ">\n"+
              "    <extent-class class-ref=\"test.B\"/>\n"+
              "    <field-descriptor\n"+
              "        name=\"attr\"\n"+
              "        column=\"attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "</class-descriptor>\n"+
              "<class-descriptor\n"+
              "    class=\"test.B\"\n"+
              "    table=\"B\"\n"+
              ">\n"+
              "    <field-descriptor\n"+
              "        name=\"attr\"\n"+
              "        column=\"attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "    <select-by-pk-procedure\n"+
              "        name=\"select-proc\"\n" +
              "        return-field-ref=\"attr\"\n" +
              "    >\n"+
              "    </select-by-pk-procedure>\n"+
              "</class-descriptor>",
              runOjbXDoclet(OJB_DEST_FILE));
          assertEqualsTorqueSchemaFile(
              "<database name=\"ojbtest\">\n"+
              "    <table name=\"A\">\n"+
              "        <column name=\"attr\"\n"+
              "                javaName=\"attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "    <table name=\"B\">\n"+
              "        <column name=\"attr\"\n"+
              "                javaName=\"attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "</database>",
              runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with valid return-field-ref pointing to nested field
      public void testValidNestedFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class */\n"+
              "public class A {\n"+
              "  /** @ojb.field */\n"+
              "  private int attr;\n"+
              "}\n");
          addClass(
              "test.B",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-pk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"attr::attr\"\n"+
              "  */\n"+
              "public class B {\n"+
              "  /** @ojb.nested */\n"+
              "  private A attr;\n"+
              "}\n");
          
          assertEqualsOjbDescriptorFile(
              "<class-descriptor\n"+
              "    class=\"test.A\"\n"+
              "    table=\"A\"\n"+
              ">\n"+
              "    <field-descriptor\n"+
              "        name=\"attr\"\n"+
              "        column=\"attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "</class-descriptor>\n"+
              "<class-descriptor\n"+
              "    class=\"test.B\"\n"+
              "    table=\"B\"\n"+
              ">\n"+
              "    <field-descriptor\n"+
              "        name=\"attr::attr\"\n"+
              "        column=\"attr_attr\"\n"+
              "        jdbc-type=\"INTEGER\"\n"+
              "    >\n"+
              "    </field-descriptor>\n"+
              "    <select-by-pk-procedure\n"+
              "        name=\"select-proc\"\n" +
              "        return-field-ref=\"attr::attr\"\n" +
              "    >\n"+
              "    </select-by-pk-procedure>\n"+
              "</class-descriptor>",
              runOjbXDoclet(OJB_DEST_FILE));
          assertEqualsTorqueSchemaFile(
              "<database name=\"ojbtest\">\n"+
              "    <table name=\"A\">\n"+
              "        <column name=\"attr\"\n"+
              "                javaName=\"attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "    <table name=\"B\">\n"+
              "        <column name=\"attr_attr\"\n"+
              "                type=\"INTEGER\"\n"+
              "        />\n"+
              "    </table>\n"+
              "</database>",
              runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with invalid return-field-ref (no such field)
      public void testUnknownFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-pk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"id\"\n"+
              "  */\n"+
              "public class A {\n"+
              "  /** @ojb.field */\n"+
              "  private int attr;\n"+
              "}\n");
  
          assertNull(runOjbXDoclet(OJB_DEST_FILE));
          assertNull(runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  
      // Test: with invalid return-field-ref (field not persistent)
      public void testNonpersistentFieldRef()
      {
          addClass(
              "test.A",
              "package test;\n"+
              "/** @ojb.class\n"+
              "  * @ojb.select-by-pk-procedure name=\"select-proc\"\n" +
              "  *                             return-field-ref=\"attr\"\n"+
              "  */\n"+
              "public class A {\n"+
              "  private int attr;\n"+
              "}\n");
  
          assertNull(runOjbXDoclet(OJB_DEST_FILE));
          assertNull(runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
      }
  }
  
  
  
  1.1                  db-ojb/lib/xdoclet-1.2.3.jar
  
  	<<Binary file>>
  
  
  1.1                  db-ojb/lib/xdoclet-ojb-module-1.2.3.jar
  
  	<<Binary file>>
  
  
  1.10      +18 -0     db-ojb/src/xdoclet/java/src/xdoclet/modules/ojb/resources/intermediate-representation.xdt
  
  Index: intermediate-representation.xdt
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/xdoclet/java/src/xdoclet/modules/ojb/resources/intermediate-representation.xdt,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- intermediate-representation.xdt	22 Mar 2005 21:30:41 -0000	1.9
  +++ intermediate-representation.xdt	8 May 2005 14:22:47 -0000	1.10
  @@ -143,6 +143,24 @@
                       type="update"
                   />
               </XDtClass:forAllClassTags>
  +            <XDtClass:forAllClassTags tagName="ojb.select-by-pk-procedure" superclasses="false">
  +                <XDtOjb:processProcedure
  +                    attributes="<XDtClass:classTagValue tagName='ojb.select-by-pk-procedure' paramName='attributes'/>"
  +                    documentation="<XDtClass:classTagValue tagName='ojb.select-by-pk-procedure' paramName='documentation'/>"
  +                    name="<XDtClass:classTagValue tagName='ojb.select-by-pk-procedure' paramName='name'/>"
  +                    return-field-ref="<XDtClass:classTagValue tagName='ojb.select-by-pk-procedure' paramName='return-field-ref'/>"
  +                    type="select-by-pk"
  +                />
  +            </XDtClass:forAllClassTags>
  +            <XDtClass:forAllClassTags tagName="ojb.select-by-fk-procedure" superclasses="false">
  +                <XDtOjb:processProcedure
  +                    attributes="<XDtClass:classTagValue tagName='ojb.select-by-fk-procedure' paramName='attributes'/>"
  +                    documentation="<XDtClass:classTagValue tagName='ojb.select-by-fk-procedure' paramName='documentation'/>"
  +                    name="<XDtClass:classTagValue tagName='ojb.select-by-fk-procedure' paramName='name'/>"
  +                    return-field-ref="<XDtClass:classTagValue tagName='ojb.select-by-fk-procedure' paramName='return-field-ref'/>"
  +                    type="select-by-fk"
  +                />
  +            </XDtClass:forAllClassTags>
               <XDtClass:forAllClassTags tagName="ojb.constant-argument" tagKey="name" superclasses="false">
                   <XDtOjb:processProcedureArgument
                       attributes="<XDtClass:classTagValue tagName='ojb.constant-argument' paramName='attributes'/>"
  
  
  

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