Update of /cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv3442/src/xdoclet/modules/hibernate

Modified Files:
        HibernateTagsHandler.java 
Log Message:
applied patch by Tobin Paterson to fix XDT-343

Index: HibernateTagsHandler.java
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** HibernateTagsHandler.java   5 Feb 2003 23:49:35 -0000       1.6
--- HibernateTagsHandler.java   6 Mar 2003 13:06:43 -0000       1.7
***************
*** 260,263 ****
--- 260,279 ----
          }
  
+         // Determine whether or not the ID is a user-defined type.
+         // If it is then it is not a composite id.
+         boolean isUserType = false;
+ 
+         String typeStr = method.getDoc().getTagAttributeValue("hibernate.id", 
"type");
+ 
+         if (typeStr != null) {
+             // The type attribute was supplied, so check
+             // whether it implements cirrus.hibernate.UserType
+             XClass typeClass = xjavadoc.XJavaDoc.getInstance().getXClass(typeStr);
+ 
+             if (typeClass != null) {
+                 isUserType = typeClass.isA("cirrus.hibernate.UserType") || 
typeClass.isA("net.sf.hibernate.UserType");
+             }
+         }
+ 
          // decide whether we have composite or primitive ID
          String type = method.getReturnType().getQualifiedName();
***************
*** 269,273 ****
              "java.lang.Long".equals(type) ||
              "java.lang.Short".equals(type) ||
!             "java.lang.String".equals(type);
  
          if (isPrimitive && !composite) {
--- 285,290 ----
              "java.lang.Long".equals(type) ||
              "java.lang.Short".equals(type) ||
!             "java.lang.String".equals(type) ||
!             isUserType;
  
          if (isPrimitive && !composite) {



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to