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

Modified Files:
        Column.jelly HibernateMappingPlugin.java Property.jelly 
Log Message:
(XDP-51) Added support of 'prefix' attribute for component

Index: Column.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/Column.jelly,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Column.jelly        26 Apr 2005 07:00:07 -0000      1.5
--- Column.jelly        6 May 2005 07:24:41 -0000       1.6
***************
*** 1,5 ****
  <j:jelly xmlns:j="jelly:core">
      <column
!         name="${columnTag.name_}"
          length="${columnTag.length}"
          precision="${columnTag.precision}"
--- 1,5 ----
  <j:jelly xmlns:j="jelly:core">
      <column
!         name="${plugin.concat(componentTag.prefix, columnTag.name_)}"
          length="${columnTag.length}"
          precision="${columnTag.precision}"

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.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** HibernateMappingPlugin.java 4 May 2005 09:48:40 -0000       1.33
--- HibernateMappingPlugin.java 6 May 2005 07:24:41 -0000       1.34
***************
*** 76,79 ****
--- 76,81 ----
      }
  
+     private boolean checkUpToDate = true;
+ 
      public HibernateMappingPlugin(JellyTemplateEngine jellyTemplateEngine,
          QDoxCapableMetadataProvider metadataProvider, WriterMapper 
writerMapper) {
***************
*** 94,97 ****
--- 96,103 ----
      }
  
+     public void setCheckUpToDate(boolean checkUpToDate) {
+         this.checkUpToDate = checkUpToDate;
+     }
+ 
      /**
       * provide list of properties candidating for class id
***************
*** 247,250 ****
--- 253,268 ----
      }
  
+     public String concat(String string1, String string2) {
+         if (string1 == null) {
+             return string2;
+         }
+ 
+         if (string2 == null) {
+             return string1;
+         }
+ 
+         return string1 + string2;
+     }
+ 
      /**
       * dispatch qtag to correct jelly script. cache results statically
***************
*** 299,309 ****
  
          //Check if mapping up-to-date then skip generation
!         //todo make it customizable throught plugin property
          File destFile = new File(getDestdirFile(),
                  clazz.getPackage().replace('.', '/') + File.separator + 
getDestinationFilename(metadata));
          File sourceFile = new File(clazz.getSource().getURL().getFile());
  
!         if (destFile.exists()) {
!             if (sourceFile.lastModified() < destFile.lastModified()) {
                  return false;
              }
--- 317,326 ----
  
          //Check if mapping up-to-date then skip generation
!         if (checkUpToDate) {
          File destFile = new File(getDestdirFile(),
                  clazz.getPackage().replace('.', '/') + File.separator + 
getDestinationFilename(metadata));
          File sourceFile = new File(clazz.getSource().getURL().getFile());
  
!             if (destFile.exists() && sourceFile.lastModified() < 
destFile.lastModified()) {
                  return false;
              }

Index: Property.jelly
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate/Property.jelly,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Property.jelly      26 Apr 2005 07:00:08 -0000      1.7
--- Property.jelly      6 May 2005 07:24:42 -0000       1.8
***************
*** 7,11 ****
              access="${property.access}"
              type="${propertyTag.type}"
!             column="${propertyTag.column}"
              length="${propertyTag.length}"
              precision="${propertyTag.precision}"
--- 7,11 ----
              access="${property.access}"
              type="${propertyTag.type}"
!             column="${plugin.concat(componentTag.prefix, propertyTag.column)}"
              length="${propertyTag.length}"
              precision="${propertyTag.precision}"



-------------------------------------------------------
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-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits

Reply via email to