You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by jg...@apache.org on 2008/05/03 22:26:53 UTC

svn commit: r653131 [2/2] - in /ibatis/trunk/java/tools/ibator/core: build/ doc/ htmldoc/reference/ src/org/apache/ibatis/ibator/api/ src/org/apache/ibatis/ibator/api/dom/java/ src/org/apache/ibatis/ibator/config/ src/org/apache/ibatis/ibator/internal/...

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/IbatorPluginAggregator.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/IbatorPluginAggregator.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/IbatorPluginAggregator.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/IbatorPluginAggregator.java Sat May  3 13:26:52 2008
@@ -23,22 +23,26 @@
 import org.apache.ibatis.ibator.api.GeneratedXmlFile;
 import org.apache.ibatis.ibator.api.IbatorPlugin;
 import org.apache.ibatis.ibator.api.IntrospectedTable;
+import org.apache.ibatis.ibator.api.dom.java.Field;
 import org.apache.ibatis.ibator.api.dom.java.Interface;
 import org.apache.ibatis.ibator.api.dom.java.Method;
 import org.apache.ibatis.ibator.api.dom.java.TopLevelClass;
 import org.apache.ibatis.ibator.api.dom.xml.Document;
 import org.apache.ibatis.ibator.api.dom.xml.XmlElement;
 import org.apache.ibatis.ibator.config.IbatorContext;
