User: rinkrank
  Date: 02/03/23 07:03:35

  Modified:    core/src/xdoclet/ejb/tags/vendor Tag: XJAVADOC_REFACTORING
                        WeblogicRelationTagsHandler.java
  Log:
  Fixed a bug with unidirectional n->1relationships
  Fixed WLS persistence bug for BMP
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.2   +26 -3     
xdoclet/core/src/xdoclet/ejb/tags/vendor/WeblogicRelationTagsHandler.java
  
  Index: WeblogicRelationTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/core/src/xdoclet/ejb/tags/vendor/WeblogicRelationTagsHandler.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -w -r1.7.2.1 -r1.7.2.2
  --- WeblogicRelationTagsHandler.java  16 Mar 2002 18:22:14 -0000      1.7.2.1
  +++ WeblogicRelationTagsHandler.java  23 Mar 2002 15:03:35 -0000      1.7.2.2
  @@ -12,7 +12,7 @@
   /**
    * @author    <a href="mailto:[EMAIL PROTECTED]";>Aslak Helles�y</a>
    * @created   Sept 11, 2001
  - * @version   $Revision: 1.7.2.1 $
  + * @version   $Revision: 1.7.2.2 $
    */
   public class WeblogicRelationTagsHandler extends RelationTagsHandler
   {
  @@ -21,7 +21,24 @@
   
        public void forAllLeftColumnMaps( String template ) throws XDocletException
        {
  -             XTag[] columnMapTags = currentRelation.getLeftMethod().doc().tags( 
"weblogic:column-map" );
  +             XTag[] columnMapTags = null;
  +
  +             if( currentRelation.getLeftMethod() != null )
  +             {
  +                     // bidirectional
  +                     columnMapTags = currentRelation.getLeftMethod().doc().tags( 
"weblogic:column-map" );
  +                     if( columnMapTags.length == 0 ) {
  +                             //throw new XDocletException( 
currentRelation.getRightMethod().name() + " should have at least one 
@weblogic:column-map tag (B)" );
  +                     }
  +             }
  +             else
  +             {
  +                     // unidirectional
  +                     columnMapTags = currentRelation.getRightMethod().doc().tags( 
"weblogic:target-column-map" );
  +                     if( columnMapTags.length == 0 ) {
  +                             //throw new XDocletException( 
currentRelation.getLeftMethod().name() + " should have at least one 
@weblogic:target-column-map tag (C)" );
  +                     }
  +             }
   
                for( int i = 0; i < columnMapTags.length; i++ )
                {
  @@ -39,11 +56,17 @@
                {
                        // bidirectional
                        columnMapTags = currentRelation.getRightMethod().doc().tags( 
"weblogic:column-map" );
  +                     if( columnMapTags.length == 0 ) {
  +                             //throw new XDocletException( 
currentRelation.getRightMethod().name() + " should have at least one 
@weblogic:column-map tag (B)" );
  +                     }
                }
                else
                {
                        // unidirectional
  -                     columnMapTags = currentRelation.getRightMethod().doc().tags( 
"weblogic:target-column-map" );
  +                     columnMapTags = currentRelation.getLeftMethod().doc().tags( 
"weblogic:target-column-map" );
  +                     if( columnMapTags.length == 0 ) {
  +                             //throw new XDocletException( 
currentRelation.getLeftMethod().name() + " should have at least one 
@weblogic:target-column-map tag (C)" );
  +                     }
                }
   
                for( int i = 0; i < columnMapTags.length; i++ )
  
  
  

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to