Update of /cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv20886
Modified Files:
HibernateTagsHandler.java
Log Message:
fixed a problem introduced by @hibernate.column feature for v1.1 mappings
Index: HibernateTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** HibernateTagsHandler.java 13 Mar 2003 03:52:33 -0000 1.11
--- HibernateTagsHandler.java 13 Mar 2003 22:12:07 -0000 1.12
***************
*** 251,290 ****
public void forAllClasses(String template, Properties attributes) throws
XDocletException
{
Log log = LogUtil.getLog(HibernateTagsHandler.class, "forAllClasses");
- String abstractStr = attributes.getProperty("abstract");
- boolean acceptAbstractClasses =
TypeConversionUtil.stringToBoolean(abstractStr, true);
- String typeName = attributes.getProperty("type");
-
- if (log.isDebugEnabled()) {
- log.debug("acceptAbstractClasses=" + acceptAbstractClasses);
- log.debug("typeName=" + typeName);
- }
! Collection classes = ClassTagsHandler.getAllClasses();
! for (ClassIterator i = XCollections.classIterator(classes); i.hasNext(); ) {
! XClass clazz = i.next();
! log.debug("clazz=" + clazz);
! if (DocletSupport.isDocletGenerated(clazz) || (clazz.isAbstract() &&
acceptAbstractClasses == false)) {
! log.debug("isDocletGenerated or isAbstract");
! }
! else if (clazz.getSuperclass().getQualifiedName().equals(typeName)) {
! log.debug("isOfType true, generate().");
! XClass current = getCurrentClass();
! pushCurrentClass(clazz);
! generate(template);
! popCurrentClass();
!
! if (getCurrentClass() != current)
! setCurrentClass(current);
! //TODO: why do we need this?!
! }
! else {
! log.debug("isOfType false.");
}
}
}
--- 251,298 ----
public void forAllClasses(String template, Properties attributes) throws
XDocletException
{
+
Log log = LogUtil.getLog(HibernateTagsHandler.class, "forAllClasses");
! try {
! String abstractStr = attributes.getProperty("abstract");
! boolean acceptAbstractClasses =
TypeConversionUtil.stringToBoolean(abstractStr, true);
! String typeName = attributes.getProperty("type");
!
! if (log.isDebugEnabled()) {
! log.debug("acceptAbstractClasses=" + acceptAbstractClasses);
! log.debug("typeName=" + typeName);
! }
! Collection classes = ClassTagsHandler.getAllClasses();
! for (ClassIterator i = XCollections.classIterator(classes); i.hasNext();
) {
! XClass clazz = i.next();
! log.debug("clazz=" + clazz);
! if (DocletSupport.isDocletGenerated(clazz) || (clazz.isAbstract() &&
acceptAbstractClasses == false)) {
! log.debug("isDocletGenerated or isAbstract");
! }
! else if (clazz.getSuperclass().getQualifiedName().equals(typeName)) {
! log.debug("isOfType true, generate().");
!
! XClass current = getCurrentClass();
!
! pushCurrentClass(clazz);
! generate(template);
! popCurrentClass();
!
! if (getCurrentClass() != current)
! setCurrentClass(current);
! //TODO: why do we need this?!
! }
! else {
! log.debug("isOfType false.");
! }
}
+ }
+ catch (Exception e) {
+ log.error("exception occurred", e);
}
}
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel