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-serv30493/src/main/java/org/xdoclet/plugin/hibernate

Modified Files:
        Bag.jelly BaseCollectionTail.jelly Class.jelly Filter.jelly 
        HibernateMappingPlugin.java HibernateMappingPlugin.jelly 
        Idbag.jelly List.jelly Map.jelly Set.jelly 
Log Message:
(XDP-98,99) Filter,filter-def are implemented correctly

Index: Idbag.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/Idbag.jelly,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Idbag.jelly 24 Aug 2005 09:42:35 -0000      1.4
--- Idbag.jelly 2 Sep 2005 09:14:01 -0000       1.5
***************
*** 79,83 ****
              <j:import uri="/SqlOperations.jelly" inherit="true"/>
  
!             <!-- process filter -->
              <j:import uri="/Filter.jelly" inherit="true"/>
          </idbag>
--- 79,83 ----
              <j:import uri="/SqlOperations.jelly" inherit="true"/>
  
!             <j:set var="filterEntity" value="${property.entity}"/>
              <j:import uri="/Filter.jelly" inherit="true"/>
          </idbag>

Index: BaseCollectionTail.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/BaseCollectionTail.jelly,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** BaseCollectionTail.jelly    31 May 2005 11:24:35 -0000      1.3
--- BaseCollectionTail.jelly    2 Sep 2005 09:14:01 -0000       1.4
***************
*** 22,24 ****
--- 22,27 ----
      <j:set var="sqlOperationEntity" value="${property.entity}"/>
      <j:import uri="/SqlOperations.jelly" inherit="true"/>
+ 
+     <j:set var="filterEntity" value="${property.entity}"/>
+     <j:import uri="/Filter.jelly" inherit="true"/>
  </j:jelly>
\ No newline at end of file

Index: List.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/List.jelly,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** List.jelly  24 Aug 2005 09:42:35 -0000      1.11
--- List.jelly  2 Sep 2005 09:14:01 -0000       1.12
***************
*** 44,49 ****
  
              <j:import uri="/BaseCollectionTail.jelly" inherit="true"/>
-             <!-- process filter -->
-             <j:import uri="/Filter.jelly" inherit="true"/>
  
              <!-- process comment -->
--- 44,47 ----

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.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** HibernateMappingPlugin.jelly        2 Jun 2005 14:09:17 -0000       1.14
--- HibernateMappingPlugin.jelly        2 Sep 2005 09:14:01 -0000       1.15
***************
*** 2,20 ****
  <j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml">
      <x:doctype
!         name="hibernate-mapping"
!         publicId="-//Hibernate/Hibernate Mapping DTD ${plugin.DTDVersion}//EN"
!         
systemId="http://hibernate.sourceforge.net/hibernate-mapping-${plugin.DTDVersion}.dtd";
!         trim="true"
!         />
      <j:set var="class" value="${metadata}"/>
      <j:set var="hibernateMapping" 
value="${class.getTagByName('hibernate.mapping')}"/>
      <hibernate-mapping
!         schema="${hibernateMapping.schema}"
!         catalog="${hibernateMapping.catalog}"
!         default-cascade="${hibernateMapping.defaultCascade}"
!         default-access="${hibernateMapping.defaultAccess}"
!         default-lazy="${hibernateMapping.defaultLazy}"
!         auto-import="${hibernateMapping.autoImport}"
!         package="${hibernateMapping.package}">
  
          <!-- process typedef -->
--- 2,20 ----
  <j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml">
      <x:doctype
!             name="hibernate-mapping"
!             publicId="-//Hibernate/Hibernate Mapping DTD 
${plugin.DTDVersion}//EN"
!             
systemId="http://hibernate.sourceforge.net/hibernate-mapping-${plugin.DTDVersion}.dtd";
!             trim="true"
!             />
      <j:set var="class" value="${metadata}"/>
      <j:set var="hibernateMapping" 
value="${class.getTagByName('hibernate.mapping')}"/>
      <hibernate-mapping
!             schema="${hibernateMapping.schema}"
!             catalog="${hibernateMapping.catalog}"
!             default-cascade="${hibernateMapping.defaultCascade}"
!             default-access="${hibernateMapping.defaultAccess}"
!             default-lazy="${hibernateMapping.defaultLazy}"
!             auto-import="${hibernateMapping.autoImport}"
!             package="${hibernateMapping.package}">
  
          <!-- process typedef -->
***************
*** 33,36 ****
--- 33,45 ----
  
          <j:import uri="/Class.jelly" inherit="true"/>
+ 
+         <!-- process filter-def -->
+         <j:forEach var="filterdefTag" 
items="${metadata.getTagsByName('hibernate.filter-def')}">
+             <filter-def name="${filterdefTag.name_}" 
condition="${filterdefTag.condition}">
+                 <j:forEach var="paramTag" 
items="${plugin.getFilterdefParams(class, filterdefTag.name_)}">
+                     <filter-param name="${paramTag.name_}" 
type="${paramTag.type}"/>
+                 </j:forEach>
+             </filter-def>
+         </j:forEach>
      </hibernate-mapping>
  </j:jelly>

Index: Map.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/Map.jelly,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Map.jelly   24 Aug 2005 09:42:35 -0000      1.13
--- Map.jelly   2 Sep 2005 09:14:01 -0000       1.14
***************
*** 43,49 ****
          <j:import uri="/BaseCollectionTail.jelly" inherit="true"/>
  
-         <!-- process filter -->
-         <j:import uri="/Filter.jelly" inherit="true"/>
- 
          <!-- process comment -->
          <j:if test="${mapTag.comment != null}">
--- 43,46 ----

Index: Class.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/Class.jelly,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Class.jelly 24 Aug 2005 09:42:35 -0000      1.22
--- Class.jelly 2 Sep 2005 09:14:01 -0000       1.23
***************
*** 3,12 ****
      <j:set var="classTag" value="${class.getTagByName('hibernate.class')}"/>
  
-     <!-- process filter definition -->
-     <j:set var="filterDefTag" 
value="${class.getTagByName('hibernate.filter-def')}"/>
-     <j:if test="${filterDefTag != null}">
-         <j:import uri="/FilterDef.jelly" inherit="true"/>
-     </j:if>
- 
      <class name="${plugin.getFirstNonEmptyValue(classTag.name_, 
class.fullyQualifiedName)}"
          table="${classTag.table}"
--- 3,6 ----
***************
*** 162,166 ****
          <j:import uri="/SqlDeleteAll.jelly" inherit="true"/>
  
!         <!-- process filter -->
          <j:import uri="/Filter.jelly" inherit="true"/>
      </class>
--- 156,160 ----
          <j:import uri="/SqlDeleteAll.jelly" inherit="true"/>
  
!         <j:set var="filterEntity" value="${class}"/>
          <j:import uri="/Filter.jelly" inherit="true"/>
      </class>

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.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** HibernateMappingPlugin.java 24 Aug 2005 09:42:35 -0000      1.49
--- HibernateMappingPlugin.java 2 Sep 2005 09:14:01 -0000       1.50
***************
*** 21,24 ****
--- 21,25 ----
  import org.generama.defaults.XMLOutputValidator;
  
+ import org.xdoclet.plugin.hibernate.qtags.HibernateFilterParamTag;
  import org.xdoclet.plugin.hibernate.qtags.HibernateTypedefParamTag;
  import org.xdoclet.plugin.hibernate.qtags.TagLibrary;
***************
*** 311,314 ****
--- 312,332 ----
      }
  
+     public Collection getFilterdefParams(JavaClass clazz, final String 
filterdefName) {
+         if (filterdefName == null) {
+             return null;
+         }
+ 
+         Collection filterdefTags = new ArrayList();
+         
filterdefTags.addAll(Arrays.asList(clazz.getTagsByName("hibernate.filter-param")));
+         CollectionUtils.filter(filterdefTags,
+             new Predicate() {
+                 public boolean evaluate(Object object) {
+                     HibernateFilterParamTag tag = (HibernateFilterParamTag) 
object;
+                     return filterdefName.equals(tag.getFilterdefName());
+                 }
+             });
+         return filterdefTags;
+     }
+ 
      /**
       * provide list of properties candidating for version or timestamp

Index: Filter.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/Filter.jelly,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Filter.jelly        26 Apr 2005 07:00:07 -0000      1.1
--- Filter.jelly        2 Sep 2005 09:14:01 -0000       1.2
***************
*** 1,5 ****
  <j:jelly xmlns:j="jelly:core">
      <!-- process filter -->
!     <j:forEach var="filterTag" 
items="${property.entity.getTagByName('hibernate.filter')}">
          <filter name="${filterTag.name_}" condition="${filterTag.condition}"/>
      </j:forEach>
--- 1,5 ----
  <j:jelly xmlns:j="jelly:core">
      <!-- process filter -->
!     <j:forEach var="filterTag" 
items="${filterEntity.getTagByName('hibernate.filter')}">
          <filter name="${filterTag.name_}" condition="${filterTag.condition}"/>
      </j:forEach>

Index: Bag.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/Bag.jelly,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Bag.jelly   24 Aug 2005 09:42:35 -0000      1.11
--- Bag.jelly   2 Sep 2005 09:14:00 -0000       1.12
***************
*** 27,32 ****
              <j:import uri="/BaseCollectionHead.jelly" inherit="true"/>
              <j:import uri="/BaseCollectionTail.jelly" inherit="true"/>
-             <!-- process filter -->
-             <j:import uri="/Filter.jelly" inherit="true"/>
              <!-- process comment -->
              <j:if test="${bagTag.comment != null}">
--- 27,30 ----

Index: Set.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/Set.jelly,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Set.jelly   24 Aug 2005 09:42:35 -0000      1.11
--- Set.jelly   2 Sep 2005 09:14:01 -0000       1.12
***************
*** 27,32 ****
          <j:import uri="/BaseCollectionHead.jelly" inherit="true"/>
          <j:import uri="/BaseCollectionTail.jelly" inherit="true"/>
-         <!-- process filter -->
-         <j:import uri="/Filter.jelly" inherit="true"/>
          <!-- process comment -->
          <j:if test="${setTag.comment != null}">
--- 27,30 ----



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits

Reply via email to