Update of
/cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14593/modules/hibernate/src/xdoclet/modules/hibernate
Modified Files:
HibernateTagsHandler.java
Log Message:
Minor cleanup; fallout from handling composite ID specified as interface
Index: HibernateTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** HibernateTagsHandler.java 23 Apr 2005 09:47:12 -0000 1.40
--- HibernateTagsHandler.java 4 May 2005 18:56:12 -0000 1.41
***************
*** 675,678 ****
--- 675,679 ----
// If it is then it is not a composite id.
boolean isUserType = false;
+ XClass typeClass = null;
String typeStr = method.getDoc().getTagAttributeValue("hibernate.id",
"type");
***************
*** 681,685 ****
// The type attribute was supplied, so check
// whether it implements cirrus.hibernate.UserType
! XClass typeClass = getXJavaDoc().getXClass(typeStr);
if (typeClass != null) {
--- 682,686 ----
// The type attribute was supplied, so check
// whether it implements cirrus.hibernate.UserType
! typeClass = getXJavaDoc().getXClass(typeStr);
if (typeClass != null) {
***************
*** 690,694 ****
}
else {
! typeStr = method.getReturnType().getType().getQualifiedName();
}
--- 691,696 ----
}
else {
! typeClass = method.getReturnType().getType();
! typeStr = typeClass.getQualifiedName();
}
***************
*** 717,732 ****
// bomb if not.
! XClass returnType = null;
!
! if (typeStr == null) {
! returnType = method.getReturnType().getType();
! }
! else {
! returnType = getXJavaDoc().getXClass(typeStr);
! }
!
! if (returnType.isA("java.io.Serializable")
! && !returnType.isAbstract()
! && !"java.lang.Object".equals(returnType.getMethod(
"equals(java.lang.Object)", true)
.getContainingClass().getQualifiedName())) {
--- 719,725 ----
// bomb if not.
! if (typeClass.isA("java.io.Serializable")
! && !typeClass.isAbstract()
! && !"java.lang.Object".equals(typeClass.getMethod(
"equals(java.lang.Object)", true)
.getContainingClass().getQualifiedName())) {
***************
*** 740,744 ****
Translator.getString(XDocletModulesHibernateMessages.class,
XDocletModulesHibernateMessages.WRONG_COMPOSITE_ID,
! new String[]{returnType.getQualifiedName()}));
}
}
--- 733,737 ----
Translator.getString(XDocletModulesHibernateMessages.class,
XDocletModulesHibernateMessages.WRONG_COMPOSITE_ID,
! new String[]{typeStr}));
}
}
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel