View Javadoc
1   /**
2    *    Copyright 2006-2016 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package org.mybatis.generator.api;
17  
18  import java.util.List;
19  import java.util.Properties;
20  
21  import org.mybatis.generator.api.dom.java.Field;
22  import org.mybatis.generator.api.dom.java.Interface;
23  import org.mybatis.generator.api.dom.java.Method;
24  import org.mybatis.generator.api.dom.java.TopLevelClass;
25  import org.mybatis.generator.api.dom.xml.Document;
26  import org.mybatis.generator.api.dom.xml.XmlElement;
27  import org.mybatis.generator.config.Context;
28  
29  /**
30   * This interface defines methods that will be called at different times during
31   * the code generation process. These methods can be used to extend or modify
32   * the generated code. Clients may implement this interface in its entirety, or
33   * extend the PluginAdapter (highly recommended).
34   * <p>
35   * Plugins have a lifecycle. In general, the lifecycle is this:
36   * 
37   * <ol>
38   * <li>The setXXX methods are called one time</li>
39   * <li>The validate method is called one time</li>
40   * <li>The initialized method is called for each introspected table</li>
41   * <li>The clientXXX methods are called for each introspected table</li>
42   * <li>The providerXXX methods are called for each introspected table</li>
43   * <li>The modelXXX methods are called for each introspected table</li>
44   * <li>The sqlMapXXX methods are called for each introspected table</li>
45   * <li>The contextGenerateAdditionalJavaFiles(IntrospectedTable) method is
46   * called for each introspected table</li>
47   * <li>The contextGenerateAdditionalXmlFiles(IntrospectedTable) method is called
48   * for each introspected table</li>
49   * <li>The contextGenerateAdditionalJavaFiles() method is called one time</li>
50   * <li>The contextGenerateAdditionalXmlFiles() method is called one time</li>
51   * </ol>
52   * 
53   * Plugins are related to contexts - so each context will have its own set of
54   * plugins. If the same plugin is specified in multiple contexts, then each
55   * context will hold a unique instance of the plugin.
56   * <p>
57   * Plugins are called, and initialized, in the same order they are specified in
58   * the configuration.
59   * <p>
60   * The clientXXX, modelXXX, and sqlMapXXX methods are called by the code
61   * generators. If you replace the default code generators with other
62   * implementations, these methods may not be called.
63   * 
64   * @author Jeff Butler
65   * @see PluginAdapter
66   * 
67   */
68  public interface Plugin {
69      
70      /**
71       * The Enum ModelClassType.
72       */
73      public enum ModelClassType {
74          
75          /** The primary key. */
76          PRIMARY_KEY, 
77   /** The base record. */
78   BASE_RECORD, 
79   /** The record with blobs. */
80   RECORD_WITH_BLOBS
81      }
82  
83      /**
84       * Set the context under which this plugin is running.
85       *
86       * @param context
87       *            the new context
88       */
89      void setContext(Context context);
90  
91      /**
92       * Set properties from the plugin configuration.
93       *
94       * @param properties
95       *            the new properties
96       */
97      void setProperties(Properties properties);
98  
99      /**
100      * This method is called just before the getGeneratedXXXFiles methods are called on the introspected table. Plugins
101      * can implement this method to override any of the default attributes, or change the results of database
102      * introspection, before any code generation activities occur. Attributes are listed as static Strings with the
103      * prefix ATTR_ in IntrospectedTable.
104      * <p>
105      * A good example of overriding an attribute would be the case where a user wanted to change the name of one of the
106      * generated classes, change the target package, or change the name of the generated SQL map file.
107      * <p>
108      * <b>Warning:</b> Anything that is listed as an attribute should not be changed by one of the other plugin methods.
109      * For example, if you want to change the name of a generated example class, you should not simply change the Type
110      * in the <code>modelExampleClassGenerated()</code> method. If you do, the change will not be reflected in other
111      * generated artifacts.
112      *
113      * @param introspectedTable
114      *            the introspected table
115      */
116     void initialized(IntrospectedTable introspectedTable);
117 
118     /**
119      * This method is called after all the setXXX methods are called, but before
120      * any other method is called. This allows the plugin to determine whether
121      * it can run or not. For example, if the plugin requires certain properties
122      * to be set, and the properties are not set, then the plugin is invalid and
123      * will not run.
124      * 
125      * @param warnings
126      *            add strings to this list to specify warnings. For example, if
127      *            the plugin is invalid, you should specify why. Warnings are
128      *            reported to users after the completion of the run.
129      * @return true if the plugin is in a valid state. Invalid plugins will not
130      *         be called
131      */
132     boolean validate(List<String> warnings);
133 
134     /**
135      * This method can be used to generate any additional Java file needed by
136      * your implementation. This method is called once, after all other Java
137      * files have been generated.
138      * 
139      * @return a List of GeneratedJavaFiles - these files will be saved
140      *         with the other files from this run.
141      */
142     List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles();
143 
144     /**
145      * This method can be used to generate additional Java files needed by your
146      * implementation that might be related to a specific table. This method is
147      * called once for every table in the configuration.
148      * 
149      * @param introspectedTable
150      *            The class containing information about the table as
151      *            introspected from the database
152      * @return a List of GeneratedJavaFiles - these files will be saved
153      *         with the other files from this run.
154      */
155     List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles(
156             IntrospectedTable introspectedTable);
157 
158     /**
159      * This method can be used to generate any additional XML file needed by
160      * your implementation. This method is called once, after all other XML
161      * files have been generated.
162      * 
163      * @return a List of GeneratedXmlFiles - these files will be saved
164      *         with the other files from this run.
165      */
166     List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles();
167 
168     /**
169      * This method can be used to generate additional XML files needed by your
170      * implementation that might be related to a specific table. This method is
171      * called once for every table in the configuration.
172      * 
173      * @param introspectedTable
174      *            The class containing information about the table as
175      *            introspected from the database
176      * @return a List of GeneratedXmlFiles - these files will be saved
177      *         with the other files from this run.
178      */
179     List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles(
180             IntrospectedTable introspectedTable);
181 
182     /**
183      * This method is called when the entire client has been generated.
184      * Implement this method to add additional methods or fields to a generated
185      * client interface or implementation.
186      * 
187      * @param interfaze
188      *            the generated interface if any, may be null
189      * @param topLevelClass
190      *            the generated implementation class if any, may be null
191      * @param introspectedTable
192      *            The class containing information about the table as
193      *            introspected from the database
194      * @return true if the interface should be generated, false if the generated
195      *         interface should be ignored. In the case of multiple plugins, the
196      *         first plugin returning false will disable the calling of further
197      *         plugins.
198      */
199     boolean clientGenerated(Interface interfaze, TopLevelClass topLevelClass,
200             IntrospectedTable introspectedTable);
201 
202     /**
203      * This method is called when the countByExample method has been generated
204      * in the client implementation class.
205      * 
206      * @param method
207      *            the generated countByExample method
208      * @param topLevelClass
209      *            the partially implemented client implementation class. You can
210      *            add additional imported classes to the implementation class if
211      *            necessary.
212      * @param introspectedTable
213      *            The class containing information about the table as
214      *            introspected from the database
215      * @return true if the method should be generated, false if the generated
216      *         method should be ignored. In the case of multiple plugins, the
217      *         first plugin returning false will disable the calling of further
218      *         plugins.
219      */
220     boolean clientCountByExampleMethodGenerated(Method method,
221             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
222 
223     /**
224      * This method is called when the deleteByExample method has been generated
225      * in the client implementation class.
226      * 
227      * @param method
228      *            the generated deleteByExample method
229      * @param topLevelClass
230      *            the partially implemented client implementation class. You can
231      *            add additional imported classes to the implementation class if
232      *            necessary.
233      * @param introspectedTable
234      *            The class containing information about the table as
235      *            introspected from the database
236      * @return true if the method should be generated, false if the generated
237      *         method should be ignored. In the case of multiple plugins, the
238      *         first plugin returning false will disable the calling of further
239      *         plugins.
240      */
241     boolean clientDeleteByExampleMethodGenerated(Method method,
242             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
243 
244     /**
245      * This method is called when the deleteByPrimaryKey method has been
246      * generated in the client implementation class.
247      * 
248      * @param method
249      *            the generated deleteByPrimaryKey method
250      * @param topLevelClass
251      *            the partially implemented client implementation class. You can
252      *            add additional imported classes to the implementation class if
253      *            necessary.
254      * @param introspectedTable
255      *            The class containing information about the table as
256      *            introspected from the database
257      * @return true if the method should be generated, false if the generated
258      *         method should be ignored. In the case of multiple plugins, the
259      *         first plugin returning false will disable the calling of further
260      *         plugins.
261      */
262     boolean clientDeleteByPrimaryKeyMethodGenerated(Method method,
263             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
264 
265     /**
266      * This method is called when the insert method has been generated in the
267      * client implementation class.
268      * 
269      * @param method
270      *            the generated insert method
271      * @param topLevelClass
272      *            the partially implemented client implementation class. You can
273      *            add additional imported classes to the implementation class if
274      *            necessary.
275      * @param introspectedTable
276      *            The class containing information about the table as
277      *            introspected from the database
278      * @return true if the method should be generated, false if the generated
279      *         method should be ignored. In the case of multiple plugins, the
280      *         first plugin returning false will disable the calling of further
281      *         plugins.
282      */
283     boolean clientInsertMethodGenerated(Method method,
284             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
285 
286     /**
287      * This method is called when the insert selective method has been generated
288      * in the client implementation class.
289      * 
290      * @param method
291      *            the generated insert method
292      * @param topLevelClass
293      *            the partially implemented client implementation class. You can
294      *            add additional imported classes to the implementation class if
295      *            necessary.
296      * @param introspectedTable
297      *            The class containing information about the table as
298      *            introspected from the database
299      * @return true if the method should be generated, false if the generated
300      *         method should be ignored. In the case of multiple plugins, the
301      *         first plugin returning false will disable the calling of further
302      *         plugins.
303      */
304     boolean clientInsertSelectiveMethodGenerated(Method method,
305             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
306 
307     /**
308      * This method is called when the selectByExampleWithBLOBs method has been
309      * generated in the client implementation class.
310      * 
311      * @param method
312      *            the generated selectByExampleWithBLOBs method
313      * @param topLevelClass
314      *            the partially implemented client implementation class. You can
315      *            add additional imported classes to the implementation class if
316      *            necessary.
317      * @param introspectedTable
318      *            The class containing information about the table as
319      *            introspected from the database
320      * @return true if the method should be generated, false if the generated
321      *         method should be ignored. In the case of multiple plugins, the
322      *         first plugin returning false will disable the calling of further
323      *         plugins.
324      */
325     boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
326             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
327 
328     /**
329      * This method is called when the selectByExampleWithoutBLOBs method has
330      * been generated in the client implementation class.
331      * 
332      * @param method
333      *            the generated selectByExampleWithoutBLOBs method
334      * @param topLevelClass
335      *            the partially implemented client implementation class. You can
336      *            add additional imported classes to the implementation class if
337      *            necessary.
338      * @param introspectedTable
339      *            The class containing information about the table as
340      *            introspected from the database
341      * @return true if the method should be generated, false if the generated
342      *         method should be ignored. In the case of multiple plugins, the
343      *         first plugin returning false will disable the calling of further
344      *         plugins.
345      */
346     boolean clientSelectByExampleWithoutBLOBsMethodGenerated(Method method,
347             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
348 
349     /**
350      * This method is called when the selectByPrimaryKey method has been
351      * generated in the client implementation class.
352      * 
353      * @param method
354      *            the generated selectByPrimaryKey method
355      * @param topLevelClass
356      *            the partially implemented client implementation class. You can
357      *            add additional imported classes to the implementation class if
358      *            necessary.
359      * @param introspectedTable
360      *            The class containing information about the table as
361      *            introspected from the database
362      * @return true if the method should be generated, false if the generated
363      *         method should be ignored. In the case of multiple plugins, the
364      *         first plugin returning false will disable the calling of further
365      *         plugins.
366      */
367     boolean clientSelectByPrimaryKeyMethodGenerated(Method method,
368             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
369 
370     /**
371      * This method is called when the updateByExampleSelective method has been
372      * generated in the client implementation class.
373      * 
374      * @param method
375      *            the generated updateByExampleSelective method
376      * @param topLevelClass
377      *            the partially implemented client implementation class. You can
378      *            add additional imported classes to the implementation class if
379      *            necessary.
380      * @param introspectedTable
381      *            The class containing information about the table as
382      *            introspected from the database
383      * @return true if the method should be generated, false if the generated
384      *         method should be ignored. In the case of multiple plugins, the
385      *         first plugin returning false will disable the calling of further
386      *         plugins.
387      */
388     boolean clientUpdateByExampleSelectiveMethodGenerated(Method method,
389             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
390 
391     /**
392      * This method is called when the updateByExampleWithBLOBs method has been
393      * generated in the client implementation class.
394      * 
395      * @param method
396      *            the generated updateByExampleWithBLOBs method
397      * @param topLevelClass
398      *            the partially implemented client implementation class. You can
399      *            add additional imported classes to the implementation class if
400      *            necessary.
401      * @param introspectedTable
402      *            The class containing information about the table as
403      *            introspected from the database
404      * @return true if the method should be generated, false if the generated
405      *         method should be ignored. In the case of multiple plugins, the
406      *         first plugin returning false will disable the calling of further
407      *         plugins.
408      */
409     boolean clientUpdateByExampleWithBLOBsMethodGenerated(Method method,
410             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
411 
412     /**
413      * This method is called when the updateByExampleWithoutBLOBs method has
414      * been generated in the client implementation class.
415      * 
416      * @param method
417      *            the generated updateByExampleWithoutBLOBs method
418      * @param topLevelClass
419      *            the partially implemented client implementation class. You can
420      *            add additional imported classes to the implementation class if
421      *            necessary.
422      * @param introspectedTable
423      *            The class containing information about the table as
424      *            introspected from the database
425      * @return true if the method should be generated, false if the generated
426      *         method should be ignored. In the case of multiple plugins, the
427      *         first plugin returning false will disable the calling of further
428      *         plugins.
429      */
430     boolean clientUpdateByExampleWithoutBLOBsMethodGenerated(Method method,
431             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
432 
433     /**
434      * This method is called when the updateByPrimaryKeySelective method has
435      * been generated in the client implementation class.
436      * 
437      * @param method
438      *            the generated updateByPrimaryKeySelective method
439      * @param topLevelClass
440      *            the partially implemented client implementation class. You can
441      *            add additional imported classes to the implementation class if
442      *            necessary.
443      * @param introspectedTable
444      *            The class containing information about the table as
445      *            introspected from the database
446      * @return true if the method should be generated, false if the generated
447      *         method should be ignored. In the case of multiple plugins, the
448      *         first plugin returning false will disable the calling of further
449      *         plugins.
450      */
451     boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method,
452             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
453 
454     /**
455      * This method is called when the updateByPrimaryKeyWithBLOBs method has
456      * been generated in the client implementation class.
457      * 
458      * @param method
459      *            the generated updateByPrimaryKeyWithBLOBs method
460      * @param topLevelClass
461      *            the partially implemented client implementation class. You can
462      *            add additional imported classes to the implementation class if
463      *            necessary.
464      * @param introspectedTable
465      *            The class containing information about the table as
466      *            introspected from the database
467      * @return true if the method should be generated, false if the generated
468      *         method should be ignored. In the case of multiple plugins, the
469      *         first plugin returning false will disable the calling of further
470      *         plugins.
471      */
472     boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method,
473             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
474 
475     /**
476      * This method is called when the updateByPrimaryKeyWithoutBLOBs method has
477      * been generated in the client implementation class.
478      * 
479      * @param method
480      *            the generated updateByPrimaryKeyWithBLOBs method
481      * @param topLevelClass
482      *            the partially implemented client implementation class. You can
483      *            add additional imported classes to the implementation class if
484      *            necessary.
485      * @param introspectedTable
486      *            The class containing information about the table as
487      *            introspected from the database
488      * @return true if the method should be generated, false if the generated
489      *         method should be ignored. In the case of multiple plugins, the
490      *         first plugin returning false will disable the calling of further
491      *         plugins.
492      */
493     boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method,
494             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
495 
496     /**
497      * This method is called when the countByExample method has been generated
498      * in the client interface.
499      * 
500      * @param method
501      *            the generated countByExample method
502      * @param interfaze
503      *            the partially implemented client interface. You can add
504      *            additional imported classes to the interface if
505      *            necessary.
506      * @param introspectedTable
507      *            The class containing information about the table as
508      *            introspected from the database
509      * @return true if the method should be generated, false if the generated
510      *         method should be ignored. In the case of multiple plugins, the
511      *         first plugin returning false will disable the calling of further
512      *         plugins.
513      */
514     boolean clientCountByExampleMethodGenerated(Method method,
515             Interface interfaze, IntrospectedTable introspectedTable);
516 
517     /**
518      * This method is called when the deleteByExample method has been generated
519      * in the client interface.
520      * 
521      * @param method
522      *            the generated deleteByExample method
523      * @param interfaze
524      *            the partially implemented client interface. You can add
525      *            additional imported classes to the interface if
526      *            necessary.
527      * @param introspectedTable
528      *            The class containing information about the table as
529      *            introspected from the database
530      * @return true if the method should be generated, false if the generated
531      *         method should be ignored. In the case of multiple plugins, the
532      *         first plugin returning false will disable the calling of further
533      *         plugins.
534      */
535     boolean clientDeleteByExampleMethodGenerated(Method method,
536             Interface interfaze, IntrospectedTable introspectedTable);
537 
538     /**
539      * This method is called when the deleteByPrimaryKey method has been
540      * generated in the client interface.
541      * 
542      * @param method
543      *            the generated deleteByPrimaryKey method
544      * @param interfaze
545      *            the partially implemented client interface. You can add
546      *            additional imported classes to the interface if
547      *            necessary.
548      * @param introspectedTable
549      *            The class containing information about the table as
550      *            introspected from the database
551      * @return true if the method should be generated, false if the generated
552      *         method should be ignored. In the case of multiple plugins, the
553      *         first plugin returning false will disable the calling of further
554      *         plugins.
555      */
556     boolean clientDeleteByPrimaryKeyMethodGenerated(Method method,
557             Interface interfaze, IntrospectedTable introspectedTable);
558 
559     /**
560      * This method is called when the insert method has been generated in the
561      * client interface.
562      * 
563      * @param method
564      *            the generated insert method
565      * @param interfaze
566      *            the partially implemented client interface. You can add
567      *            additional imported classes to the interface if
568      *            necessary.
569      * @param introspectedTable
570      *            The class containing information about the table as
571      *            introspected from the database
572      * @return true if the method should be generated, false if the generated
573      *         method should be ignored. In the case of multiple plugins, the
574      *         first plugin returning false will disable the calling of further
575      *         plugins.
576      */
577     boolean clientInsertMethodGenerated(Method method, Interface interfaze,
578             IntrospectedTable introspectedTable);
579 
580     /**
581      * This method is called when the insert selective method has been generated
582      * in the client interface.
583      * 
584      * @param method
585      *            the generated insert method
586      * @param interfaze
587      *            the partially implemented client interface. You can add
588      *            additional imported classes to the interface if
589      *            necessary.
590      * @param introspectedTable
591      *            The class containing information about the table as
592      *            introspected from the database
593      * @return true if the method should be generated, false if the generated
594      *         method should be ignored. In the case of multiple plugins, the
595      *         first plugin returning false will disable the calling of further
596      *         plugins.
597      */
598     boolean clientInsertSelectiveMethodGenerated(Method method,
599             Interface interfaze, IntrospectedTable introspectedTable);
600 
601     /**
602      * This method is called when the selectAll method has been
603      * generated in the client interface.  This method is only generated by
604      * the simple runtime.
605      * 
606      * @param method
607      *            the generated selectAll method
608      * @param interfaze
609      *            the partially implemented client interface. You can add
610      *            additional imported classes to the interface if
611      *            necessary.
612      * @param introspectedTable
613      *            The class containing information about the table as
614      *            introspected from the database
615      * @return true if the method should be generated, false if the generated
616      *         method should be ignored. In the case of multiple plugins, the
617      *         first plugin returning false will disable the calling of further
618      *         plugins.
619      */
620     boolean clientSelectAllMethodGenerated(Method method,
621             Interface interfaze, IntrospectedTable introspectedTable);
622 
623     /**
624      * This method is called when the selectAll method has been
625      * generated in the client implementation class.
626      * 
627      * @param method
628      *            the generated selectAll method
629      * @param topLevelClass
630      *            the partially implemented client implementation class. You can
631      *            add additional imported classes to the implementation class if
632      *            necessary.
633      * @param introspectedTable
634      *            The class containing information about the table as
635      *            introspected from the database
636      * @return true if the method should be generated, false if the generated
637      *         method should be ignored. In the case of multiple plugins, the
638      *         first plugin returning false will disable the calling of further
639      *         plugins.
640      */
641     boolean clientSelectAllMethodGenerated(Method method,
642             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
643     
644     /**
645      * This method is called when the selectByExampleWithBLOBs method has been
646      * generated in the client interface.
647      * 
648      * @param method
649      *            the generated selectByExampleWithBLOBs method
650      * @param interfaze
651      *            the partially implemented client interface. You can add
652      *            additional imported classes to the interface if
653      *            necessary.
654      * @param introspectedTable
655      *            The class containing information about the table as
656      *            introspected from the database
657      * @return true if the method should be generated, false if the generated
658      *         method should be ignored. In the case of multiple plugins, the
659      *         first plugin returning false will disable the calling of further
660      *         plugins.
661      */
662     boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
663             Interface interfaze, IntrospectedTable introspectedTable);
664 
665     /**
666      * This method is called when the selectByExampleWithoutBLOBs method has
667      * been generated in the client interface.
668      * 
669      * @param method
670      *            the generated selectByExampleWithoutBLOBs method
671      * @param interfaze
672      *            the partially implemented client interface. You can add
673      *            additional imported classes to the interface if
674      *            necessary.
675      * @param introspectedTable
676      *            The class containing information about the table as
677      *            introspected from the database
678      * @return true if the method should be generated, false if the generated
679      *         method should be ignored. In the case of multiple plugins, the
680      *         first plugin returning false will disable the calling of further
681      *         plugins.
682      */
683     boolean clientSelectByExampleWithoutBLOBsMethodGenerated(Method method,
684             Interface interfaze, IntrospectedTable introspectedTable);
685 
686     /**
687      * This method is called when the selectByPrimaryKey method has been
688      * generated in the client interface.
689      * 
690      * @param method
691      *            the generated selectByPrimaryKey method
692      * @param interfaze
693      *            the partially implemented client interface. You can add
694      *            additional imported classes to the interface if
695      *            necessary.
696      * @param introspectedTable
697      *            The class containing information about the table as
698      *            introspected from the database
699      * @return true if the method should be generated, false if the generated
700      *         method should be ignored. In the case of multiple plugins, the
701      *         first plugin returning false will disable the calling of further
702      *         plugins.
703      */
704     boolean clientSelectByPrimaryKeyMethodGenerated(Method method,
705             Interface interfaze, IntrospectedTable introspectedTable);
706 
707     /**
708      * This method is called when the updateByExampleSelective method has been
709      * generated in the client interface.
710      * 
711      * @param method
712      *            the generated updateByExampleSelective method
713      * @param interfaze
714      *            the partially implemented client interface. You can add
715      *            additional imported classes to the interface if
716      *            necessary.
717      * @param introspectedTable
718      *            The class containing information about the table as
719      *            introspected from the database
720      * @return true if the method should be generated, false if the generated
721      *         method should be ignored. In the case of multiple plugins, the
722      *         first plugin returning false will disable the calling of further
723      *         plugins.
724      */
725     boolean clientUpdateByExampleSelectiveMethodGenerated(Method method,
726             Interface interfaze, IntrospectedTable introspectedTable);
727 
728     /**
729      * This method is called when the updateByExampleWithBLOBs method has been
730      * generated in the client interface.
731      * 
732      * @param method
733      *            the generated updateByExampleWithBLOBs method
734      * @param interfaze
735      *            the partially implemented client interface. You can add
736      *            additional imported classes to the interface if
737      *            necessary.
738      * @param introspectedTable
739      *            The class containing information about the table as
740      *            introspected from the database
741      * @return true if the method should be generated, false if the generated
742      *         method should be ignored. In the case of multiple plugins, the
743      *         first plugin returning false will disable the calling of further
744      *         plugins.
745      */
746     boolean clientUpdateByExampleWithBLOBsMethodGenerated(Method method,
747             Interface interfaze, IntrospectedTable introspectedTable);
748 
749     /**
750      * This method is called when the updateByExampleWithoutBLOBs method has
751      * been generated in the client interface.
752      * 
753      * @param method
754      *            the generated updateByExampleWithoutBLOBs method
755      * @param interfaze
756      *            the partially implemented client interface. You can add
757      *            additional imported classes to the interface if
758      *            necessary.
759      * @param introspectedTable
760      *            The class containing information about the table as
761      *            introspected from the database
762      * @return true if the method should be generated, false if the generated
763      *         method should be ignored. In the case of multiple plugins, the
764      *         first plugin returning false will disable the calling of further
765      *         plugins.
766      */
767     boolean clientUpdateByExampleWithoutBLOBsMethodGenerated(Method method,
768             Interface interfaze, IntrospectedTable introspectedTable);
769 
770     /**
771      * This method is called when the updateByPrimaryKeySelective method has
772      * been generated in the client interface.
773      * 
774      * @param method
775      *            the generated updateByPrimaryKeySelective method
776      * @param interfaze
777      *            the partially implemented client interface. You can add
778      *            additional imported classes to the interface if
779      *            necessary.
780      * @param introspectedTable
781      *            The class containing information about the table as
782      *            introspected from the database
783      * @return true if the method should be generated, false if the generated
784      *         method should be ignored. In the case of multiple plugins, the
785      *         first plugin returning false will disable the calling of further
786      *         plugins.
787      */
788     boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method,
789             Interface interfaze, IntrospectedTable introspectedTable);
790 
791     /**
792      * This method is called when the updateByPrimaryKeyWithBLOBs method has
793      * been generated in the client interface.
794      * 
795      * @param method
796      *            the generated updateByPrimaryKeyWithBLOBs method
797      * @param interfaze
798      *            the partially implemented client interface. You can add
799      *            additional imported classes to the interface if
800      *            necessary.
801      * @param introspectedTable
802      *            The class containing information about the table as
803      *            introspected from the database
804      * @return true if the method should be generated, false if the generated
805      *         method should be ignored. In the case of multiple plugins, the
806      *         first plugin returning false will disable the calling of further
807      *         plugins.
808      */
809     boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method,
810             Interface interfaze, IntrospectedTable introspectedTable);
811 
812     /**
813      * This method is called when the updateByPrimaryKeyWithoutBLOBs method has
814      * been generated in the client interface.
815      * 
816      * @param method
817      *            the generated updateByPrimaryKeyWithoutBLOBs method
818      * @param interfaze
819      *            the partially implemented client interface. You can add
820      *            additional imported classes to the interface if
821      *            necessary.
822      * @param introspectedTable
823      *            The class containing information about the table as
824      *            introspected from the database
825      * @return true if the method should be generated, false if the generated
826      *         method should be ignored. In the case of multiple plugins, the
827      *         first plugin returning false will disable the calling of further
828      *         plugins.
829      */
830     boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method,
831             Interface interfaze, IntrospectedTable introspectedTable);
832 
833     /**
834      * This method is called after the field is generated for a specific column
835      * in a table.
836      * 
837      * @param field
838      *            the field generated for the specified column
839      * @param topLevelClass
840      *            the partially implemented model class. You can add additional
841      *            imported classes to the implementation class if necessary.
842      * @param introspectedColumn
843      *            The class containing information about the column related
844      *            to this field as introspected from the database
845      * @param introspectedTable
846      *            The class containing information about the table as
847      *            introspected from the database
848      * @param modelClassType
849      *            the type of class that the field is generated for
850      * @return true if the field should be generated, false if the generated
851      *         field should be ignored. In the case of multiple plugins, the
852      *         first plugin returning false will disable the calling of further
853      *         plugins.
854      */
855     boolean modelFieldGenerated(Field field, TopLevelClass topLevelClass,
856             IntrospectedColumn introspectedColumn,
857             IntrospectedTable introspectedTable, ModelClassType modelClassType);
858 
859     /**
860      * This method is called after the getter, or accessor, method is generated
861      * for a specific column in a table.
862      * 
863      * @param method
864      *            the getter, or accessor, method generated for the specified
865      *            column
866      * @param topLevelClass
867      *            the partially implemented model class. You can add additional
868      *            imported classes to the implementation class if necessary.
869      * @param introspectedColumn
870      *            The class containing information about the column related
871      *            to this field as introspected from the database
872      * @param introspectedTable
873      *            The class containing information about the table as
874      *            introspected from the database
875      * @param modelClassType
876      *            the type of class that the field is generated for
877      * @return true if the method should be generated, false if the generated
878      *         method should be ignored. In the case of multiple plugins, the
879      *         first plugin returning false will disable the calling of further
880      *         plugins.
881      */
882     boolean modelGetterMethodGenerated(Method method,
883             TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn,
884             IntrospectedTable introspectedTable, ModelClassType modelClassType);
885 
886     /**
887      * This method is called after the setter, or mutator, method is generated
888      * for a specific column in a table.
889      * 
890      * @param method
891      *            the setter, or mutator, method generated for the specified
892      *            column
893      * @param topLevelClass
894      *            the partially implemented model class. You can add additional
895      *            imported classes to the implementation class if necessary.
896      * @param introspectedColumn
897      *            The class containing information about the column related
898      *            to this field as introspected from the database
899      * @param introspectedTable
900      *            The class containing information about the table as
901      *            introspected from the database
902      * @param modelClassType
903      *            the type of class that the field is generated for
904      * @return true if the method should be generated, false if the generated
905      *         method should be ignored. In the case of multiple plugins, the
906      *         first plugin returning false will disable the calling of further
907      *         plugins.
908      */
909     boolean modelSetterMethodGenerated(Method method,
910             TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn,
911             IntrospectedTable introspectedTable, ModelClassType modelClassType);
912 
913     /**
914      * This method is called after the primary key class is generated by the
915      * JavaModelGenerator. This method will only be called if
916      * the table rules call for generation of a primary key class.
917      * <br><br>
918      * This method is only guaranteed to be called by the Java
919      * model generators. Other user supplied generators may, or may not, call
920      * this method.
921      * 
922      * @param topLevelClass
923      *            the generated primary key class
924      * @param introspectedTable
925      *            The class containing information about the table as
926      *            introspected from the database
927      * @return true if the class should be generated, false if the generated
928      *         class should be ignored. In the case of multiple plugins, the
929      *         first plugin returning false will disable the calling of further
930      *         plugins.
931      */
932     boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass,
933             IntrospectedTable introspectedTable);
934 
935     /**
936      * This method is called after the base record class is generated by the
937      * JavaModelGenerator. This method will only be called if
938      * the table rules call for generation of a base record class.
939      * <br><br>
940      * This method is only guaranteed to be called by the default Java
941      * model generators. Other user supplied generators may, or may not, call
942      * this method.
943      * 
944      * @param topLevelClass
945      *            the generated base record class
946      * @param introspectedTable
947      *            The class containing information about the table as
948      *            introspected from the database
949      * @return true if the class should be generated, false if the generated
950      *         class should be ignored. In the case of multiple plugins, the
951      *         first plugin returning false will disable the calling of further
952      *         plugins.
953      */
954     boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass,
955             IntrospectedTable introspectedTable);
956 
957     /**
958      * This method is called after the record with BLOBs class is generated by
959      * the JavaModelGenerator. This method will only be called
960      * if the table rules call for generation of a record with BLOBs class.
961      * <br><br>
962      * This method is only guaranteed to be called by the default Java
963      * model generators. Other user supplied generators may, or may not, call
964      * this method.
965      * 
966      * @param topLevelClass
967      *            the generated record with BLOBs class
968      * @param introspectedTable
969      *            The class containing information about the table as
970      *            introspected from the database
971      * @return true if the class should be generated, false if the generated
972      *         class should be ignored. In the case of multiple plugins, the
973      *         first plugin returning false will disable the calling of further
974      *         plugins.
975      */
976     boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass,
977             IntrospectedTable introspectedTable);
978 
979     /**
980      * This method is called after the example class is generated by the 
981      * JavaModelGenerator. This method will only be called if the table
982      * rules call for generation of an example class.
983      * <br><br>
984      * This method is only guaranteed to be called by the default Java
985      * model generators. Other user supplied generators may, or may not, call
986      * this method.
987      * 
988      * @param topLevelClass
989      *            the generated example class
990      * @param introspectedTable
991      *            The class containing information about the table as
992      *            introspected from the database
993      * @return true if the class should be generated, false if the generated
994      *         class should be ignored. In the case of multiple plugins, the
995      *         first plugin returning false will disable the calling of further
996      *         plugins.
997      */
998     boolean modelExampleClassGenerated(TopLevelClass topLevelClass,
999             IntrospectedTable introspectedTable);
1000 
1001     /**
1002      * This method is called when the SqlMap file has been generated.
1003      * 
1004      * @param sqlMap
1005      *            the generated file (containing the file name, package name,
1006      *            and project name)
1007      * @param introspectedTable
1008      *            The class containing information about the table as
1009      *            introspected from the database
1010      * @return true if the sqlMap should be generated, false if the generated
1011      *         sqlMap should be ignored. In the case of multiple plugins, the
1012      *         first plugin returning false will disable the calling of further
1013      *         plugins.
1014      */
1015     boolean sqlMapGenerated(GeneratedXmlFile sqlMap,
1016             IntrospectedTable introspectedTable);
1017 
1018     /**
1019      * This method is called when the SqlMap document has been generated. This
1020      * method can be used to add additional XML elements the the generated
1021      * document.
1022      * 
1023      * @param document
1024      *            the generated document (note that this is the MyBatis generator's internal
1025      *            Document class - not the w3c XML Document class)
1026      * @param introspectedTable
1027      *            The class containing information about the table as
1028      *            introspected from the database
1029      * @return true if the document should be generated, false if the generated
1030      *         document should be ignored. In the case of multiple plugins, the
1031      *         first plugin returning false will disable the calling of further
1032      *         plugins. Also, if any plugin returns false, then the
1033      *         <tt>sqlMapGenerated</tt> method will not be called.
1034      */
1035     boolean sqlMapDocumentGenerated(Document document,
1036             IntrospectedTable introspectedTable);
1037 
1038     /**
1039      * This method is called when the base resultMap is generated.
1040      * 
1041      * @param element
1042      *            the generated &lt;resultMap&gt; element
1043      * @param introspectedTable
1044      *            The class containing information about the table as
1045      *            introspected from the database
1046      * @return true if the element should be generated, false if the generated
1047      *         element should be ignored. In the case of multiple plugins, the
1048      *         first plugin returning false will disable the calling of further
1049      *         plugins.
1050      */
1051     boolean sqlMapResultMapWithoutBLOBsElementGenerated(XmlElement element,
1052             IntrospectedTable introspectedTable);
1053 
1054     /**
1055      * This method is called when the countByExample element is generated.
1056      * 
1057      * @param element
1058      *            the generated &lt;select&gt; element
1059      * @param introspectedTable
1060      *            The class containing information about the table as
1061      *            introspected from the database
1062      * @return true if the element should be generated, false if the generated
1063      *         element should be ignored. In the case of multiple plugins, the
1064      *         first plugin returning false will disable the calling of further
1065      *         plugins.
1066      */
1067     boolean sqlMapCountByExampleElementGenerated(XmlElement element,
1068             IntrospectedTable introspectedTable);
1069 
1070     /**
1071      * This method is called when the deleteByExample element is generated.
1072      * 
1073      * @param element
1074      *            the generated &lt;delete&gt; element
1075      * @param introspectedTable
1076      *            The class containing information about the table as
1077      *            introspected from the database
1078      * @return true if the element should be generated, false if the generated
1079      *         element should be ignored. In the case of multiple plugins, the
1080      *         first plugin returning false will disable the calling of further
1081      *         plugins.
1082      */
1083     boolean sqlMapDeleteByExampleElementGenerated(XmlElement element,
1084             IntrospectedTable introspectedTable);
1085 
1086     /**
1087      * This method is called when the deleteByPrimaryKey element is generated.
1088      * 
1089      * @param element
1090      *            the generated &lt;delete&gt; element
1091      * @param introspectedTable
1092      *            The class containing information about the table as
1093      *            introspected from the database
1094      * @return true if the element should be generated, false if the generated
1095      *         element should be ignored. In the case of multiple plugins, the
1096      *         first plugin returning false will disable the calling of further
1097      *         plugins.
1098      */
1099     boolean sqlMapDeleteByPrimaryKeyElementGenerated(XmlElement element,
1100             IntrospectedTable introspectedTable);
1101 
1102     /**
1103      * This method is called when the exampleWhereClause element is generated.
1104      * 
1105      * @param element
1106      *            the generated &lt;sql&gt; element
1107      * @param introspectedTable
1108      *            The class containing information about the table as
1109      *            introspected from the database
1110      * @return true if the element should be generated, false if the generated
1111      *         element should be ignored. In the case of multiple plugins, the
1112      *         first plugin returning false will disable the calling of further
1113      *         plugins.
1114      */
1115     boolean sqlMapExampleWhereClauseElementGenerated(XmlElement element,
1116             IntrospectedTable introspectedTable);
1117 
1118     /**
1119      * This method is called when the baseColumnList element is generated.
1120      * 
1121      * @param element
1122      *            the generated &lt;sql&gt; element
1123      * @param introspectedTable
1124      *            The class containing information about the table as
1125      *            introspected from the database
1126      * @return true if the element should be generated, false if the generated
1127      *         element should be ignored. In the case of multiple plugins, the
1128      *         first plugin returning false will disable the calling of further
1129      *         plugins.
1130      */
1131     boolean sqlMapBaseColumnListElementGenerated(XmlElement element,
1132             IntrospectedTable introspectedTable);
1133 
1134     /**
1135      * This method is called when the blobColumnList element is generated.
1136      * 
1137      * @param element
1138      *            the generated &lt;sql&gt; element
1139      * @param introspectedTable
1140      *            The class containing information about the table as
1141      *            introspected from the database
1142      * @return true if the element should be generated, false if the generated
1143      *         element should be ignored. In the case of multiple plugins, the
1144      *         first plugin returning false will disable the calling of further
1145      *         plugins.
1146      */
1147     boolean sqlMapBlobColumnListElementGenerated(XmlElement element,
1148             IntrospectedTable introspectedTable);
1149 
1150     /**
1151      * This method is called when the insert element is generated.
1152      * 
1153      * @param element
1154      *            the generated &lt;insert&gt; element
1155      * @param introspectedTable
1156      *            The class containing information about the table as
1157      *            introspected from the database
1158      * @return true if the element should be generated, false if the generated
1159      *         element should be ignored. In the case of multiple plugins, the
1160      *         first plugin returning false will disable the calling of further
1161      *         plugins.
1162      */
1163     boolean sqlMapInsertElementGenerated(XmlElement element,
1164             IntrospectedTable introspectedTable);
1165 
1166     /**
1167      * This method is called when the insert selective element is generated.
1168      * 
1169      * @param element
1170      *            the generated &lt;insert&gt; element
1171      * @param introspectedTable
1172      *            The class containing information about the table as
1173      *            introspected from the database
1174      * @return true if the element should be generated, false if the generated
1175      *         element should be ignored. In the case of multiple plugins, the
1176      *         first plugin returning false will disable the calling of further
1177      *         plugins.
1178      */
1179     boolean sqlMapInsertSelectiveElementGenerated(XmlElement element,
1180             IntrospectedTable introspectedTable);
1181 
1182     /**
1183      * This method is called when the resultMap with BLOBs element is generated
1184      * - this resultMap will extend the base resultMap.
1185      * 
1186      * @param element
1187      *            the generated &lt;resultMap&gt; element
1188      * @param introspectedTable
1189      *            The class containing information about the table as
1190      *            introspected from the database
1191      * @return true if the element should be generated, false if the generated
1192      *         element should be ignored. In the case of multiple plugins, the
1193      *         first plugin returning false will disable the calling of further
1194      *         plugins.
1195      */
1196     boolean sqlMapResultMapWithBLOBsElementGenerated(XmlElement element,
1197             IntrospectedTable introspectedTable);
1198 
1199     /**
1200      * This method is called when the selectAll element is generated.
1201      * 
1202      * @param element
1203      *            the generated &lt;select&gt; element
1204      * @param introspectedTable
1205      *            The class containing information about the table as
1206      *            introspected from the database
1207      * @return true if the element should be generated, false if the generated
1208      *         element should be ignored. In the case of multiple plugins, the
1209      *         first plugin returning false will disable the calling of further
1210      *         plugins.
1211      */
1212     boolean sqlMapSelectAllElementGenerated(XmlElement element,
1213             IntrospectedTable introspectedTable);
1214 
1215     /**
1216      * This method is called when the selectByPrimaryKey element is generated.
1217      * 
1218      * @param element
1219      *            the generated &lt;select&gt; element
1220      * @param introspectedTable
1221      *            The class containing information about the table as
1222      *            introspected from the database
1223      * @return true if the element should be generated, false if the generated
1224      *         element should be ignored. In the case of multiple plugins, the
1225      *         first plugin returning false will disable the calling of further
1226      *         plugins.
1227      */
1228     boolean sqlMapSelectByPrimaryKeyElementGenerated(XmlElement element,
1229             IntrospectedTable introspectedTable);
1230 
1231     /**
1232      * This method is called when the selectByExample element is generated.
1233      * 
1234      * @param element
1235      *            the generated &lt;select&gt; element
1236      * @param introspectedTable
1237      *            The class containing information about the table as
1238      *            introspected from the database
1239      * @return true if the element should be generated, false if the generated
1240      *         element should be ignored. In the case of multiple plugins, the
1241      *         first plugin returning false will disable the calling of further
1242      *         plugins.
1243      */
1244     boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(
1245             XmlElement element, IntrospectedTable introspectedTable);
1246 
1247     /**
1248      * This method is called when the selectByExampleWithBLOBs element is
1249      * generated.
1250      * 
1251      * @param element
1252      *            the generated &lt;select&gt; element
1253      * @param introspectedTable
1254      *            The class containing information about the table as
1255      *            introspected from the database
1256      * @return true if the element should be generated, false if the generated
1257      *         element should be ignored. In the case of multiple plugins, the
1258      *         first plugin returning false will disable the calling of further
1259      *         plugins.
1260      */
1261     boolean sqlMapSelectByExampleWithBLOBsElementGenerated(XmlElement element,
1262             IntrospectedTable introspectedTable);
1263 
1264     /**
1265      * This method is called when the updateByExampleSelective element is
1266      * generated.
1267      * 
1268      * @param element
1269      *            the generated &lt;update&gt; element
1270      * @param introspectedTable
1271      *            The class containing information about the table as
1272      *            introspected from the database
1273      * @return true if the element should be generated, false if the generated
1274      *         element should be ignored. In the case of multiple plugins, the
1275      *         first plugin returning false will disable the calling of further
1276      *         plugins.
1277      */
1278     boolean sqlMapUpdateByExampleSelectiveElementGenerated(XmlElement element,
1279             IntrospectedTable introspectedTable);
1280 
1281     /**
1282      * This method is called when the updateByExampleWithBLOBs element is
1283      * generated.
1284      * 
1285      * @param element
1286      *            the generated &lt;update&gt; element
1287      * @param introspectedTable
1288      *            The class containing information about the table as
1289      *            introspected from the database
1290      * @return true if the element should be generated, false if the generated
1291      *         element should be ignored. In the case of multiple plugins, the
1292      *         first plugin returning false will disable the calling of further
1293      *         plugins.
1294      */
1295     boolean sqlMapUpdateByExampleWithBLOBsElementGenerated(XmlElement element,
1296             IntrospectedTable introspectedTable);
1297 
1298     /**
1299      * This method is called when the updateByExampleWithourBLOBs element is
1300      * generated.
1301      * 
1302      * @param element
1303      *            the generated &lt;update&gt; element
1304      * @param introspectedTable
1305      *            The class containing information about the table as
1306      *            introspected from the database
1307      * @return true if the element should be generated, false if the generated
1308      *         element should be ignored. In the case of multiple plugins, the
1309      *         first plugin returning false will disable the calling of further
1310      *         plugins.
1311      */
1312     boolean sqlMapUpdateByExampleWithoutBLOBsElementGenerated(
1313             XmlElement element, IntrospectedTable introspectedTable);
1314 
1315     /**
1316      * This method is called when the updateByPrimaryKeySelective element is
1317      * generated.
1318      * 
1319      * @param element
1320      *            the generated &lt;update&gt; element
1321      * @param introspectedTable
1322      *            The class containing information about the table as
1323      *            introspected from the database
1324      * @return true if the element should be generated, false if the generated
1325      *         element should be ignored. In the case of multiple plugins, the
1326      *         first plugin returning false will disable the calling of further
1327      *         plugins.
1328      */
1329     boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(
1330             XmlElement element, IntrospectedTable introspectedTable);
1331 
1332     /**
1333      * This method is called when the updateByPrimaryKeyWithBLOBs element is
1334      * generated.
1335      * 
1336      * @param element
1337      *            the generated &lt;update&gt; element
1338      * @param introspectedTable
1339      *            The class containing information about the table as
1340      *            introspected from the database
1341      * @return true if the element should be generated, false if the generated
1342      *         element should be ignored. In the case of multiple plugins, the
1343      *         first plugin returning false will disable the calling of further
1344      *         plugins.
1345      */
1346     boolean sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(
1347             XmlElement element, IntrospectedTable introspectedTable);
1348 
1349     /**
1350      * This method is called when the updateByPrimaryKeyWithoutBLOBs element is
1351      * generated.
1352      * 
1353      * @param element
1354      *            the generated &lt;update&gt; element
1355      * @param introspectedTable
1356      *            The class containing information about the table as
1357      *            introspected from the database
1358      * @return true if the element should be generated, false if the generated
1359      *         element should be ignored. In the case of multiple plugins, the
1360      *         first plugin returning false will disable the calling of further
1361      *         plugins.
1362      */
1363     boolean sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(
1364             XmlElement element, IntrospectedTable introspectedTable);
1365 
1366     /**
1367      * This method is called when the SQL provider has been generated.
1368      * Implement this method to add additional methods or fields to a generated
1369      * SQL provider.
1370      * 
1371      * @param topLevelClass
1372      *            the generated provider
1373      * @param introspectedTable
1374      *            The class containing information about the table as
1375      *            introspected from the database
1376      * @return true if the provider should be generated, false if the generated
1377      *         provider should be ignored. In the case of multiple plugins, the
1378      *         first plugin returning false will disable the calling of further
1379      *         plugins.
1380      */
1381     boolean providerGenerated(TopLevelClass topLevelClass,
1382             IntrospectedTable introspectedTable);
1383 
1384     /**
1385      * This method is called when the applyWhere method has
1386      * been generated in the SQL provider.
1387      * 
1388      * @param method
1389      *            the generated applyWhere method
1390      * @param topLevelClass
1391      *            the partially generated provider class
1392      *            You can add additional imported classes to the class
1393      *            if necessary.
1394      * @param introspectedTable
1395      *            The class containing information about the table as
1396      *            introspected from the database
1397      * @return true if the method should be generated, false if the generated
1398      *         method should be ignored. In the case of multiple plugins, the
1399      *         first plugin returning false will disable the calling of further
1400      *         plugins.
1401      */
1402     boolean providerApplyWhereMethodGenerated(Method method,
1403             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1404 
1405     /**
1406      * This method is called when the countByExample method has
1407      * been generated in the SQL provider.
1408      * 
1409      * @param method
1410      *            the generated countByExample method
1411      * @param topLevelClass
1412      *            the partially generated provider class
1413      *            You can add additional imported classes to the class
1414      *            if necessary.
1415      * @param introspectedTable
1416      *            The class containing information about the table as
1417      *            introspected from the database
1418      * @return true if the method should be generated, false if the generated
1419      *         method should be ignored. In the case of multiple plugins, the
1420      *         first plugin returning false will disable the calling of further
1421      *         plugins.
1422      */
1423     boolean providerCountByExampleMethodGenerated(Method method,
1424             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1425 
1426     /**
1427      * This method is called when the deleteByExample method has
1428      * been generated in the SQL provider.
1429      * 
1430      * @param method
1431      *            the generated deleteByExample method
1432      * @param topLevelClass
1433      *            the partially generated provider class
1434      *            You can add additional imported classes to the class
1435      *            if necessary.
1436      * @param introspectedTable
1437      *            The class containing information about the table as
1438      *            introspected from the database
1439      * @return true if the method should be generated, false if the generated
1440      *         method should be ignored. In the case of multiple plugins, the
1441      *         first plugin returning false will disable the calling of further
1442      *         plugins.
1443      */
1444     boolean providerDeleteByExampleMethodGenerated(Method method,
1445             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1446 
1447     /**
1448      * This method is called when the insertSelective method has
1449      * been generated in the SQL provider.
1450      * 
1451      * @param method
1452      *            the generated insertSelective method
1453      * @param topLevelClass
1454      *            the partially generated provider class
1455      *            You can add additional imported classes to the class
1456      *            if necessary.
1457      * @param introspectedTable
1458      *            The class containing information about the table as
1459      *            introspected from the database
1460      * @return true if the method should be generated, false if the generated
1461      *         method should be ignored. In the case of multiple plugins, the
1462      *         first plugin returning false will disable the calling of further
1463      *         plugins.
1464      */
1465     boolean providerInsertSelectiveMethodGenerated(Method method,
1466             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1467 
1468     /**
1469      * This method is called when the selectByExampleWithBLOBs method has
1470      * been generated in the SQL provider.
1471      * 
1472      * @param method
1473      *            the generated selectByExampleWithBLOBs method
1474      * @param topLevelClass
1475      *            the partially generated provider class
1476      *            You can add additional imported classes to the class
1477      *            if necessary.
1478      * @param introspectedTable
1479      *            The class containing information about the table as
1480      *            introspected from the database
1481      * @return true if the method should be generated, false if the generated
1482      *         method should be ignored. In the case of multiple plugins, the
1483      *         first plugin returning false will disable the calling of further
1484      *         plugins.
1485      */
1486     boolean providerSelectByExampleWithBLOBsMethodGenerated(Method method,
1487             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1488 
1489     /**
1490      * This method is called when the selectByExampleWithoutBLOBs method has
1491      * been generated in the SQL provider.
1492      * 
1493      * @param method
1494      *            the generated selectByExampleWithoutBLOBs method
1495      * @param topLevelClass
1496      *            the partially generated provider class
1497      *            You can add additional imported classes to the class
1498      *            if necessary.
1499      * @param introspectedTable
1500      *            The class containing information about the table as
1501      *            introspected from the database
1502      * @return true if the method should be generated, false if the generated
1503      *         method should be ignored. In the case of multiple plugins, the
1504      *         first plugin returning false will disable the calling of further
1505      *         plugins.
1506      */
1507     boolean providerSelectByExampleWithoutBLOBsMethodGenerated(Method method,
1508             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1509 
1510     /**
1511      * This method is called when the updateByExampleSelective method has
1512      * been generated in the SQL provider.
1513      * 
1514      * @param method
1515      *            the generated updateByExampleSelective method
1516      * @param topLevelClass
1517      *            the partially generated provider class
1518      *            You can add additional imported classes to the class
1519      *            if necessary.
1520      * @param introspectedTable
1521      *            The class containing information about the table as
1522      *            introspected from the database
1523      * @return true if the method should be generated, false if the generated
1524      *         method should be ignored. In the case of multiple plugins, the
1525      *         first plugin returning false will disable the calling of further
1526      *         plugins.
1527      */
1528     boolean providerUpdateByExampleSelectiveMethodGenerated(Method method,
1529             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1530 
1531     /**
1532      * This method is called when the updateByExampleWithBLOBs method has
1533      * been generated in the SQL provider.
1534      * 
1535      * @param method
1536      *            the generated updateByExampleWithBLOBs method
1537      * @param topLevelClass
1538      *            the partially generated provider class
1539      *            You can add additional imported classes to the class
1540      *            if necessary.
1541      * @param introspectedTable
1542      *            The class containing information about the table as
1543      *            introspected from the database
1544      * @return true if the method should be generated, false if the generated
1545      *         method should be ignored. In the case of multiple plugins, the
1546      *         first plugin returning false will disable the calling of further
1547      *         plugins.
1548      */
1549     boolean providerUpdateByExampleWithBLOBsMethodGenerated(Method method,
1550             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1551 
1552     /**
1553      * This method is called when the updateByExampleWithoutBLOBs method has
1554      * been generated in the SQL provider.
1555      * 
1556      * @param method
1557      *            the generated updateByExampleWithoutBLOBs method
1558      * @param topLevelClass
1559      *            the partially generated provider class
1560      *            You can add additional imported classes to the class
1561      *            if necessary.
1562      * @param introspectedTable
1563      *            The class containing information about the table as
1564      *            introspected from the database
1565      * @return true if the method should be generated, false if the generated
1566      *         method should be ignored. In the case of multiple plugins, the
1567      *         first plugin returning false will disable the calling of further
1568      *         plugins.
1569      */
1570     boolean providerUpdateByExampleWithoutBLOBsMethodGenerated(Method method,
1571             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1572 
1573     /**
1574      * This method is called when the updateByPrimaryKeySelective method has
1575      * been generated in the SQL provider.
1576      * 
1577      * @param method
1578      *            the generated updateByPrimaryKeySelective method
1579      * @param topLevelClass
1580      *            the partially generated provider class
1581      *            You can add additional imported classes to the class
1582      *            if necessary.
1583      * @param introspectedTable
1584      *            The class containing information about the table as
1585      *            introspected from the database
1586      * @return true if the method should be generated, false if the generated
1587      *         method should be ignored. In the case of multiple plugins, the
1588      *         first plugin returning false will disable the calling of further
1589      *         plugins.
1590      */
1591     boolean providerUpdateByPrimaryKeySelectiveMethodGenerated(Method method,
1592             TopLevelClass topLevelClass, IntrospectedTable introspectedTable);
1593 }