+import org.apache.ibatis.ibator.internal.db.ColumnDefinition;
 
 /**
- * This class is for internal use only.  It contains a list of plugins
- * for the current context and is used to aggregate plugins together.
+ * This class is for internal use only. It contains a list of plugins for the
+ * current context and is used to aggregate plugins together. This class
+ * implements the rule that if any plugin returns "false" from a method, then no
+ * other plugin is called.
  * <p>
  * This class does not follow the normal plugin lifecycle and should not be
  * subclassed by clients.
  * 
  * @author Jeff Butler
- *
+ * 
  */
 public final class IbatorPluginAggregator implements IbatorPlugin {
     private List<IbatorPlugin> plugins;
@@ -46,7 +50,7 @@
     public IbatorPluginAggregator() {
         plugins = new ArrayList<IbatorPlugin>();
     }
-    
+
     public void addPlugin(IbatorPlugin plugin) {
         plugins.add(plugin);
     }
@@ -62,54 +66,99 @@
     public boolean validate(List<String> warnings) {
         throw new UnsupportedOperationException();
     }
-    
-    public void modelBaseRecordClassGenerated(TopLevelClass tlc,
+
+    public boolean modelBaseRecordClassGenerated(TopLevelClass tlc,
             IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.modelBaseRecordClassGenerated(tlc, introspectedTable);
+            if (!plugin.modelBaseRecordClassGenerated(tlc, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void modelRecordWithBLOBsClassGenerated(TopLevelClass tlc,
+    public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass tlc,
             IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.modelRecordWithBLOBsClassGenerated(tlc, introspectedTable);
+            if (!plugin.modelRecordWithBLOBsClassGenerated(tlc,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapCountByExampleElementGenerated(XmlElement element,
+    public boolean sqlMapCountByExampleElementGenerated(XmlElement element,
             IntrospectedTable table) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapCountByExampleElementGenerated(element, table);
+            if (!plugin.sqlMapCountByExampleElementGenerated(element, table)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapDeleteByExampleElementGenerated(XmlElement element,
+    public boolean sqlMapDeleteByExampleElementGenerated(XmlElement element,
             IntrospectedTable table) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapDeleteByExampleElementGenerated(element, table);
+            if (!plugin.sqlMapDeleteByExampleElementGenerated(element, table)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapDeleteByPrimaryKeyElementGenerated(XmlElement element,
+    public boolean sqlMapDeleteByPrimaryKeyElementGenerated(XmlElement element,
             IntrospectedTable table) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapDeleteByPrimaryKeyElementGenerated(element, table);
+            if (!plugin
+                    .sqlMapDeleteByPrimaryKeyElementGenerated(element, table)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void modelExampleClassGenerated(TopLevelClass tlc,
+    public boolean modelExampleClassGenerated(TopLevelClass tlc,
             IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.modelExampleClassGenerated(tlc, introspectedTable);
+            if (!plugin.modelExampleClassGenerated(tlc, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
     public List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles(
             IntrospectedTable introspectedTable) {
         List<GeneratedJavaFile> answer = new ArrayList<GeneratedJavaFile>();
         for (IbatorPlugin plugin : plugins) {
-            List<GeneratedJavaFile> temp = plugin.contextGenerateAdditionalJavaFiles(introspectedTable);
+            List<GeneratedJavaFile> temp = plugin
+                    .contextGenerateAdditionalJavaFiles(introspectedTable);
             if (temp != null) {
                 answer.addAll(temp);
             }
@@ -121,7 +170,8 @@
             IntrospectedTable introspectedTable) {
         List<GeneratedXmlFile> answer = new ArrayList<GeneratedXmlFile>();
         for (IbatorPlugin plugin : plugins) {
-            List<GeneratedXmlFile> temp = plugin.contextGenerateAdditionalXmlFiles(introspectedTable);
+            List<GeneratedXmlFile> temp = plugin
+                    .contextGenerateAdditionalXmlFiles(introspectedTable);
             if (temp != null) {
                 answer.addAll(temp);
             }
@@ -129,269 +179,655 @@
         return answer;
     }
 
-    public void modelPrimaryKeyClassGenerated(TopLevelClass tlc,
+    public boolean modelPrimaryKeyClassGenerated(TopLevelClass tlc,
             IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.modelPrimaryKeyClassGenerated(tlc, introspectedTable);
+            if (!plugin.modelPrimaryKeyClassGenerated(tlc, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapBaseResultMapGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapBaseResultMapGenerated(XmlElement element,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapBaseResultMapGenerated(element, introspectedTable);
+            if (!plugin
+                    .sqlMapBaseResultMapGenerated(element, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapExampleWhereClauseGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapExampleWhereClauseGenerated(XmlElement element,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapExampleWhereClauseGenerated(element, introspectedTable);
+            if (!plugin.sqlMapExampleWhereClauseGenerated(element,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapInsertElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapInsertElementGenerated(XmlElement element,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapInsertElementGenerated(element, introspectedTable);
+            if (!plugin
+                    .sqlMapInsertElementGenerated(element, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapResultMapWithBLOBsGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapResultMapWithBLOBsGenerated(XmlElement element,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapResultMapWithBLOBsGenerated(element, introspectedTable);
+            if (!plugin.sqlMapResultMapWithBLOBsGenerated(element,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapSelectByExampleElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapSelectByExampleElementGenerated(XmlElement element,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapSelectByExampleElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapSelectByExampleElementGenerated(element,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapSelectByExampleWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapSelectByExampleWithBLOBsElementGenerated(
+            XmlElement element, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapSelectByExampleWithBLOBsElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapSelectByExampleWithBLOBsElementGenerated(element,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapSelectByPrimaryKeyElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapSelectByPrimaryKeyElementGenerated(XmlElement element,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapSelectByPrimaryKeyElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapSelectByPrimaryKeyElementGenerated(element,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable) {
+    public boolean sqlMapGenerated(GeneratedXmlFile sqlMap,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapGenerated(sqlMap, introspectedTable);
+            if (!plugin.sqlMapGenerated(sqlMap, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapUpdateByExampleSelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapUpdateByExampleSelectiveElementGenerated(
+            XmlElement element, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapUpdateByExampleSelectiveElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapUpdateByExampleSelectiveElementGenerated(element,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapUpdateByExampleWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapUpdateByExampleWithBLOBsElementGenerated(
+            XmlElement element, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapUpdateByExampleWithBLOBsElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapUpdateByExampleWithBLOBsElementGenerated(element,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapUpdateByExampleWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapUpdateByExampleWithoutBLOBsElementGenerated(
+            XmlElement element, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(
+                    element, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapUpdateByPrimaryKeySelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(
+            XmlElement element, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapUpdateByPrimaryKeySelectiveElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapUpdateByPrimaryKeySelectiveElementGenerated(
+                    element, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(
+            XmlElement element, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(
+                    element, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+    public boolean sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(
+            XmlElement element, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(element, introspectedTable);
+            if (!plugin.sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(
+                    element, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoCountByExampleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoCountByExampleMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoCountByExampleMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoCountByExampleMethodGenerated(method, interfaze,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoCountByExampleMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoCountByExampleMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoCountByExampleMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoCountByExampleMethodGenerated(method, topLevelClass,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoDeleteByExampleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoDeleteByExampleMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoDeleteByExampleMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoDeleteByExampleMethodGenerated(method, interfaze,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoDeleteByExampleMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoDeleteByExampleMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoDeleteByExampleMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoDeleteByExampleMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoDeleteByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoDeleteByPrimaryKeyMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoDeleteByPrimaryKeyMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoDeleteByPrimaryKeyMethodGenerated(method, interfaze,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoDeleteByPrimaryKeyMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoDeleteByPrimaryKeyMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoDeleteByPrimaryKeyMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoDeleteByPrimaryKeyMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoImplementationGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoImplementationGenerated(TopLevelClass topLevelClass,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoImplementationGenerated(topLevelClass, introspectedTable);
+            if (!plugin.daoImplementationGenerated(topLevelClass,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoInsertMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoInsertMethodGenerated(Method method, Interface interfaze,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoInsertMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoInsertMethodGenerated(method, interfaze,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoInsertMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoInsertMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoInsertMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoInsertMethodGenerated(method, topLevelClass,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoInterfaceGenerated(Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoInterfaceGenerated(Interface interfaze,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoInterfaceGenerated(interfaze, introspectedTable);
+            if (!plugin.daoInterfaceGenerated(interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoSelectByExampleWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoSelectByExampleWithBLOBsMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoSelectByExampleWithBLOBsMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoSelectByExampleWithBLOBsMethodGenerated(method,
+                    interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoSelectByExampleWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoSelectByExampleWithBLOBsMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoSelectByExampleWithBLOBsMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoSelectByExampleWithBLOBsMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoSelectByExampleWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoSelectByExampleWithoutBLOBsMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoSelectByExampleWithoutBLOBsMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoSelectByExampleWithoutBLOBsMethodGenerated(method,
+                    interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoSelectByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoSelectByExampleWithoutBLOBsMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoSelectByExampleWithoutBLOBsMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoSelectByExampleWithoutBLOBsMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoSelectByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoSelectByPrimaryKeyMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoSelectByPrimaryKeyMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoSelectByPrimaryKeyMethodGenerated(method, interfaze,
+                    introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoSelectByPrimaryKeyMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoSelectByPrimaryKeyMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoSelectByPrimaryKeyMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoSelectByPrimaryKeyMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByExampleSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByExampleSelectiveMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByExampleSelectiveMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoUpdateByExampleSelectiveMethodGenerated(method,
+                    interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByExampleSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByExampleSelectiveMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByExampleSelectiveMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoUpdateByExampleSelectiveMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByExampleWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByExampleWithBLOBsMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByExampleWithBLOBsMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoUpdateByExampleWithBLOBsMethodGenerated(method,
+                    interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByExampleWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByExampleWithBLOBsMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByExampleWithBLOBsMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoUpdateByExampleWithBLOBsMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByExampleWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByExampleWithoutBLOBsMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByExampleWithoutBLOBsMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoUpdateByExampleWithoutBLOBsMethodGenerated(method,
+                    interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByExampleWithoutBLOBsMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByExampleWithoutBLOBsMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoUpdateByExampleWithoutBLOBsMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByPrimaryKeySelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByPrimaryKeySelectiveMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByPrimaryKeySelectiveMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoUpdateByPrimaryKeySelectiveMethodGenerated(method,
+                    interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByPrimaryKeySelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByPrimaryKeySelectiveMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByPrimaryKeySelectiveMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoUpdateByPrimaryKeySelectiveMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method,
+            Interface interfaze, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(method,
+                    interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method,
+            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(method,
+                    topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(
+            Method method, Interface interfaze,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method, interfaze, introspectedTable);
+            if (!plugin.daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(
+                    method, interfaze, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
-    public void daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(
+            Method method, TopLevelClass topLevelClass,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method, topLevelClass, introspectedTable);
+            if (!plugin.daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(
+                    method, topLevelClass, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
     }
 
     public List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles() {
         List<GeneratedJavaFile> answer = new ArrayList<GeneratedJavaFile>();
         for (IbatorPlugin plugin : plugins) {
-            List<GeneratedJavaFile> temp = plugin.contextGenerateAdditionalJavaFiles();
+            List<GeneratedJavaFile> temp = plugin
+                    .contextGenerateAdditionalJavaFiles();
             if (temp != null) {
                 answer.addAll(temp);
             }
@@ -402,7 +838,8 @@
     public List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles() {
         List<GeneratedXmlFile> answer = new ArrayList<GeneratedXmlFile>();
         for (IbatorPlugin plugin : plugins) {
-            List<GeneratedXmlFile> temp = plugin.contextGenerateAdditionalXmlFiles();
+            List<GeneratedXmlFile> temp = plugin
+                    .contextGenerateAdditionalXmlFiles();
             if (temp != null) {
                 answer.addAll(temp);
             }
@@ -410,9 +847,56 @@
         return answer;
     }
 
-    public void sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
+    public boolean sqlMapDocumentGenerated(Document document,
+            IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
+        for (IbatorPlugin plugin : plugins) {
+            if (!plugin.sqlMapDocumentGenerated(document, introspectedTable)) {
+                rc = false;
+                break;
+            }
+        }
+
+        return rc;
+    }
+
+    public boolean modelFieldGenerated(Field field, TopLevelClass topLevelClass, ColumnDefinition columnDefinition, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
         for (IbatorPlugin plugin : plugins) {
-            plugin.sqlMapDocumentGenerated(document, introspectedTable);
+            if (!plugin.modelFieldGenerated(field, topLevelClass, columnDefinition, introspectedTable)) {
+                rc = false;
+                break;
+            }
         }
+
+        return rc;
+    }
+
+    public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, ColumnDefinition columnDefinition, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
+        for (IbatorPlugin plugin : plugins) {
+            if (!plugin.modelGetterMethodGenerated(method, topLevelClass, columnDefinition, introspectedTable)) {
+                rc = false;
+                break;
+            }
+        }
+
+        return rc;
+    }
+
+    public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, ColumnDefinition columnDefinition, IntrospectedTable introspectedTable) {
+        boolean rc = true;
+
+        for (IbatorPlugin plugin : plugins) {
+            if (!plugin.modelSetterMethodGenerated(method, topLevelClass, columnDefinition, introspectedTable)) {
+                rc = false;
+                break;
+            }
+        }
+
+        return rc;
     }
 }

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/ColumnDefinition.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/ColumnDefinition.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/ColumnDefinition.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/ColumnDefinition.java Sat May  3 13:26:52 2008
@@ -207,7 +207,7 @@
      * is a table alias, the value will be alias_columnName.  This is
      * appropriate for use in a result map.
      * 
-     * @return
+     * @return the renamed column name
      */
     public String getRenamedColumnNameForResultMap() {
         if (StringUtility.stringHasValue(tableAlias)) {
@@ -336,7 +336,7 @@
      * in a Java string.  So we need to escape double quotes if they are
      * the delimiters.
      * 
-     * @return
+     * @return the aliased column name
      */
     public String getAliasedActualColumnName() {
         StringBuffer sb = new StringBuffer();
@@ -361,7 +361,7 @@
     /**
      * Calculates the string to use in select phrases in SqlMaps.
      * 
-     * @return
+     * @return the aliased escaped column name
      */
     public String getAliasedEscapedColumnName() {
         if (StringUtility.stringHasValue(tableAlias)) {

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/DatabaseIntrospector.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/DatabaseIntrospector.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/DatabaseIntrospector.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/DatabaseIntrospector.java Sat May  3 13:26:52 2008
@@ -137,7 +137,7 @@
      * configuration. 
      * 
      * @param tc
-     * @return
+     * @return a list of introspected tables
      * @throws SQLException
      */
     public List<? extends IntrospectedTable> introspectTables(TableConfiguration tc) throws SQLException {

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/java/dao/BaseDAOGenerator.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/java/dao/BaseDAOGenerator.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/java/dao/BaseDAOGenerator.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/java/dao/BaseDAOGenerator.java Sat May  3 13:26:52 2008
@@ -217,21 +217,23 @@
     public List<GeneratedJavaFile> getGeneratedJavaFiles(IntrospectedTable introspectedTable,
             ProgressCallback callback) {
         List<GeneratedJavaFile> list = new ArrayList<GeneratedJavaFile>();
-        IbatorPlugin plugin = ibatorContext.getPluginAggregator();
+        IbatorPlugin plugins = ibatorContext.getPlugins();
 
         callback.startSubTask(Messages.getString("Progress.10", //$NON-NLS-1$
                 introspectedTable.getTable().toString()));
         TopLevelClass tlc = getDAOImplementation(introspectedTable);
-        plugin.daoImplementationGenerated(tlc, introspectedTable);
-        GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
-        list.add(gjf);
+        if (plugins.daoImplementationGenerated(tlc, introspectedTable)) {
+            GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
+            list.add(gjf);
+        }
 
         callback.startSubTask(Messages.getString("Progress.11", //$NON-NLS-1$
                 introspectedTable.getTable().toString()));
         Interface interfaze = getDAOInterface(introspectedTable);
-        plugin.daoInterfaceGenerated(interfaze, introspectedTable);
-        gjf = new GeneratedJavaFile(interfaze, targetProject);
-        list.add(gjf);
+        if (plugins.daoInterfaceGenerated(interfaze, introspectedTable)) {
+            GeneratedJavaFile gjf = new GeneratedJavaFile(interfaze, targetProject);
+            list.add(gjf);
+        }
 
         return list;
     }
@@ -272,21 +274,23 @@
 
         IbatorRules rules = introspectedTable.getRules();
         Method method;
-        IbatorPlugin plugin = ibatorContext.getPluginAggregator();
+        IbatorPlugin plugins = ibatorContext.getPlugins();
         
         if (rules.generateInsert()) {
             method = getInsertMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoInsertMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoInsertMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateUpdateByPrimaryKeyWithoutBLOBs()) {
             method = getUpdateByPrimaryKeyWithoutBLOBsMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
@@ -294,8 +298,9 @@
             method = getUpdateByPrimaryKeyWithBLOBsMethod(introspectedTable,
                     false, answer);
             if (method != null) {
-                plugin.daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
@@ -303,16 +308,18 @@
             method = getUpdateByPrimaryKeySelectiveMethod(introspectedTable,
                     false, answer);
             if (method != null) {
-                plugin.daoUpdateByPrimaryKeySelectiveMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByPrimaryKeySelectiveMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateSelectByExampleWithoutBLOBs()) {
             method = getSelectByExampleWithoutBLOBsMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoSelectByExampleWithoutBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoSelectByExampleWithoutBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
@@ -320,64 +327,72 @@
             method = getSelectByExampleWithBLOBsMethod(introspectedTable, false,
                     answer);
             if (method != null) {
-                plugin.daoSelectByExampleWithBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoSelectByExampleWithBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateSelectByPrimaryKey()) {
             method = getSelectByPrimaryKeyMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoSelectByPrimaryKeyMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoSelectByPrimaryKeyMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateDeleteByExample()) {
             method = getDeleteByExampleMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoDeleteByExampleMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoDeleteByExampleMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateDeleteByPrimaryKey()) {
             method = getDeleteByPrimaryKeyMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoDeleteByPrimaryKeyMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoDeleteByPrimaryKeyMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateCountByExample()) {
             method = getCountByExampleMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoCountByExampleMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoCountByExampleMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
         
         if (rules.generateUpdateByExampleSelective()) {
             method = getUpdateByExampleSelectiveMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoUpdateByExampleSelectiveMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByExampleSelectiveMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
         
         if (rules.generateUpdateByExampleWithBLOBs()) {
             method = getUpdateByExampleWithBLOBsMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoUpdateByExampleWithBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByExampleWithBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateUpdateByExampleWithoutBLOBs()) {
             method = getUpdateByExampleWithoutBLOBsMethod(introspectedTable, false, answer);
             if (method != null) {
-                plugin.daoUpdateByExampleWithoutBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByExampleWithoutBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
         
@@ -417,21 +432,23 @@
         
         IbatorRules rules = introspectedTable.getRules();
         Method method;
-        IbatorPlugin plugin = ibatorContext.getPluginAggregator();
+        IbatorPlugin plugins = ibatorContext.getPlugins();
         
         if (rules.generateInsert()) {
             method = getInsertMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoInsertMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoInsertMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateUpdateByPrimaryKeyWithoutBLOBs()) {
             method = getUpdateByPrimaryKeyWithoutBLOBsMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
@@ -439,8 +456,9 @@
             method = getUpdateByPrimaryKeyWithBLOBsMethod(introspectedTable,
                     true, answer);
             if (method != null) {
-                plugin.daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByPrimaryKeyWithBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
@@ -448,16 +466,18 @@
             method = getUpdateByPrimaryKeySelectiveMethod(introspectedTable,
                     true, answer);
             if (method != null) {
-                plugin.daoUpdateByPrimaryKeySelectiveMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByPrimaryKeySelectiveMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateSelectByExampleWithoutBLOBs()) {
             method = getSelectByExampleWithoutBLOBsMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoSelectByExampleWithoutBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoSelectByExampleWithoutBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
@@ -465,64 +485,72 @@
             method = getSelectByExampleWithBLOBsMethod(introspectedTable, true,
                     answer);
             if (method != null) {
-                plugin.daoSelectByExampleWithBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoSelectByExampleWithBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateSelectByPrimaryKey()) {
             method = getSelectByPrimaryKeyMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoSelectByPrimaryKeyMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoSelectByPrimaryKeyMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateDeleteByExample()) {
             method = getDeleteByExampleMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoDeleteByExampleMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoDeleteByExampleMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateDeleteByPrimaryKey()) {
             method = getDeleteByPrimaryKeyMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoDeleteByPrimaryKeyMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoDeleteByPrimaryKeyMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateCountByExample()) {
             method = getCountByExampleMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoCountByExampleMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoCountByExampleMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
         
         if (rules.generateUpdateByExampleSelective()) {
             method = getUpdateByExampleSelectiveMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoUpdateByExampleSelectiveMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByExampleSelectiveMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
         
         if (rules.generateUpdateByExampleWithBLOBs()) {
             method = getUpdateByExampleWithBLOBsMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoUpdateByExampleWithBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByExampleWithBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
 
         if (rules.generateUpdateByExampleWithoutBLOBs()) {
             method = getUpdateByExampleWithoutBLOBsMethod(introspectedTable, true, answer);
             if (method != null) {
-                plugin.daoUpdateByExampleWithoutBLOBsMethodGenerated(method, answer, introspectedTable);
-                answer.addMethod(method);
+                if (plugins.daoUpdateByExampleWithoutBLOBsMethodGenerated(method, answer, introspectedTable)) {
+                    answer.addMethod(method);
+                }
             }
         }
         

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/java/model/JavaModelGeneratorJava2Impl.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/java/model/JavaModelGeneratorJava2Impl.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/java/model/JavaModelGeneratorJava2Impl.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/java/model/JavaModelGeneratorJava2Impl.java Sat May  3 13:26:52 2008
@@ -144,11 +144,15 @@
      *            and getter/setter methods.
      * @param topLevelClass
      *            the generated fields and methods will be added to this object
+     * @param introspectedTable the current table
      */
     protected void generateClassParts(FullyQualifiedTable table,
             List<ColumnDefinition> columnDefinitions, TopLevelClass topLevelClass,
-            String rootClass) {
+            IntrospectedTable introspectedTable) {
 
+        IbatorPlugin plugins = ibatorContext.getPlugins();
+        String rootClass = getRootClass(introspectedTable);
+        
         boolean trimStrings = "true".equalsIgnoreCase(properties //$NON-NLS-1$
                 .getProperty(PropertyRegistry.MODEL_GENERATOR_TRIM_STRINGS));
 
@@ -158,44 +162,50 @@
 
         CommentGenerator commentGenerator = ibatorContext.getCommentGenerator();
 
-        for (ColumnDefinition cd : columnDefinitions) {
-            if (propertyExistsInRootClass(cd, rootClass)) {
+        for (ColumnDefinition columnDefinition : columnDefinitions) {
+            if (propertyExistsInRootClass(columnDefinition, rootClass)) {
                 continue;
             }
             
-            FullyQualifiedJavaType fqjt = cd.getResolvedJavaType()
+            FullyQualifiedJavaType fqjt = columnDefinition.getResolvedJavaType()
                     .getFullyQualifiedJavaType();
 
             topLevelClass.addImportedType(fqjt);
 
-            String property = cd.getJavaProperty();
+            String property = columnDefinition.getJavaProperty();
 
             field = new Field();
             field.setVisibility(JavaVisibility.PRIVATE);
             field.setType(fqjt);
             field.setName(property);
-            commentGenerator.addFieldComment(field, table, cd.getActualColumnName());
-            topLevelClass.addField(field);
+            commentGenerator.addFieldComment(field, table, columnDefinition.getActualColumnName());
+        
+            if (plugins.modelFieldGenerated(field, topLevelClass, columnDefinition, introspectedTable)) {
+                topLevelClass.addField(field);
+            }
 
             method = new Method();
             method.setVisibility(JavaVisibility.PUBLIC);
             method.setReturnType(fqjt);
             method.setName(JavaBeansUtil.getGetterMethodName(field.getName(), field.getType()));
-            commentGenerator.addGetterComment(method, table, cd.getActualColumnName());
+            commentGenerator.addGetterComment(method, table, columnDefinition.getActualColumnName());
             sb.setLength(0);
             sb.append("return "); //$NON-NLS-1$
             sb.append(property);
             sb.append(';');
             method.addBodyLine(sb.toString());
-            topLevelClass.addMethod(method);
+
+            if (plugins.modelGetterMethodGenerated(method, topLevelClass, columnDefinition, introspectedTable)) {
+                topLevelClass.addMethod(method);
+            }
 
             method = new Method();
             method.setVisibility(JavaVisibility.PUBLIC);
             method.setName(JavaBeansUtil.getSetterMethodName(property));
             method.addParameter(new Parameter(fqjt, property));
-            commentGenerator.addSetterComment(method, table, cd.getActualColumnName());
+            commentGenerator.addSetterComment(method, table, columnDefinition.getActualColumnName());
 
-            if (trimStrings && cd.isStringColumn()) {
+            if (trimStrings && columnDefinition.isStringColumn()) {
                 sb.setLength(0);
                 sb.append("this."); //$NON-NLS-1$
                 sb.append(property);
@@ -215,7 +225,9 @@
                 method.addBodyLine(sb.toString());
             }
             
-            topLevelClass.addMethod(method);
+            if (plugins.modelSetterMethodGenerated(method, topLevelClass, columnDefinition, introspectedTable)) {
+                topLevelClass.addMethod(method);
+            }
         }
     }
 
@@ -264,7 +276,7 @@
         }
         
         generateClassParts(table, introspectedTable.getPrimaryKeyColumns(), answer,
-                getRootClass(introspectedTable));
+                introspectedTable);
 
         return answer;
     }
@@ -294,16 +306,16 @@
         if (!introspectedTable.getRules().generatePrimaryKeyClass()
                 && introspectedTable.hasPrimaryKeyColumns()) {
             generateClassParts(table, introspectedTable.getPrimaryKeyColumns(), answer,
-                    getRootClass(introspectedTable));
+                    introspectedTable);
         }
 
         generateClassParts(table, introspectedTable.getBaseColumns(), answer,
-                getRootClass(introspectedTable));
+                introspectedTable);
 
         if (!introspectedTable.getRules().generateRecordWithBLOBsClass()
                 && introspectedTable.hasBLOBColumns()) {
             generateClassParts(table, introspectedTable.getBLOBColumns(), answer,
-                    getRootClass(introspectedTable));
+                    introspectedTable);
         }
         
         return answer;
@@ -328,7 +340,7 @@
         }
         
         generateClassParts(table, introspectedTable.getBLOBColumns(), answer,
-                getRootClass(introspectedTable));
+                introspectedTable);
 
         return answer;
     }
@@ -367,16 +379,17 @@
      */
     public List<GeneratedJavaFile> getGeneratedJavaFiles(IntrospectedTable introspectedTable, ProgressCallback callback) {
         List<GeneratedJavaFile> list = new ArrayList<GeneratedJavaFile>();
-        IbatorPlugin plugin = ibatorContext.getPluginAggregator();
+        IbatorPlugin plugins = ibatorContext.getPlugins();
 
         callback.startSubTask(Messages.getString(
                 "Progress.6", //$NON-NLS-1$
                 introspectedTable.getTable().toString()));
         TopLevelClass tlc = getExample(introspectedTable);
         if (tlc != null) {
-            plugin.modelExampleClassGenerated(tlc, introspectedTable);
-            GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
-            list.add(gjf);
+            if (plugins.modelExampleClassGenerated(tlc, introspectedTable)) {
+                GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
+                list.add(gjf);
+            }
         }
 
         callback.startSubTask(Messages.getString(
@@ -384,9 +397,10 @@
                 introspectedTable.getTable().toString()));
         tlc = getPrimaryKey(introspectedTable);
         if (tlc != null) {
-            plugin.modelPrimaryKeyClassGenerated(tlc, introspectedTable);
-            GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
-            list.add(gjf);
+            if (plugins.modelPrimaryKeyClassGenerated(tlc, introspectedTable)) {
+                GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
+                list.add(gjf);
+            }
         }
 
         callback.startSubTask(Messages.getString(
@@ -394,9 +408,10 @@
                 introspectedTable.getTable().toString()));
         tlc = getBaseRecord(introspectedTable);
         if (tlc != null) {
-            plugin.modelBaseRecordClassGenerated(tlc, introspectedTable);
-            GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
-            list.add(gjf);
+            if (plugins.modelBaseRecordClassGenerated(tlc, introspectedTable)) {
+                GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
+                list.add(gjf);
+            }
         }
 
         callback.startSubTask(Messages.getString(
@@ -404,9 +419,10 @@
                 introspectedTable.getTable().toString()));
         tlc = getRecordWithBLOBs(introspectedTable);
         if (tlc != null) {
-            plugin.modelRecordWithBLOBsClassGenerated(tlc, introspectedTable);
-            GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
-            list.add(gjf);
+            if (plugins.modelRecordWithBLOBsClassGenerated(tlc, introspectedTable)) {
+                GeneratedJavaFile gjf = new GeneratedJavaFile(tlc, targetProject);
+                list.add(gjf);
+            }
         }
 
         return list;

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/sqlmap/SqlMapGeneratorIterateImpl.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/sqlmap/SqlMapGeneratorIterateImpl.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/sqlmap/SqlMapGeneratorIterateImpl.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/sqlmap/SqlMapGeneratorIterateImpl.java Sat May  3 13:26:52 2008
@@ -134,7 +134,15 @@
         callback.startSubTask(Messages.getString(
                 "Progress.12", //$NON-NLS-1$
                 table.toString()));
-        list.add(getSqlMap(introspectedTable));
+        Document document = getSqlMap(introspectedTable);
+        if (document != null) {
+            GeneratedXmlFile gxf = new GeneratedXmlFile(document,
+                    getSqlMapFileName(table), getSqlMapPackage(table),
+                    targetProject, true);
+            if (ibatorContext.getPlugins().sqlMapGenerated(gxf, introspectedTable)) {
+                list.add(gxf);
+            }
+        }
 
         return list;
     }
@@ -145,22 +153,19 @@
      * @param introspectedTable
      * @return A GeneratedXMLFile for the current table
      */
-    protected GeneratedXmlFile getSqlMap(IntrospectedTable introspectedTable) {
+    protected Document getSqlMap(IntrospectedTable introspectedTable) {
 
+        IbatorPlugin plugins = ibatorContext.getPlugins();
+        
         Document document = new Document(XmlConstants.SQL_MAP_PUBLIC_ID,
                 XmlConstants.SQL_MAP_SYSTEM_ID);
         document.setRootElement(getSqlMapElement(introspectedTable));
-        
-        ibatorContext.getPluginAggregator().sqlMapDocumentGenerated(document, introspectedTable);
-        
-        FullyQualifiedTable table = introspectedTable.getTable();
-        GeneratedXmlFile answer = new GeneratedXmlFile(document,
-                getSqlMapFileName(table), getSqlMapPackage(table),
-                targetProject, true);
 
-        ibatorContext.getPluginAggregator().sqlMapGenerated(answer, introspectedTable);
-        
-        return answer;
+        if (plugins.sqlMapDocumentGenerated(document, introspectedTable)) {
+            return document;
+        } else {
+            return null;
+        }
     }
 
     /**
@@ -176,7 +181,7 @@
         answer.addAttribute(new Attribute("namespace", //$NON-NLS-1$
                 table.getSqlMapNamespace()));
 
-        IbatorPlugin plugin = ibatorContext.getPluginAggregator();
+        IbatorPlugin plugins = ibatorContext.getPlugins();
         ibatorContext.getCommentGenerator().addRootComment(answer);
         
         IbatorRules rules = introspectedTable.getRules();
@@ -184,128 +189,144 @@
         if (rules.generateBaseResultMap()) {
             element = getBaseResultMapElement(introspectedTable);
             if (element != null) {
-                plugin.sqlMapBaseResultMapGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapBaseResultMapGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateResultMapWithBLOBs()) {
             element = getResultMapWithBLOBsElement(introspectedTable);
             if (element != null) {
-                plugin.sqlMapResultMapWithBLOBsGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapResultMapWithBLOBsGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateSQLExampleWhereClause()) {
             element = getByExampleWhereClauseFragment(introspectedTable);
             if (element != null) {
-                plugin.sqlMapExampleWhereClauseGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapExampleWhereClauseGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateSelectByPrimaryKey()) {
             element = getSelectByPrimaryKey(introspectedTable);
             if (element != null) {
-                plugin.sqlMapSelectByPrimaryKeyElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapSelectByPrimaryKeyElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateSelectByExampleWithoutBLOBs()) {
             element = getSelectByExample(introspectedTable);
             if (element != null) {
-                plugin.sqlMapSelectByExampleElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapSelectByExampleElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateSelectByExampleWithBLOBs()) {
             element = getSelectByExampleWithBLOBs(introspectedTable);
             if (element != null) {
-                plugin.sqlMapSelectByExampleWithBLOBsElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapSelectByExampleWithBLOBsElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateDeleteByPrimaryKey()) {
             element = getDeleteByPrimaryKey(introspectedTable);
             if (element != null) {
-                plugin.sqlMapDeleteByPrimaryKeyElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapDeleteByPrimaryKeyElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateDeleteByExample()) {
             element = getDeleteByExample(introspectedTable);
             if (element != null) {
-                plugin.sqlMapDeleteByExampleElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapDeleteByExampleElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateInsert()) {
             element = getInsertElement(introspectedTable);
             if (element != null) {
-                plugin.sqlMapInsertElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapInsertElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateUpdateByPrimaryKeyWithBLOBs()) {
             element = getUpdateByPrimaryKeyWithBLOBs(introspectedTable);
             if (element != null) {
-                plugin.sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateUpdateByPrimaryKeyWithoutBLOBs()) {
             element = getUpdateByPrimaryKeyWithoutBLOBs(introspectedTable);
             if (element != null) {
-                plugin.sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateUpdateByPrimaryKeySelective()) {
             element = getUpdateByPrimaryKeySelective(introspectedTable);
             if (element != null) {
-                plugin.sqlMapUpdateByPrimaryKeySelectiveElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapUpdateByPrimaryKeySelectiveElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
         
         if (rules.generateCountByExample()) {
             element = getCountByExample(introspectedTable);
             if (element != null) {
-                plugin.sqlMapCountByExampleElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapCountByExampleElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
         
         if (rules.generateUpdateByExampleSelective()) {
             element = getUpdateByExampleSelective(introspectedTable);
             if (element != null) {
-                plugin.sqlMapUpdateByExampleSelectiveElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapUpdateByExampleSelectiveElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
         
         if (rules.generateUpdateByExampleWithBLOBs()) {
             element = getUpdateByExampleWithBLOBs(introspectedTable);
             if (element != null) {
-                plugin.sqlMapUpdateByExampleWithBLOBsElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapUpdateByExampleWithBLOBsElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 
         if (rules.generateUpdateByExampleWithoutBLOBs()) {
             element = getUpdateByExampleWithoutBLOBs(introspectedTable);
             if (element != null) {
-                plugin.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(element, introspectedTable);
-                answer.addElement(element);
+                if (plugins.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(element, introspectedTable)) {
+                    answer.addElement(element);
+                }
             }
         }
 

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/util/JavaBeansUtil.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/util/JavaBeansUtil.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/util/JavaBeansUtil.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/util/JavaBeansUtil.java Sat May  3 13:26:52 2008
@@ -45,7 +45,7 @@
      *             getValidPropertyName first.
      * 
      * @param property
-     * @return
+     * @return the getter method name
      */
 	public static String getGetterMethodName(String property, FullyQualifiedJavaType fullyQualifiedJavaType) {
 		StringBuffer sb = new StringBuffer();
@@ -80,7 +80,7 @@
      *             getValidPropertyName first.
      * 
      * @param property
-     * @return
+     * @return the setter method name
      */
 	public static String getSetterMethodName(String property) {
 		StringBuffer sb = new StringBuffer();
@@ -153,7 +153,7 @@
      * Yaxis     > yaxis
      *             
 	 * @param inputString
-	 * @return the valid poperty name
+	 * @return the valid property name
 	 */
 	public static String getValidPropertyName(String inputString) {
         String answer;

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/EqualsHashCodePlugin.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/EqualsHashCodePlugin.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/EqualsHashCodePlugin.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/EqualsHashCodePlugin.java Sat May  3 13:26:52 2008
@@ -68,7 +68,7 @@
     }
 
     @Override
-    public void modelBaseRecordClassGenerated(TopLevelClass topLevelClass,
+    public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass,
             IntrospectedTable introspectedTable) {
         List<ColumnDefinition> columns;
         if (introspectedTable.getRules().generateRecordWithBLOBsClass()) {
@@ -79,24 +79,30 @@
 
         generateEquals(topLevelClass, columns, introspectedTable);
         generateHashCode(topLevelClass, columns, introspectedTable);
+        
+        return true;
     }
 
     @Override
-    public void modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass,
+    public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass,
             IntrospectedTable introspectedTable) {
         generateEquals(topLevelClass, introspectedTable.getPrimaryKeyColumns(),
                 introspectedTable);
         generateHashCode(topLevelClass, introspectedTable.getPrimaryKeyColumns(),
                 introspectedTable);
+        
+        return true;
     }
 
     @Override
-    public void modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass,
+    public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass,
             IntrospectedTable introspectedTable) {
         generateEquals(topLevelClass, introspectedTable.getAllColumns(),
                 introspectedTable);
         generateHashCode(topLevelClass, introspectedTable.getAllColumns(),
                 introspectedTable);
+        
+        return true;
     }
 
     /**

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SerializablePlugin.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SerializablePlugin.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SerializablePlugin.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SerializablePlugin.java Sat May  3 13:26:52 2008
@@ -54,18 +54,21 @@
     }
 
     @Override
-    public void modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
         makeSerializable(topLevelClass, introspectedTable.getTable());
+        return true;
     }
 
     @Override
-    public void modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
         makeSerializable(topLevelClass, introspectedTable.getTable());
+        return true;
     }
 
     @Override
-    public void modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+    public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
         makeSerializable(topLevelClass, introspectedTable.getTable());
+        return true;
     }
     
     protected void makeSerializable(TopLevelClass topLevelClass, FullyQualifiedTable table) {

Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SqlMapConfigPlugin.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SqlMapConfigPlugin.java?rev=653131&r1=653130&r2=653131&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SqlMapConfigPlugin.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SqlMapConfigPlugin.java Sat May  3 13:26:52 2008
@@ -128,7 +128,7 @@
      * by ibator in this context.
      */
     @Override
-    public void sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable) {
+    public boolean sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable) {
         StringBuffer sb = new StringBuffer();
         sb.append(sqlMap.getTargetPackage());
         sb.append('.');
@@ -137,5 +137,7 @@
         sb.append(temp.replace('.', '/'));
         sb.append(sqlMap.getFileName());
         sqlMapFiles.add(sb.toString());
+
+        return true;
     }
 }