Update of
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4570/src/main/java/org/xdoclet/plugin/hibernate
Modified Files:
HibernateMappingPlugin.java HibernateMappingPlugin.jelly
Removed Files:
Import.jelly Typedef.jelly
Log Message:
(XDP-59) Added support of multyply 'typedef-param' attributes for class
--- Import.jelly DELETED ---
Index: HibernateMappingPlugin.jelly
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/HibernateMappingPlugin.jelly,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** HibernateMappingPlugin.jelly 26 Apr 2005 07:00:08 -0000 1.11
--- HibernateMappingPlugin.jelly 26 May 2005 06:45:46 -0000 1.12
***************
*** 20,29 ****
<!-- process typedef -->
<j:forEach var="typedefTag"
items="${metadata.getTagsByName('hibernate.typedef')}">
! <j:import uri="org/xdoclet/plugin/hibernate/Typedef.jelly"
inherit="true"/>
</j:forEach>
<!-- process import -->
<j:forEach var="importTag"
items="${metadata.getTagsByName('hibernate.import')}">
! <j:import uri="org/xdoclet/plugin/hibernate/Import.jelly"
inherit="true"/>
</j:forEach>
--- 20,33 ----
<!-- process typedef -->
<j:forEach var="typedefTag"
items="${metadata.getTagsByName('hibernate.typedef')}">
! <typedef name="${typedefTag.name_}" class="${typedefTag.class_}">
! <j:forEach var="paramTag"
items="${plugin.getTypedefParams(class, typedefTag.name_)}">
! <j:import uri="org/xdoclet/plugin/hibernate/Param.jelly"
inherit="true"/>
! </j:forEach>
! </typedef>
</j:forEach>
<!-- process import -->
<j:forEach var="importTag"
items="${metadata.getTagsByName('hibernate.import')}">
! <import rename="${importTag.rename}" class="${importTag.class_}"/>
</j:forEach>
Index: HibernateMappingPlugin.java
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/HibernateMappingPlugin.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** HibernateMappingPlugin.java 19 May 2005 10:13:52 -0000 1.39
--- HibernateMappingPlugin.java 26 May 2005 06:45:46 -0000 1.40
***************
*** 19,22 ****
--- 19,23 ----
import org.generama.WriterMapper;
+ import org.xdoclet.plugin.hibernate.qtags.HibernateTypedefParamTag;
import org.xdoclet.plugin.hibernate.qtags.TagLibrary;
***************
*** 101,108 ****
}
- public void setForce(boolean force) {
- this.force = force;
- }
-
/**
* provide list of properties candidating for class id
--- 102,105 ----
***************
*** 129,132 ****
--- 126,130 ----
/**
* Returns first argument wich is not empty or last argument if all are
empty
+ *
* @param value1 first argument
* @param value2 second argument
***************
*** 137,140 ****
--- 135,142 ----
}
+ public void setForce(boolean force) {
+ this.force = force;
+ }
+
/**
* Return the instance of JavaClass by it's name
***************
*** 230,233 ****
--- 232,252 ----
}
+ public Collection getTypedefParams(JavaClass clazz, final String
typedefName) {
+ if (typedefName == null) {
+ return null;
+ }
+
+ Collection typedefTags = new ArrayList();
+
typedefTags.addAll(Arrays.asList(clazz.getTagsByName("hibernate.typedef-param")));
+ CollectionUtils.filter(typedefTags,
+ new Predicate() {
+ public boolean evaluate(Object object) {
+ HibernateTypedefParamTag tag = (HibernateTypedefParamTag)
object;
+ return typedefName.equals(tag.getTypedefName());
+ }
+ });
+ return typedefTags;
+ }
+
/**
* provide list of properties candidating for version or timestamp
--- Typedef.jelly DELETED ---
-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits