• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mybatis / generator / 1947

14 Jan 2026 02:31PM UTC coverage: 88.838% (+0.04%) from 88.799%
1947

push

github

web-flow
Merge pull request #1411 from mybatis/renovate/github-codeql-action-digest

Update github/codeql-action digest to cdefb33

2347 of 3184 branches covered (73.71%)

11517 of 12964 relevant lines covered (88.84%)

0.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.6
/core/mybatis-generator-core/src/main/java/org/mybatis/generator/api/Plugin.java
1
/*
2
 *    Copyright 2006-2026 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
 *       https://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.Collections;
19
import java.util.List;
20
import java.util.Properties;
21

22
import org.mybatis.generator.api.dom.java.Field;
23
import org.mybatis.generator.api.dom.java.Interface;
24
import org.mybatis.generator.api.dom.java.Method;
25
import org.mybatis.generator.api.dom.java.TopLevelClass;
26
import org.mybatis.generator.api.dom.kotlin.KotlinFile;
27
import org.mybatis.generator.api.dom.kotlin.KotlinFunction;
28
import org.mybatis.generator.api.dom.kotlin.KotlinProperty;
29
import org.mybatis.generator.api.dom.kotlin.KotlinType;
30
import org.mybatis.generator.api.dom.xml.Document;
31
import org.mybatis.generator.api.dom.xml.XmlElement;
32
import org.mybatis.generator.config.Context;
33

34
/**
35
 * This interface defines methods that will be called at different times during
36
 * the code generation process. These methods can be used to extend or modify
37
 * the generated code. Clients may implement this interface in its entirety, or
38
 * extend the PluginAdapter (highly recommended).
39
 *
40
 * <p>Plugins have a lifecycle. In general, the lifecycle is this:
41
 *
42
 * <ol>
43
 * <li>The setXXX methods are called one time</li>
44
 * <li>The validate method is called one time</li>
45
 * <li>The initialized method is called for each introspected table</li>
46
 * <li>The clientXXX methods are called for each introspected table</li>
47
 * <li>The providerXXX methods are called for each introspected table</li>
48
 * <li>The modelXXX methods are called for each introspected table</li>
49
 * <li>The sqlMapXXX methods are called for each introspected table</li>
50
 * <li>The contextGenerateAdditionalJavaFiles(IntrospectedTable) method is
51
 * called for each introspected table</li>
52
 * <li>The contextGenerateAdditionalXmlFiles(IntrospectedTable) method is called
53
 * for each introspected table</li>
54
 * <li>The contextGenerateAdditionalJavaFiles() method is called one time</li>
55
 * <li>The contextGenerateAdditionalXmlFiles() method is called one time</li>
56
 * </ol>
57
 *
58
 * <p>Plugins are related to contexts - so each context will have its own set of
59
 * plugins. If the same plugin is specified in multiple contexts, then each
60
 * context will hold a unique instance of the plugin.
61
 *
62
 * <p>Plugins are called, and initialized, in the same order they are specified in
63
 * the configuration.
64
 *
65
 * <p>The clientXXX, modelXXX, and sqlMapXXX methods are called by the code
66
 * generators. If you replace the default code generators with other
67
 * implementations, these methods may not be called.
68
 *
69
 * @author Jeff Butler
70
 *
71
 * @see PluginAdapter
72
 */
73
public interface Plugin {
74

75
    enum ModelClassType {
1✔
76
        PRIMARY_KEY,
1✔
77
        BASE_RECORD,
1✔
78
        RECORD_WITH_BLOBS
1✔
79
    }
80

81
    /**
82
     * Set the context under which this plugin is running.
83
     *
84
     * @param context
85
     *            the new context
86
     */
87
    void setContext(Context context);
88

89
    /**
90
     * Set properties from the plugin configuration.
91
     *
92
     * @param properties
93
     *            the new properties
94
     */
95
    void setProperties(Properties properties);
96

97
    /**
98
     * Set the comment generator for the current context.
99
     *
100
     * @param commentGenerator the comment generator
101
     */
102
    void setCommentGenerator(CommentGenerator commentGenerator);
103

104
    /**
105
     * This method is called just before the getGeneratedXXXFiles methods are called on the introspected table. Plugins
106
     * can implement this method to override any of the default attributes, or change the results of database
107
     * introspection, before any code generation activities occur. Attributes are listed as static Strings with the
108
     * prefix ATTR_ in IntrospectedTable.
109
     *
110
     * <p>A good example of overriding an attribute would be the case where a user wanted to change the name of one
111
     * of the generated classes, change the target package, or change the name of the generated SQL map file.
112
     *
113
     * <p><b>Warning:</b> Anything that is listed as an attribute should not be changed by one of the other plugin
114
     * methods. For example, if you want to change the name of a generated example class, you should not simply change
115
     * the Type in the <code>modelExampleClassGenerated()</code> method. If you do, the change will not be reflected
116
     * in other generated artifacts.
117
     *
118
     * @param introspectedTable
119
     *            the introspected table
120
     */
121
    default void initialized(IntrospectedTable introspectedTable) {}
1✔
122

123
    /**
124
     * This method is called after all the setXXX methods are called, but before
125
     * any other method is called. This allows the plugin to determine whether
126
     * it can run or not. For example, if the plugin requires certain properties
127
     * to be set, and the properties are not set, then the plugin is invalid and
128
     * will not run.
129
     *
130
     * @param warnings
131
     *            add strings to this list to specify warnings. For example, if
132
     *            the plugin is invalid, you should specify why. Warnings are
133
     *            reported to users after the completion of the run.
134
     * @return true if the plugin is in a valid state. Invalid plugins will not
135
     *         be called
136
     */
137
    boolean validate(List<String> warnings);
138

139
    /**
140
     * This method can be used to generate any additional Java file needed by
141
     * your implementation. This method is called once, after all other Java
142
     * files have been generated.
143
     *
144
     * @return a List of GeneratedJavaFiles - these files will be saved
145
     *         with the other files from this run.
146
     */
147
    default List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles() {
148
        return Collections.emptyList();
1✔
149
    }
150

151
    /**
152
     * This method can be used to generate additional Java files needed by your
153
     * implementation that might be related to a specific table. This method is
154
     * called once for every table in the configuration.
155
     *
156
     * @param introspectedTable
157
     *            The class containing information about the table as
158
     *            introspected from the database
159
     * @return a List of GeneratedJavaFiles - these files will be saved
160
     *         with the other files from this run.
161
     */
162
    default List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles(IntrospectedTable introspectedTable) {
163
        return Collections.emptyList();
1✔
164
    }
165

166
    default List<GeneratedKotlinFile> contextGenerateAdditionalKotlinFiles() {
167
        return Collections.emptyList();
1✔
168
    }
169

170
    default List<GeneratedKotlinFile> contextGenerateAdditionalKotlinFiles(IntrospectedTable introspectedTable) {
171
        return Collections.emptyList();
1✔
172
    }
173

174
    default List<GenericGeneratedFile> contextGenerateAdditionalFiles() {
175
        return Collections.emptyList();
1✔
176
    }
177

178
    default List<GenericGeneratedFile> contextGenerateAdditionalFiles(IntrospectedTable introspectedTable) {
179
        return Collections.emptyList();
1✔
180
    }
181

182
    /**
183
     * This method can be used to generate any additional XML file needed by
184
     * your implementation. This method is called once, after all other XML
185
     * files have been generated.
186
     *
187
     * @return a List of GeneratedXmlFiles - these files will be saved
188
     *         with the other files from this run.
189
     */
190
    default List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles() {
191
        return Collections.emptyList();
1✔
192
    }
193

194
    /**
195
     * This method can be used to generate additional XML files needed by your
196
     * implementation that might be related to a specific table. This method is
197
     * called once for every table in the configuration.
198
     *
199
     * @param introspectedTable
200
     *            The class containing information about the table as
201
     *            introspected from the database
202
     * @return a List of GeneratedXmlFiles - these files will be saved
203
     *         with the other files from this run.
204
     */
205
    default List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles(IntrospectedTable introspectedTable) {
206
        return Collections.emptyList();
1✔
207
    }
208

209
    /**
210
     * This method is called when the entire client has been generated.
211
     * Implement this method to add additional methods or fields to a generated
212
     * client interface or implementation.
213
     *
214
     * @param interfaze
215
     *            the generated interface if any, may be null
216
     * @param introspectedTable
217
     *            The class containing information about the table as
218
     *            introspected from the database
219
     * @return true if the interface should be generated, false if the generated
220
     *         interface should be ignored. In the case of multiple plugins, the
221
     *         first plugin returning false will disable the calling of further
222
     *         plugins.
223
     */
224
    default boolean clientGenerated(Interface interfaze, IntrospectedTable introspectedTable) {
225
        return true;
1✔
226
    }
227

228
    /**
229
     * This method is no longer called.
230
     *
231
     * @param method
232
     *     the generated count method
233
     * @param interfaze
234
     *     the partially generated mapper interfaces
235
     * @param introspectedTable
236
     *     The class containing information about the table as introspected from the database
237
     * @return true if the method should be generated, false if the generated
238
     *         method should be ignored. In the case of multiple plugins, the
239
     *         first plugin returning false will disable the calling of further
240
     *         plugins.
241
     * @deprecated this method is no longer called
242
     */
243
    @Deprecated
244
    default boolean clientBasicCountMethodGenerated(Method method, Interface interfaze,
245
                                                    IntrospectedTable introspectedTable) {
246
        return true;
×
247
    }
248

249
    /**
250
     * This method is no longer called.
251
     *
252
     * @param kotlinFunction
253
     *     the generated function
254
     * @param kotlinFile
255
     *     the partially generated file
256
     * @param introspectedTable
257
     *     The class containing information about the table as introspected from the database
258
     * @return true if the method should be generated, false if the generated
259
     *         method should be ignored. In the case of multiple plugins, the
260
     *         first plugin returning false will disable the calling of further
261
     *         plugins.
262
     * @deprecated this method is no longer called
263
     */
264
    @Deprecated
265
    default boolean clientBasicCountMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
266
            IntrospectedTable introspectedTable) {
267
        return true;
×
268
    }
269

270
    /**
271
     * This method is no longer called.
272
     *
273
     * @param method
274
     *     the generated delete method
275
     * @param interfaze
276
     *     the partially generated mapper interfaces
277
     * @param introspectedTable
278
     *     The class containing information about the table as introspected from the database
279
     * @return true if the method should be generated, false if the generated
280
     *         method should be ignored. In the case of multiple plugins, the
281
     *         first plugin returning false will disable the calling of further
282
     *         plugins.
283
     * @deprecated No longer called
284
     */
285
    @Deprecated
286
    default boolean clientBasicDeleteMethodGenerated(Method method, Interface interfaze,
287
                                                     IntrospectedTable introspectedTable) {
288
        return true;
×
289
    }
290

291
    /**
292
     * This method is no longer called.
293
     *
294
     * @param kotlinFunction
295
     *     the generated delete function
296
     * @param kotlinFile
297
     *     the partially generated file
298
     * @param introspectedTable
299
     *     The class containing information about the table as introspected from the database
300
     * @return true if the method should be generated, false if the generated
301
     *         method should be ignored. In the case of multiple plugins, the
302
     *         first plugin returning false will disable the calling of further
303
     *         plugins.
304
     * @deprecated No longer called
305
     */
306
    @Deprecated
307
    default boolean clientBasicDeleteMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
308
            IntrospectedTable introspectedTable) {
309
        return true;
×
310
    }
311

312
    /**
313
     * This method is called when the insert method has been generated for the mapper interface.
314
     * This method is only called in the MyBatis3DynamicSql runtime. This method is only
315
     * called if the table has generated keys.
316
     *
317
     * @param method
318
     *     the generated insert method
319
     * @param interfaze
320
     *     the partially generated mapper interfaces
321
     * @param introspectedTable
322
     *     The class containing information about the table as introspected from the database
323
     * @return true if the method should be generated, false if the generated
324
     *         method should be ignored. In the case of multiple plugins, the
325
     *         first plugin returning false will disable the calling of further
326
     *         plugins.
327
     */
328
    default boolean clientBasicInsertMethodGenerated(Method method, Interface interfaze,
329
                                                     IntrospectedTable introspectedTable) {
330
        return true;
1✔
331
    }
332

333
    /**
334
     * This method is called when the insert function has been generated for the mapper interface.
335
     * This method is only called in the MyBatis3Kotlin runtime. This method is only
336
     * called if the table has generated keys.
337
     *
338
     * @param kotlinFunction
339
     *     the generated insert function
340
     * @param kotlinFile
341
     *     the partially generated file
342
     * @param introspectedTable
343
     *     The class containing information about the table as introspected from the database
344
     * @return true if the function should be generated, false if the generated
345
     *         function should be ignored. In the case of multiple plugins, the
346
     *         first plugin returning false will disable the calling of further
347
     *         plugins.
348
     */
349
    default boolean clientBasicInsertMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
350
            IntrospectedTable introspectedTable) {
351
        return true;
1✔
352
    }
353

354
    /**
355
     * This method is called when the insert multiple method has been generated for the mapper interface.
356
     * This method is only called in the MyBatis3DynamicSql runtime. This method is only
357
     * called if the table has generated keys.
358
     *
359
     * @param method
360
     *     the generated insert method
361
     * @param interfaze
362
     *     the partially generated mapper interfaces
363
     * @param introspectedTable
364
     *     The class containing information about the table as introspected from the database
365
     * @return true if the method should be generated, false if the generated
366
     *         method should be ignored. In the case of multiple plugins, the
367
     *         first plugin returning false will disable the calling of further
368
     *         plugins.
369
     */
370
    default boolean clientBasicInsertMultipleMethodGenerated(Method method, Interface interfaze,
371
            IntrospectedTable introspectedTable) {
372
        return true;
1✔
373
    }
374

375
    /**
376
     * This method is called when the insert multiple method has been generated for the mapper interface.
377
     * This method is only called in the MyBatis3DynamicSql runtime. This method is only
378
     * called if the table has generated keys.
379
     *
380
     * @param kotlinFunction
381
     *     the generated insert function
382
     * @param kotlinFile
383
     *     the partially generated file
384
     * @param introspectedTable
385
     *     The class containing information about the table as introspected from the database
386
     * @return true if the method should be generated, false if the generated
387
     *         function should be ignored. In the case of multiple plugins, the
388
     *         first plugin returning false will disable the calling of further
389
     *         plugins.
390
     */
391
    default boolean clientBasicInsertMultipleMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
392
            IntrospectedTable introspectedTable) {
393
        return true;
1✔
394
    }
395

396
    /**
397
     * This method is no longer called.
398
     *
399
     * @param method
400
     *     the generated insert method
401
     * @param interfaze
402
     *     the partially generated mapper interfaces
403
     * @param introspectedTable
404
     *     The class containing information about the table as introspected from the database
405
     * @return true if the method should be generated, false if the generated
406
     *         method should be ignored. In the case of multiple plugins, the
407
     *         first plugin returning false will disable the calling of further
408
     *         plugins.
409
     * @deprecated this method is no longer called
410
     */
411
    @Deprecated
412
    default boolean clientBasicInsertMultipleHelperMethodGenerated(Method method, Interface interfaze,
413
            IntrospectedTable introspectedTable) {
414
        return true;
×
415
    }
416

417
    /**
418
     * Unused legacy method.
419
     *
420
     * @param kotlinFunction generated function
421
     * @param kotlinFile generated file
422
     * @param introspectedTable introspected table
423
     * @return true
424
     * @deprecated this method is no longer called
425
     */
426
    @Deprecated
427
    default boolean clientBasicInsertMultipleHelperMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
428
            IntrospectedTable introspectedTable) {
429
        return true;
×
430
    }
431

432
    /**
433
     * This method is called when the selectMany method has been generated for the mapper interface.
434
     * This method is only called in the MyBatis3DynamicSql runtime.
435
     *
436
     * @param method
437
     *     the generated selectMany method
438
     * @param interfaze
439
     *     the partially generated mapper interfaces
440
     * @param introspectedTable
441
     *     The class containing information about the table as introspected from the database
442
     * @return true if the method should be generated, false if the generated
443
     *         method should be ignored. In the case of multiple plugins, the
444
     *         first plugin returning false will disable the calling of further
445
     *         plugins.
446
     */
447
    default boolean clientBasicSelectManyMethodGenerated(Method method, Interface interfaze,
448
            IntrospectedTable introspectedTable) {
449
        return true;
1✔
450
    }
451

452
    default boolean clientBasicSelectManyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
453
            IntrospectedTable introspectedTable) {
454
        return true;
1✔
455
    }
456

457
    /**
458
     * This method is called when the selectOne method has been generated for the mapper interface.
459
     * This method is only called in the MyBatis3DynamicSql runtime.
460
     *
461
     * @param method
462
     *     the generated selectOne method
463
     * @param interfaze
464
     *     the partially generated mapper interfaces
465
     * @param introspectedTable
466
     *     The class containing information about the table as 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
    default boolean clientBasicSelectOneMethodGenerated(Method method, Interface interfaze,
473
            IntrospectedTable introspectedTable) {
474
        return true;
1✔
475
    }
476

477
    default boolean clientBasicSelectOneMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
478
            IntrospectedTable introspectedTable) {
479
        return true;
1✔
480
    }
481

482
    /**
483
     * This method is no longer called.
484
     *
485
     * @param method
486
     *     the generated update method
487
     * @param interfaze
488
     *     the partially generated mapper interfaces
489
     * @param introspectedTable
490
     *     The class containing information about the table as introspected from the database
491
     * @return true if the method should be generated, false if the generated
492
     *         method should be ignored. In the case of multiple plugins, the
493
     *         first plugin returning false will disable the calling of further
494
     *         plugins.
495
     * @deprecated no longer called
496
     */
497
    @Deprecated
498
    default boolean clientBasicUpdateMethodGenerated(Method method, Interface interfaze,
499
                                                     IntrospectedTable introspectedTable) {
500
        return true;
×
501
    }
502

503
    /**
504
     * This method is no longer called.
505
     *
506
     * @param kotlinFunction
507
     *     the generated update function
508
     * @param kotlinFile
509
     *     the partially generated file
510
     * @param introspectedTable
511
     *     The class containing information about the table as introspected from the database
512
     * @return true if the method should be generated, false if the generated
513
     *         method should be ignored. In the case of multiple plugins, the
514
     *         first plugin returning false will disable the calling of further
515
     *         plugins.
516
     * @deprecated no longer called
517
     */
518
    @Deprecated
519
    default boolean clientBasicUpdateMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
520
            IntrospectedTable introspectedTable) {
521
        return true;
×
522
    }
523

524
    /**
525
     * This method is called when the countByExample method has been generated
526
     * in the client interface.
527
     *
528
     * @param method
529
     *            the generated countByExample method
530
     * @param interfaze
531
     *            the partially implemented client interface. You can add
532
     *            additional imported classes to the interface if
533
     *            necessary.
534
     * @param introspectedTable
535
     *            The class containing information about the table as
536
     *            introspected from the database
537
     * @return true if the method should be generated, false if the generated
538
     *         method should be ignored. In the case of multiple plugins, the
539
     *         first plugin returning false will disable the calling of further
540
     *         plugins.
541
     */
542
    default boolean clientCountByExampleMethodGenerated(Method method,
543
            Interface interfaze, IntrospectedTable introspectedTable) {
544
        return true;
1✔
545
    }
546

547
    /**
548
     * This method is called when the deleteByExample method has been generated
549
     * in the client interface.
550
     *
551
     * @param method
552
     *            the generated deleteByExample method
553
     * @param interfaze
554
     *            the partially implemented client interface. You can add
555
     *            additional imported classes to the interface if
556
     *            necessary.
557
     * @param introspectedTable
558
     *            The class containing information about the table as
559
     *            introspected from the database
560
     * @return true if the method should be generated, false if the generated
561
     *         method should be ignored. In the case of multiple plugins, the
562
     *         first plugin returning false will disable the calling of further
563
     *         plugins.
564
     */
565
    default boolean clientDeleteByExampleMethodGenerated(Method method,
566
            Interface interfaze, IntrospectedTable introspectedTable) {
567
        return true;
1✔
568
    }
569

570
    /**
571
     * This method is called when the deleteByPrimaryKey method has been
572
     * generated in the client interface.
573
     *
574
     * @param method
575
     *            the generated deleteByPrimaryKey method
576
     * @param interfaze
577
     *            the partially implemented client interface. You can add
578
     *            additional imported classes to the interface if
579
     *            necessary.
580
     * @param introspectedTable
581
     *            The class containing information about the table as
582
     *            introspected from the database
583
     * @return true if the method should be generated, false if the generated
584
     *         method should be ignored. In the case of multiple plugins, the
585
     *         first plugin returning false will disable the calling of further
586
     *         plugins.
587
     */
588
    default boolean clientDeleteByPrimaryKeyMethodGenerated(Method method,
589
            Interface interfaze, IntrospectedTable introspectedTable) {
590
        return true;
1✔
591
    }
592

593
    default boolean clientDeleteByPrimaryKeyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
594
            IntrospectedTable introspectedTable) {
595
        return true;
1✔
596
    }
597

598
    /**
599
     * Called when the general count method has been generated. This is the replacement for countByExample
600
     * in the MyBatis Dynamic SQL V2 runtime.
601
     *
602
     * @param method
603
     *     the generated general count method
604
     * @param interfaze
605
     *     the partially generated mapper interfaces
606
     * @param introspectedTable
607
     *            The class containing information about the table as
608
     *            introspected from the database
609
     * @return true if the method should be generated
610
     */
611
    default boolean clientGeneralCountMethodGenerated(Method method, Interface interfaze,
612
                                                      IntrospectedTable introspectedTable) {
613
        return true;
1✔
614
    }
615

616
    default boolean clientGeneralCountMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
617
            IntrospectedTable introspectedTable) {
618
        return true;
1✔
619
    }
620

621
    /**
622
     * Called when the general delete method has been generated. This is the replacement for deleteByExample
623
     * in the MyBatis Dynamic SQL V2 runtime.
624
     *
625
     * @param method
626
     *     the generated general delete method
627
     * @param interfaze
628
     *     the partially generated mapper interfaces
629
     * @param introspectedTable
630
     *            The class containing information about the table as
631
     *            introspected from the database
632
     * @return true if the method should be generated
633
     */
634
    default boolean clientGeneralDeleteMethodGenerated(Method method, Interface interfaze,
635
                                                       IntrospectedTable introspectedTable) {
636
        return true;
1✔
637
    }
638

639
    default boolean clientGeneralDeleteMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
640
            IntrospectedTable introspectedTable) {
641
        return true;
1✔
642
    }
643

644
    /**
645
     * Called when the general select distinct method has been generated. This is the replacement for
646
     * selectDistinctByExample in the MyBatis Dynamic SQL V2 runtime.
647
     *
648
     * @param method
649
     *     the generated general select distinct method
650
     * @param interfaze
651
     *     the partially generated mapper interfaces
652
     * @param introspectedTable
653
     *            The class containing information about the table as
654
     *            introspected from the database
655
     * @return true if the method should be generated
656
     */
657
    default boolean clientGeneralSelectDistinctMethodGenerated(Method method, Interface interfaze,
658
            IntrospectedTable introspectedTable) {
659
        return true;
1✔
660
    }
661

662
    default boolean clientGeneralSelectDistinctMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
663
            IntrospectedTable introspectedTable) {
664
        return true;
1✔
665
    }
666

667
    /**
668
     * Called when the general select method has been generated. This is the replacement for
669
     * selectByExample in the MyBatis Dynamic SQL V2 runtime.
670
     *
671
     * @param method
672
     *     the generated general select method
673
     * @param interfaze
674
     *     the partially generated mapper interfaces
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
679
     */
680
    default boolean clientGeneralSelectMethodGenerated(Method method, Interface interfaze,
681
                                                       IntrospectedTable introspectedTable) {
682
        return true;
1✔
683
    }
684

685
    default boolean clientGeneralSelectMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
686
            IntrospectedTable introspectedTable) {
687
        return true;
1✔
688
    }
689

690
    /**
691
     * Called when the general update method has been generated. This is the replacement for
692
     * updateByExample in the MyBatis Dynamic SQL V2 runtime.
693
     *
694
     * @param method
695
     *     the generated general update method
696
     * @param interfaze
697
     *     the partially generated mapper interfaces
698
     * @param introspectedTable
699
     *            The class containing information about the table as
700
     *            introspected from the database
701
     * @return true if the method should be generated
702
     */
703
    default boolean clientGeneralUpdateMethodGenerated(Method method, Interface interfaze,
704
                                                       IntrospectedTable introspectedTable) {
705
        return true;
1✔
706
    }
707

708
    default boolean clientGeneralUpdateMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
709
            IntrospectedTable introspectedTable) {
710
        return true;
1✔
711
    }
712

713
    /**
714
     * This method is called when the insert method has been generated in the
715
     * client interface.
716
     *
717
     * @param method
718
     *            the generated insert method
719
     * @param interfaze
720
     *            the partially implemented client interface. You can add
721
     *            additional imported classes to the interface if
722
     *            necessary.
723
     * @param introspectedTable
724
     *            The class containing information about the table as
725
     *            introspected from the database
726
     * @return true if the method should be generated, false if the generated
727
     *         method should be ignored. In the case of multiple plugins, the
728
     *         first plugin returning false will disable the calling of further
729
     *         plugins.
730
     */
731
    default boolean clientInsertMethodGenerated(Method method, Interface interfaze,
732
            IntrospectedTable introspectedTable) {
733
        return true;
1✔
734
    }
735

736
    default boolean clientInsertMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
737
            IntrospectedTable introspectedTable) {
738
        return true;
1✔
739
    }
740

741
    /**
742
     * This method is called when the insert multiple method has been generated in the
743
     * client interface.
744
     * This method is only called in the MyBatis3DynamicSql runtime.
745
     *
746
     * @param method
747
     *            the generated insert multiple method
748
     * @param interfaze
749
     *            the partially implemented client interface. You can add
750
     *            additional imported classes to the interface if
751
     *            necessary.
752
     * @param introspectedTable
753
     *            The class containing information about the table as
754
     *            introspected from the database
755
     * @return true if the method should be generated, false if the generated
756
     *         method should be ignored. In the case of multiple plugins, the
757
     *         first plugin returning false will disable the calling of further
758
     *         plugins.
759
     */
760
    default boolean clientInsertMultipleMethodGenerated(Method method, Interface interfaze,
761
            IntrospectedTable introspectedTable) {
762
        return true;
1✔
763
    }
764

765
    default boolean clientInsertMultipleMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
766
            IntrospectedTable introspectedTable) {
767
        return true;
1✔
768
    }
769

770
    /**
771
     * This method is called when the insert selective method has been generated
772
     * in the client interface.
773
     *
774
     * @param method
775
     *            the generated insert 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
    default boolean clientInsertSelectiveMethodGenerated(Method method,
789
            Interface interfaze, IntrospectedTable introspectedTable) {
790
        return true;
1✔
791
    }
792

793
    default boolean clientInsertSelectiveMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
794
            IntrospectedTable introspectedTable) {
795
        return true;
1✔
796
    }
797

798
    /**
799
     * This method is called when the selectByExampleWithBLOBs method has been
800
     * generated in the client interface.
801
     *
802
     * @param method
803
     *            the generated selectByExampleWithBLOBs method
804
     * @param interfaze
805
     *            the partially implemented client interface. You can add
806
     *            additional imported classes to the interface if
807
     *            necessary.
808
     * @param introspectedTable
809
     *            The class containing information about the table as
810
     *            introspected from the database
811
     * @return true if the method should be generated, false if the generated
812
     *         method should be ignored. In the case of multiple plugins, the
813
     *         first plugin returning false will disable the calling of further
814
     *         plugins.
815
     */
816
    default boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
817
            Interface interfaze, IntrospectedTable introspectedTable) {
818
        return true;
1✔
819
    }
820

821
    /**
822
     * This method is called when the selectByExampleWithoutBLOBs method has
823
     * been generated in the client interface.
824
     *
825
     * @param method
826
     *            the generated selectByExampleWithoutBLOBs method
827
     * @param interfaze
828
     *            the partially implemented client interface. You can add
829
     *            additional imported classes to the interface if
830
     *            necessary.
831
     * @param introspectedTable
832
     *            The class containing information about the table as
833
     *            introspected from the database
834
     * @return true if the method should be generated, false if the generated
835
     *         method should be ignored. In the case of multiple plugins, the
836
     *         first plugin returning false will disable the calling of further
837
     *         plugins.
838
     */
839
    default boolean clientSelectByExampleWithoutBLOBsMethodGenerated(Method method,
840
            Interface interfaze, IntrospectedTable introspectedTable) {
841
        return true;
1✔
842
    }
843

844
    /**
845
     * This method is called when the selectByPrimaryKey method has been
846
     * generated in the client interface.
847
     *
848
     * @param method
849
     *            the generated selectByPrimaryKey method
850
     * @param interfaze
851
     *            the partially implemented client interface. You can add
852
     *            additional imported classes to the interface if
853
     *            necessary.
854
     * @param introspectedTable
855
     *            The class containing information about the table as
856
     *            introspected from the database
857
     * @return true if the method should be generated, false if the generated
858
     *         method should be ignored. In the case of multiple plugins, the
859
     *         first plugin returning false will disable the calling of further
860
     *         plugins.
861
     */
862
    default boolean clientSelectByPrimaryKeyMethodGenerated(Method method,
863
            Interface interfaze, IntrospectedTable introspectedTable) {
864
        return true;
1✔
865
    }
866

867
    default boolean clientSelectByPrimaryKeyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
868
            IntrospectedTable introspectedTable) {
869
        return true;
1✔
870
    }
871

872
    /**
873
     * Called when the selectList field is generated in a MyBatis Dynamic SQL V2 runtime.
874
     *
875
     * @param field the generated selectList field
876
     * @param interfaze
877
     *     the partially generated mapper interfaces
878
     * @param introspectedTable
879
     *            The class containing information about the table as
880
     *            introspected from the database
881
     * @return true if the field should be generated
882
     */
883
    default boolean clientSelectListFieldGenerated(Field field, Interface interfaze,
884
                                                   IntrospectedTable introspectedTable) {
885
        return true;
1✔
886
    }
887

888
    /**
889
     * Called when the selectOne method is generated. This is a new method in the MyBatis Dynamic SQL V2 runtime.
890
     *
891
     * @param method
892
     *     the generated selectOne method
893
     * @param interfaze
894
     *     the partially generated mapper interfaces
895
     * @param introspectedTable
896
     *            The class containing information about the table as
897
     *            introspected from the database
898
     * @return true if the method should be generated
899
     */
900
    default boolean clientSelectOneMethodGenerated(Method method, Interface interfaze,
901
                                                   IntrospectedTable introspectedTable) {
902
        return true;
1✔
903
    }
904

905
    default boolean clientSelectOneMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
906
            IntrospectedTable introspectedTable) {
907
        return true;
1✔
908
    }
909

910
    /**
911
     * This method is called when the updateByExampleSelective method has been
912
     * generated in the client interface.
913
     *
914
     * @param method
915
     *            the generated updateByExampleSelective method
916
     * @param interfaze
917
     *            the partially implemented client interface. You can add
918
     *            additional imported classes to the interface if
919
     *            necessary.
920
     * @param introspectedTable
921
     *            The class containing information about the table as
922
     *            introspected from the database
923
     * @return true if the method should be generated, false if the generated
924
     *         method should be ignored. In the case of multiple plugins, the
925
     *         first plugin returning false will disable the calling of further
926
     *         plugins.
927
     */
928
    default boolean clientUpdateByExampleSelectiveMethodGenerated(Method method,
929
            Interface interfaze, IntrospectedTable introspectedTable) {
930
        return true;
1✔
931
    }
932

933
    /**
934
     * Called when the updateAllColumns method is generated. The generated method can be used with the general
935
     * update method to mimic the function of the old updateByExample method.
936
     *
937
     * @param method
938
     *     the generated updateAllColumns method
939
     * @param interfaze
940
     *     the partially generated mapper interfaces
941
     * @param introspectedTable
942
     *            The class containing information about the table as
943
     *            introspected from the database
944
     * @return true if the method should be generated
945
     */
946
    default boolean clientUpdateAllColumnsMethodGenerated(Method method, Interface interfaze,
947
            IntrospectedTable introspectedTable) {
948
        return true;
1✔
949
    }
950

951
    default boolean clientUpdateAllColumnsMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
952
            IntrospectedTable introspectedTable) {
953
        return true;
1✔
954
    }
955

956
    /**
957
     * Called when the updateSelectiveColumns method is generated. The generated method can be used with the general
958
     * update method to mimic the function of the old updateByExampleSelective method.
959
     *
960
     * @param method
961
     *     the generated updateSelectiveColumns method
962
     * @param interfaze
963
     *     the partially generated mapper interfaces
964
     * @param introspectedTable
965
     *            The class containing information about the table as
966
     *            introspected from the database
967
     * @return true if the method should be generated
968
     */
969
    default boolean clientUpdateSelectiveColumnsMethodGenerated(Method method, Interface interfaze,
970
            IntrospectedTable introspectedTable) {
971
        return true;
1✔
972
    }
973

974
    default boolean clientUpdateSelectiveColumnsMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
975
            IntrospectedTable introspectedTable) {
976
        return true;
1✔
977
    }
978

979
    /**
980
     * This method is called when the updateByExampleWithBLOBs method has been
981
     * generated in the client interface.
982
     *
983
     * @param method
984
     *            the generated updateByExampleWithBLOBs method
985
     * @param interfaze
986
     *            the partially implemented client interface. You can add
987
     *            additional imported classes to the interface if
988
     *            necessary.
989
     * @param introspectedTable
990
     *            The class containing information about the table as
991
     *            introspected from the database
992
     * @return true if the method should be generated, false if the generated
993
     *         method should be ignored. In the case of multiple plugins, the
994
     *         first plugin returning false will disable the calling of further
995
     *         plugins.
996
     */
997
    default boolean clientUpdateByExampleWithBLOBsMethodGenerated(Method method,
998
            Interface interfaze, IntrospectedTable introspectedTable) {
999
        return true;
1✔
1000
    }
1001

1002
    /**
1003
     * This method is called when the updateByExampleWithoutBLOBs method has
1004
     * been generated in the client interface.
1005
     *
1006
     * @param method
1007
     *            the generated updateByExampleWithoutBLOBs method
1008
     * @param interfaze
1009
     *            the partially implemented client interface. You can add
1010
     *            additional imported classes to the interface if
1011
     *            necessary.
1012
     * @param introspectedTable
1013
     *            The class containing information about the table as
1014
     *            introspected from the database
1015
     * @return true if the method should be generated, false if the generated
1016
     *         method should be ignored. In the case of multiple plugins, the
1017
     *         first plugin returning false will disable the calling of further
1018
     *         plugins.
1019
     */
1020
    default boolean clientUpdateByExampleWithoutBLOBsMethodGenerated(Method method,
1021
            Interface interfaze, IntrospectedTable introspectedTable) {
1022
        return true;
1✔
1023
    }
1024

1025
    /**
1026
     * This method is called when the updateByPrimaryKeySelective method has
1027
     * been generated in the client interface.
1028
     *
1029
     * @param method
1030
     *            the generated updateByPrimaryKeySelective method
1031
     * @param interfaze
1032
     *            the partially implemented client interface. You can add
1033
     *            additional imported classes to the interface if
1034
     *            necessary.
1035
     * @param introspectedTable
1036
     *            The class containing information about the table as
1037
     *            introspected from the database
1038
     * @return true if the method should be generated, false if the generated
1039
     *         method should be ignored. In the case of multiple plugins, the
1040
     *         first plugin returning false will disable the calling of further
1041
     *         plugins.
1042
     */
1043
    default boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method,
1044
            Interface interfaze, IntrospectedTable introspectedTable) {
1045
        return true;
1✔
1046
    }
1047

1048
    default boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(KotlinFunction kotlinFunction,
1049
            KotlinFile kotlinFile, IntrospectedTable introspectedTable) {
1050
        return true;
1✔
1051
    }
1052

1053
    /**
1054
     * This method is called when the updateByPrimaryKeyWithBLOBs method has
1055
     * been generated in the client interface.
1056
     *
1057
     * @param method
1058
     *            the generated updateByPrimaryKeyWithBLOBs method
1059
     * @param interfaze
1060
     *            the partially implemented client interface. You can add
1061
     *            additional imported classes to the interface if
1062
     *            necessary.
1063
     * @param introspectedTable
1064
     *            The class containing information about the table as
1065
     *            introspected from the database
1066
     * @return true if the method should be generated, false if the generated
1067
     *         method should be ignored. In the case of multiple plugins, the
1068
     *         first plugin returning false will disable the calling of further
1069
     *         plugins.
1070
     */
1071
    default boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method,
1072
            Interface interfaze, IntrospectedTable introspectedTable) {
1073
        return true;
1✔
1074
    }
1075

1076
    /**
1077
     * This method is called when the updateByPrimaryKeyWithoutBLOBs method has
1078
     * been generated in the client interface.
1079
     *
1080
     * @param method
1081
     *            the generated updateByPrimaryKeyWithoutBLOBs method
1082
     * @param interfaze
1083
     *            the partially implemented client interface. You can add
1084
     *            additional imported classes to the interface if
1085
     *            necessary.
1086
     * @param introspectedTable
1087
     *            The class containing information about the table as
1088
     *            introspected from the database
1089
     * @return true if the method should be generated, false if the generated
1090
     *         method should be ignored. In the case of multiple plugins, the
1091
     *         first plugin returning false will disable the calling of further
1092
     *         plugins.
1093
     */
1094
    default boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method,
1095
            Interface interfaze, IntrospectedTable introspectedTable) {
1096
        return true;
1✔
1097
    }
1098

1099
    /**
1100
     * This method is called when the selectAll method has been
1101
     * generated in the client interface.  This method is only generated by
1102
     * the simple runtime.
1103
     *
1104
     * @param method
1105
     *            the generated selectAll method
1106
     * @param interfaze
1107
     *            the partially implemented client interface. You can add
1108
     *            additional imported classes to the interface if
1109
     *            necessary.
1110
     * @param introspectedTable
1111
     *            The class containing information about the table as
1112
     *            introspected from the database
1113
     * @return true if the method should be generated, false if the generated
1114
     *         method should be ignored. In the case of multiple plugins, the
1115
     *         first plugin returning false will disable the calling of further
1116
     *         plugins.
1117
     */
1118
    default boolean clientSelectAllMethodGenerated(Method method,
1119
            Interface interfaze, IntrospectedTable introspectedTable) {
1120
        return true;
1✔
1121
    }
1122

1123
    /**
1124
     * This method is called after the field is generated for a specific column
1125
     * in a table.
1126
     *
1127
     * @param field
1128
     *            the field generated for the specified column
1129
     * @param topLevelClass
1130
     *            the partially implemented model class. You can add additional
1131
     *            imported classes to the implementation class if necessary.
1132
     * @param introspectedColumn
1133
     *            The class containing information about the column related
1134
     *            to this field as introspected from the database
1135
     * @param introspectedTable
1136
     *            The class containing information about the table as
1137
     *            introspected from the database
1138
     * @param modelClassType
1139
     *            the type of class that the field is generated for
1140
     * @return true if the field should be generated, false if the generated
1141
     *         field should be ignored. In the case of multiple plugins, the
1142
     *         first plugin returning false will disable the calling of further
1143
     *         plugins.
1144
     */
1145
    default boolean modelFieldGenerated(Field field, TopLevelClass topLevelClass,
1146
            IntrospectedColumn introspectedColumn,
1147
            IntrospectedTable introspectedTable, ModelClassType modelClassType) {
1148
        return true;
1✔
1149
    }
1150

1151
    /**
1152
     * This method is called after the getter, or accessor, method is generated
1153
     * for a specific column in a table.
1154
     *
1155
     * @param method
1156
     *            the getter, or accessor, method generated for the specified
1157
     *            column
1158
     * @param topLevelClass
1159
     *            the partially implemented model class. You can add additional
1160
     *            imported classes to the implementation class if necessary.
1161
     * @param introspectedColumn
1162
     *            The class containing information about the column related
1163
     *            to this field as introspected from the database
1164
     * @param introspectedTable
1165
     *            The class containing information about the table as
1166
     *            introspected from the database
1167
     * @param modelClassType
1168
     *            the type of class that the field is generated for
1169
     * @return true if the method should be generated, false if the generated
1170
     *         method should be ignored. In the case of multiple plugins, the
1171
     *         first plugin returning false will disable the calling of further
1172
     *         plugins.
1173
     */
1174
    default boolean modelGetterMethodGenerated(Method method,
1175
            TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn,
1176
            IntrospectedTable introspectedTable, ModelClassType modelClassType) {
1177
        return true;
1✔
1178
    }
1179

1180
    /**
1181
     * This method is called after the setter, or mutator, method is generated
1182
     * for a specific column in a table.
1183
     *
1184
     * @param method
1185
     *            the setter, or mutator, method generated for the specified
1186
     *            column
1187
     * @param topLevelClass
1188
     *            the partially implemented model class. You can add additional
1189
     *            imported classes to the implementation class if necessary.
1190
     * @param introspectedColumn
1191
     *            The class containing information about the column related
1192
     *            to this field as introspected from the database
1193
     * @param introspectedTable
1194
     *            The class containing information about the table as
1195
     *            introspected from the database
1196
     * @param modelClassType
1197
     *            the type of class that the field is generated for
1198
     * @return true if the method should be generated, false if the generated
1199
     *         method should be ignored. In the case of multiple plugins, the
1200
     *         first plugin returning false will disable the calling of further
1201
     *         plugins.
1202
     */
1203
    default boolean modelSetterMethodGenerated(Method method,
1204
            TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn,
1205
            IntrospectedTable introspectedTable, ModelClassType modelClassType) {
1206
        return true;
1✔
1207
    }
1208

1209
    /**
1210
     * This method is called after the primary key class is generated by the
1211
     * JavaModelGenerator. This method will only be called if
1212
     * the table rules call for generation of a primary key class.
1213
     * <br><br>
1214
     * This method is only guaranteed to be called by the Java
1215
     * model generators. Other user supplied generators may, or may not, call
1216
     * this method.
1217
     *
1218
     * @param topLevelClass
1219
     *            the generated primary key class
1220
     * @param introspectedTable
1221
     *            The class containing information about the table as
1222
     *            introspected from the database
1223
     * @return true if the class should be generated, false if the generated
1224
     *         class 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
    default boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass,
1229
            IntrospectedTable introspectedTable) {
1230
        return true;
1✔
1231
    }
1232

1233
    /**
1234
     * This method is called after the base record class is generated by the
1235
     * JavaModelGenerator. This method will only be called if
1236
     * the table rules call for generation of a base record class.
1237
     * <br><br>
1238
     * This method is only guaranteed to be called by the default Java
1239
     * model generators. Other user supplied generators may, or may not, call
1240
     * this method.
1241
     *
1242
     * @param topLevelClass
1243
     *            the generated base record class
1244
     * @param introspectedTable
1245
     *            The class containing information about the table as
1246
     *            introspected from the database
1247
     * @return true if the class should be generated, false if the generated
1248
     *         class should be ignored. In the case of multiple plugins, the
1249
     *         first plugin returning false will disable the calling of further
1250
     *         plugins.
1251
     */
1252
    default boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass,
1253
            IntrospectedTable introspectedTable) {
1254
        return true;
1✔
1255
    }
1256

1257
    /**
1258
     * This method is called after the record with BLOBs class is generated by
1259
     * the JavaModelGenerator. This method will only be called
1260
     * if the table rules call for generation of a record with BLOBs class.
1261
     * <br><br>
1262
     * This method is only guaranteed to be called by the default Java
1263
     * model generators. Other user supplied generators may, or may not, call
1264
     * this method.
1265
     *
1266
     * @param topLevelClass
1267
     *            the generated record with BLOBs class
1268
     * @param introspectedTable
1269
     *            The class containing information about the table as
1270
     *            introspected from the database
1271
     * @return true if the class should be generated, false if the generated
1272
     *         class should be ignored. In the case of multiple plugins, the
1273
     *         first plugin returning false will disable the calling of further
1274
     *         plugins.
1275
     */
1276
    default boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass,
1277
            IntrospectedTable introspectedTable) {
1278
        return true;
×
1279
    }
1280

1281
    /**
1282
     * This method is called after the example class is generated by the
1283
     * JavaModelGenerator. This method will only be called if the table
1284
     * rules call for generation of an example class.
1285
     * <br><br>
1286
     * This method is only guaranteed to be called by the default Java
1287
     * model generators. Other user supplied generators may, or may not, call
1288
     * this method.
1289
     *
1290
     * @param topLevelClass
1291
     *            the generated example class
1292
     * @param introspectedTable
1293
     *            The class containing information about the table as
1294
     *            introspected from the database
1295
     * @return true if the class should be generated, false if the generated
1296
     *         class should be ignored. In the case of multiple plugins, the
1297
     *         first plugin returning false will disable the calling of further
1298
     *         plugins.
1299
     */
1300
    default boolean modelExampleClassGenerated(TopLevelClass topLevelClass,
1301
            IntrospectedTable introspectedTable) {
1302
        return true;
1✔
1303
    }
1304

1305
    /**
1306
     * This method is called when the SqlMap file has been generated.
1307
     *
1308
     * @param sqlMap
1309
     *            the generated file (containing the file name, package name,
1310
     *            and project name)
1311
     * @param introspectedTable
1312
     *            The class containing information about the table as
1313
     *            introspected from the database
1314
     * @return true if the sqlMap should be generated, false if the generated
1315
     *         sqlMap should be ignored. In the case of multiple plugins, the
1316
     *         first plugin returning false will disable the calling of further
1317
     *         plugins.
1318
     */
1319
    default boolean sqlMapGenerated(GeneratedXmlFile sqlMap,
1320
            IntrospectedTable introspectedTable) {
1321
        return true;
1✔
1322
    }
1323

1324
    /**
1325
     * This method is called when the SqlMap document has been generated. This
1326
     * method can be used to add additional XML elements to the generated
1327
     * document.
1328
     *
1329
     * @param document
1330
     *            the generated document (note that this is the MyBatis generator's internal
1331
     *            Document class - not the w3c XML Document class)
1332
     * @param introspectedTable
1333
     *            The class containing information about the table as
1334
     *            introspected from the database
1335
     * @return true if the document should be generated, false if the generated
1336
     *         document should be ignored. In the case of multiple plugins, the
1337
     *         first plugin returning false will disable the calling of further
1338
     *         plugins. Also, if any plugin returns false, then the
1339
     *         <code>sqlMapGenerated</code> method will not be called.
1340
     */
1341
    default boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
1342
        return true;
1✔
1343
    }
1344

1345
    /**
1346
     * This method is called when the base resultMap is generated.
1347
     *
1348
     * @param element
1349
     *            the generated &lt;resultMap&gt; element
1350
     * @param introspectedTable
1351
     *            The class containing information about the table as
1352
     *            introspected from the database
1353
     * @return true if the element should be generated, false if the generated
1354
     *         element should be ignored. In the case of multiple plugins, the
1355
     *         first plugin returning false will disable the calling of further
1356
     *         plugins.
1357
     */
1358
    default boolean sqlMapResultMapWithoutBLOBsElementGenerated(XmlElement element,
1359
            IntrospectedTable introspectedTable) {
1360
        return true;
1✔
1361
    }
1362

1363
    /**
1364
     * This method is called when the countByExample element is generated.
1365
     *
1366
     * @param element
1367
     *            the generated &lt;select&gt; element
1368
     * @param introspectedTable
1369
     *            The class containing information about the table as
1370
     *            introspected from the database
1371
     * @return true if the element should be generated, false if the generated
1372
     *         element should be ignored. In the case of multiple plugins, the
1373
     *         first plugin returning false will disable the calling of further
1374
     *         plugins.
1375
     */
1376
    default boolean sqlMapCountByExampleElementGenerated(XmlElement element,
1377
            IntrospectedTable introspectedTable) {
1378
        return true;
1✔
1379
    }
1380

1381
    /**
1382
     * This method is called when the deleteByExample element is generated.
1383
     *
1384
     * @param element
1385
     *            the generated &lt;delete&gt; element
1386
     * @param introspectedTable
1387
     *            The class containing information about the table as
1388
     *            introspected from the database
1389
     * @return true if the element should be generated, false if the generated
1390
     *         element should be ignored. In the case of multiple plugins, the
1391
     *         first plugin returning false will disable the calling of further
1392
     *         plugins.
1393
     */
1394
    default boolean sqlMapDeleteByExampleElementGenerated(XmlElement element,
1395
            IntrospectedTable introspectedTable) {
1396
        return true;
1✔
1397
    }
1398

1399
    /**
1400
     * This method is called when the deleteByPrimaryKey element is generated.
1401
     *
1402
     * @param element
1403
     *            the generated &lt;delete&gt; element
1404
     * @param introspectedTable
1405
     *            The class containing information about the table as
1406
     *            introspected from the database
1407
     * @return true if the element should be generated, false if the generated
1408
     *         element should be ignored. In the case of multiple plugins, the
1409
     *         first plugin returning false will disable the calling of further
1410
     *         plugins.
1411
     */
1412
    default boolean sqlMapDeleteByPrimaryKeyElementGenerated(XmlElement element,
1413
            IntrospectedTable introspectedTable) {
1414
        return true;
1✔
1415
    }
1416

1417
    /**
1418
     * This method is called when the exampleWhereClause element is generated.
1419
     *
1420
     * @param element
1421
     *            the generated &lt;sql&gt; element
1422
     * @param introspectedTable
1423
     *            The class containing information about the table as
1424
     *            introspected from the database
1425
     * @return true if the element should be generated, false if the generated
1426
     *         element should be ignored. In the case of multiple plugins, the
1427
     *         first plugin returning false will disable the calling of further
1428
     *         plugins.
1429
     */
1430
    default boolean sqlMapExampleWhereClauseElementGenerated(XmlElement element,
1431
            IntrospectedTable introspectedTable) {
1432
        return true;
1✔
1433
    }
1434

1435
    /**
1436
     * This method is called when the baseColumnList element is generated.
1437
     *
1438
     * @param element
1439
     *            the generated &lt;sql&gt; element
1440
     * @param introspectedTable
1441
     *            The class containing information about the table as
1442
     *            introspected from the database
1443
     * @return true if the element should be generated, false if the generated
1444
     *         element should be ignored. In the case of multiple plugins, the
1445
     *         first plugin returning false will disable the calling of further
1446
     *         plugins.
1447
     */
1448
    default boolean sqlMapBaseColumnListElementGenerated(XmlElement element,
1449
            IntrospectedTable introspectedTable) {
1450
        return true;
1✔
1451
    }
1452

1453
    /**
1454
     * This method is called when the blobColumnList element is generated.
1455
     *
1456
     * @param element
1457
     *            the generated &lt;sql&gt; element
1458
     * @param introspectedTable
1459
     *            The class containing information about the table as
1460
     *            introspected from the database
1461
     * @return true if the element should be generated, false if the generated
1462
     *         element should be ignored. In the case of multiple plugins, the
1463
     *         first plugin returning false will disable the calling of further
1464
     *         plugins.
1465
     */
1466
    default boolean sqlMapBlobColumnListElementGenerated(XmlElement element,
1467
            IntrospectedTable introspectedTable) {
1468
        return true;
1✔
1469
    }
1470

1471
    /**
1472
     * This method is called when the insert element is generated.
1473
     *
1474
     * @param element
1475
     *            the generated &lt;insert&gt; element
1476
     * @param introspectedTable
1477
     *            The class containing information about the table as
1478
     *            introspected from the database
1479
     * @return true if the element should be generated, false if the generated
1480
     *         element should be ignored. In the case of multiple plugins, the
1481
     *         first plugin returning false will disable the calling of further
1482
     *         plugins.
1483
     */
1484
    default boolean sqlMapInsertElementGenerated(XmlElement element,
1485
            IntrospectedTable introspectedTable) {
1486
        return true;
1✔
1487
    }
1488

1489
    /**
1490
     * This method is called when the insert selective element is generated.
1491
     *
1492
     * @param element
1493
     *            the generated &lt;insert&gt; element
1494
     * @param introspectedTable
1495
     *            The class containing information about the table as
1496
     *            introspected from the database
1497
     * @return true if the element should be generated, false if the generated
1498
     *         element should be ignored. In the case of multiple plugins, the
1499
     *         first plugin returning false will disable the calling of further
1500
     *         plugins.
1501
     */
1502
    default boolean sqlMapInsertSelectiveElementGenerated(XmlElement element,
1503
            IntrospectedTable introspectedTable) {
1504
        return true;
1✔
1505
    }
1506

1507
    /**
1508
     * This method is called when the resultMap with BLOBs element is generated
1509
     * - this resultMap will extend the base resultMap.
1510
     *
1511
     * @param element
1512
     *            the generated &lt;resultMap&gt; element
1513
     * @param introspectedTable
1514
     *            The class containing information about the table as
1515
     *            introspected from the database
1516
     * @return true if the element should be generated, false if the generated
1517
     *         element should be ignored. In the case of multiple plugins, the
1518
     *         first plugin returning false will disable the calling of further
1519
     *         plugins.
1520
     */
1521
    default boolean sqlMapResultMapWithBLOBsElementGenerated(XmlElement element,
1522
            IntrospectedTable introspectedTable) {
1523
        return true;
1✔
1524
    }
1525

1526
    /**
1527
     * This method is called when the selectAll element is generated.
1528
     *
1529
     * @param element
1530
     *            the generated &lt;select&gt; element
1531
     * @param introspectedTable
1532
     *            The class containing information about the table as
1533
     *            introspected from the database
1534
     * @return true if the element should be generated, false if the generated
1535
     *         element should be ignored. In the case of multiple plugins, the
1536
     *         first plugin returning false will disable the calling of further
1537
     *         plugins.
1538
     */
1539
    default boolean sqlMapSelectAllElementGenerated(XmlElement element,
1540
            IntrospectedTable introspectedTable) {
1541
        return true;
1✔
1542
    }
1543

1544
    /**
1545
     * This method is called when the selectByPrimaryKey element is generated.
1546
     *
1547
     * @param element
1548
     *            the generated &lt;select&gt; element
1549
     * @param introspectedTable
1550
     *            The class containing information about the table as
1551
     *            introspected from the database
1552
     * @return true if the element should be generated, false if the generated
1553
     *         element should be ignored. In the case of multiple plugins, the
1554
     *         first plugin returning false will disable the calling of further
1555
     *         plugins.
1556
     */
1557
    default boolean sqlMapSelectByPrimaryKeyElementGenerated(XmlElement element,
1558
            IntrospectedTable introspectedTable) {
1559
        return true;
1✔
1560
    }
1561

1562
    /**
1563
     * This method is called when the selectByExample element is generated.
1564
     *
1565
     * @param element
1566
     *            the generated &lt;select&gt; element
1567
     * @param introspectedTable
1568
     *            The class containing information about the table as
1569
     *            introspected from the database
1570
     * @return true if the element should be generated, false if the generated
1571
     *         element should be ignored. In the case of multiple plugins, the
1572
     *         first plugin returning false will disable the calling of further
1573
     *         plugins.
1574
     */
1575
    default boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(
1576
            XmlElement element, IntrospectedTable introspectedTable) {
1577
        return true;
1✔
1578
    }
1579

1580
    /**
1581
     * This method is called when the selectByExampleWithBLOBs element is
1582
     * generated.
1583
     *
1584
     * @param element
1585
     *            the generated &lt;select&gt; element
1586
     * @param introspectedTable
1587
     *            The class containing information about the table as
1588
     *            introspected from the database
1589
     * @return true if the element should be generated, false if the generated
1590
     *         element should be ignored. In the case of multiple plugins, the
1591
     *         first plugin returning false will disable the calling of further
1592
     *         plugins.
1593
     */
1594
    default boolean sqlMapSelectByExampleWithBLOBsElementGenerated(XmlElement element,
1595
            IntrospectedTable introspectedTable) {
1596
        return true;
1✔
1597
    }
1598

1599
    /**
1600
     * This method is called when the updateByExampleSelective element is
1601
     * generated.
1602
     *
1603
     * @param element
1604
     *            the generated &lt;update&gt; element
1605
     * @param introspectedTable
1606
     *            The class containing information about the table as
1607
     *            introspected from the database
1608
     * @return true if the element should be generated, false if the generated
1609
     *         element should be ignored. In the case of multiple plugins, the
1610
     *         first plugin returning false will disable the calling of further
1611
     *         plugins.
1612
     */
1613
    default boolean sqlMapUpdateByExampleSelectiveElementGenerated(XmlElement element,
1614
            IntrospectedTable introspectedTable) {
1615
        return true;
1✔
1616
    }
1617

1618
    /**
1619
     * This method is called when the updateByExampleWithBLOBs element is
1620
     * generated.
1621
     *
1622
     * @param element
1623
     *            the generated &lt;update&gt; element
1624
     * @param introspectedTable
1625
     *            The class containing information about the table as
1626
     *            introspected from the database
1627
     * @return true if the element should be generated, false if the generated
1628
     *         element should be ignored. In the case of multiple plugins, the
1629
     *         first plugin returning false will disable the calling of further
1630
     *         plugins.
1631
     */
1632
    default boolean sqlMapUpdateByExampleWithBLOBsElementGenerated(XmlElement element,
1633
            IntrospectedTable introspectedTable) {
1634
        return true;
1✔
1635
    }
1636

1637
    /**
1638
     * This method is called when the updateByExampleWithourBLOBs element is
1639
     * generated.
1640
     *
1641
     * @param element
1642
     *            the generated &lt;update&gt; element
1643
     * @param introspectedTable
1644
     *            The class containing information about the table as
1645
     *            introspected from the database
1646
     * @return true if the element should be generated, false if the generated
1647
     *         element should be ignored. In the case of multiple plugins, the
1648
     *         first plugin returning false will disable the calling of further
1649
     *         plugins.
1650
     */
1651
    default boolean sqlMapUpdateByExampleWithoutBLOBsElementGenerated(
1652
            XmlElement element, IntrospectedTable introspectedTable) {
1653
        return true;
1✔
1654
    }
1655

1656
    /**
1657
     * This method is called when the updateByPrimaryKeySelective element is
1658
     * generated.
1659
     *
1660
     * @param element
1661
     *            the generated &lt;update&gt; element
1662
     * @param introspectedTable
1663
     *            The class containing information about the table as
1664
     *            introspected from the database
1665
     * @return true if the element should be generated, false if the generated
1666
     *         element should be ignored. In the case of multiple plugins, the
1667
     *         first plugin returning false will disable the calling of further
1668
     *         plugins.
1669
     */
1670
    default boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(
1671
            XmlElement element, IntrospectedTable introspectedTable) {
1672
        return true;
1✔
1673
    }
1674

1675
    /**
1676
     * This method is called when the updateByPrimaryKeyWithBLOBs element is
1677
     * generated.
1678
     *
1679
     * @param element
1680
     *            the generated &lt;update&gt; element
1681
     * @param introspectedTable
1682
     *            The class containing information about the table as
1683
     *            introspected from the database
1684
     * @return true if the element should be generated, false if the generated
1685
     *         element should be ignored. In the case of multiple plugins, the
1686
     *         first plugin returning false will disable the calling of further
1687
     *         plugins.
1688
     */
1689
    default boolean sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(
1690
            XmlElement element, IntrospectedTable introspectedTable) {
1691
        return true;
1✔
1692
    }
1693

1694
    /**
1695
     * This method is called when the updateByPrimaryKeyWithoutBLOBs element is
1696
     * generated.
1697
     *
1698
     * @param element
1699
     *            the generated &lt;update&gt; element
1700
     * @param introspectedTable
1701
     *            The class containing information about the table as
1702
     *            introspected from the database
1703
     * @return true if the element should be generated, false if the generated
1704
     *         element should be ignored. In the case of multiple plugins, the
1705
     *         first plugin returning false will disable the calling of further
1706
     *         plugins.
1707
     */
1708
    default boolean sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(
1709
            XmlElement element, IntrospectedTable introspectedTable) {
1710
        return true;
1✔
1711
    }
1712

1713
    /**
1714
     * This method is called when the SQL provider has been generated.
1715
     * Implement this method to add additional methods or fields to a generated
1716
     * SQL provider.
1717
     *
1718
     * @param topLevelClass
1719
     *            the generated provider
1720
     * @param introspectedTable
1721
     *            The class containing information about the table as
1722
     *            introspected from the database
1723
     * @return true if the provider should be generated, false if the generated
1724
     *         provider should be ignored. In the case of multiple plugins, the
1725
     *         first plugin returning false will disable the calling of further
1726
     *         plugins.
1727
     */
1728
    default boolean providerGenerated(TopLevelClass topLevelClass,
1729
            IntrospectedTable introspectedTable) {
1730
        return true;
1✔
1731
    }
1732

1733
    /**
1734
     * This method is called when the applyWhere method has
1735
     * been generated in the SQL provider.
1736
     *
1737
     * @param method
1738
     *            the generated applyWhere method
1739
     * @param topLevelClass
1740
     *            the partially generated provider class
1741
     *            You can add additional imported classes to the class
1742
     *            if necessary.
1743
     * @param introspectedTable
1744
     *            The class containing information about the table as
1745
     *            introspected from the database
1746
     * @return true if the method should be generated, false if the generated
1747
     *         method should be ignored. In the case of multiple plugins, the
1748
     *         first plugin returning false will disable the calling of further
1749
     *         plugins.
1750
     */
1751
    default boolean providerApplyWhereMethodGenerated(Method method,
1752
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1753
        return true;
1✔
1754
    }
1755

1756
    /**
1757
     * This method is called when the countByExample method has
1758
     * been generated in the SQL provider.
1759
     *
1760
     * @param method
1761
     *            the generated countByExample method
1762
     * @param topLevelClass
1763
     *            the partially generated provider class
1764
     *            You can add additional imported classes to the class
1765
     *            if necessary.
1766
     * @param introspectedTable
1767
     *            The class containing information about the table as
1768
     *            introspected from the database
1769
     * @return true if the method should be generated, false if the generated
1770
     *         method should be ignored. In the case of multiple plugins, the
1771
     *         first plugin returning false will disable the calling of further
1772
     *         plugins.
1773
     */
1774
    default boolean providerCountByExampleMethodGenerated(Method method,
1775
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1776
        return true;
1✔
1777
    }
1778

1779
    /**
1780
     * This method is called when the deleteByExample method has
1781
     * been generated in the SQL provider.
1782
     *
1783
     * @param method
1784
     *            the generated deleteByExample method
1785
     * @param topLevelClass
1786
     *            the partially generated provider class
1787
     *            You can add additional imported classes to the class
1788
     *            if necessary.
1789
     * @param introspectedTable
1790
     *            The class containing information about the table as
1791
     *            introspected from the database
1792
     * @return true if the method should be generated, false if the generated
1793
     *         method should be ignored. In the case of multiple plugins, the
1794
     *         first plugin returning false will disable the calling of further
1795
     *         plugins.
1796
     */
1797
    default boolean providerDeleteByExampleMethodGenerated(Method method,
1798
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1799
        return true;
1✔
1800
    }
1801

1802
    /**
1803
     * This method is called when the insertSelective method has
1804
     * been generated in the SQL provider.
1805
     *
1806
     * @param method
1807
     *            the generated insertSelective method
1808
     * @param topLevelClass
1809
     *            the partially generated provider class
1810
     *            You can add additional imported classes to the class
1811
     *            if necessary.
1812
     * @param introspectedTable
1813
     *            The class containing information about the table as
1814
     *            introspected from the database
1815
     * @return true if the method should be generated, false if the generated
1816
     *         method should be ignored. In the case of multiple plugins, the
1817
     *         first plugin returning false will disable the calling of further
1818
     *         plugins.
1819
     */
1820
    default boolean providerInsertSelectiveMethodGenerated(Method method,
1821
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1822
        return true;
1✔
1823
    }
1824

1825
    /**
1826
     * This method is called when the selectByExampleWithBLOBs method has
1827
     * been generated in the SQL provider.
1828
     *
1829
     * @param method
1830
     *            the generated selectByExampleWithBLOBs method
1831
     * @param topLevelClass
1832
     *            the partially generated provider class
1833
     *            You can add additional imported classes to the class
1834
     *            if necessary.
1835
     * @param introspectedTable
1836
     *            The class containing information about the table as
1837
     *            introspected from the database
1838
     * @return true if the method should be generated, false if the generated
1839
     *         method should be ignored. In the case of multiple plugins, the
1840
     *         first plugin returning false will disable the calling of further
1841
     *         plugins.
1842
     */
1843
    default boolean providerSelectByExampleWithBLOBsMethodGenerated(Method method,
1844
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1845
        return true;
1✔
1846
    }
1847

1848
    /**
1849
     * This method is called when the selectByExampleWithoutBLOBs method has
1850
     * been generated in the SQL provider.
1851
     *
1852
     * @param method
1853
     *            the generated selectByExampleWithoutBLOBs method
1854
     * @param topLevelClass
1855
     *            the partially generated provider class
1856
     *            You can add additional imported classes to the class
1857
     *            if necessary.
1858
     * @param introspectedTable
1859
     *            The class containing information about the table as
1860
     *            introspected from the database
1861
     * @return true if the method should be generated, false if the generated
1862
     *         method should be ignored. In the case of multiple plugins, the
1863
     *         first plugin returning false will disable the calling of further
1864
     *         plugins.
1865
     */
1866
    default boolean providerSelectByExampleWithoutBLOBsMethodGenerated(Method method,
1867
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1868
        return true;
1✔
1869
    }
1870

1871
    /**
1872
     * This method is called when the updateByExampleSelective method has
1873
     * been generated in the SQL provider.
1874
     *
1875
     * @param method
1876
     *            the generated updateByExampleSelective method
1877
     * @param topLevelClass
1878
     *            the partially generated provider class
1879
     *            You can add additional imported classes to the class
1880
     *            if necessary.
1881
     * @param introspectedTable
1882
     *            The class containing information about the table as
1883
     *            introspected from the database
1884
     * @return true if the method should be generated, false if the generated
1885
     *         method should be ignored. In the case of multiple plugins, the
1886
     *         first plugin returning false will disable the calling of further
1887
     *         plugins.
1888
     */
1889
    default boolean providerUpdateByExampleSelectiveMethodGenerated(Method method,
1890
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1891
        return true;
1✔
1892
    }
1893

1894
    /**
1895
     * This method is called when the updateByExampleWithBLOBs method has
1896
     * been generated in the SQL provider.
1897
     *
1898
     * @param method
1899
     *            the generated updateByExampleWithBLOBs method
1900
     * @param topLevelClass
1901
     *            the partially generated provider class
1902
     *            You can add additional imported classes to the class
1903
     *            if necessary.
1904
     * @param introspectedTable
1905
     *            The class containing information about the table as
1906
     *            introspected from the database
1907
     * @return true if the method should be generated, false if the generated
1908
     *         method should be ignored. In the case of multiple plugins, the
1909
     *         first plugin returning false will disable the calling of further
1910
     *         plugins.
1911
     */
1912
    default boolean providerUpdateByExampleWithBLOBsMethodGenerated(Method method,
1913
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1914
        return true;
1✔
1915
    }
1916

1917
    /**
1918
     * This method is called when the updateByExampleWithoutBLOBs method has
1919
     * been generated in the SQL provider.
1920
     *
1921
     * @param method
1922
     *            the generated updateByExampleWithoutBLOBs method
1923
     * @param topLevelClass
1924
     *            the partially generated provider class
1925
     *            You can add additional imported classes to the class
1926
     *            if necessary.
1927
     * @param introspectedTable
1928
     *            The class containing information about the table as
1929
     *            introspected from the database
1930
     * @return true if the method should be generated, false if the generated
1931
     *         method should be ignored. In the case of multiple plugins, the
1932
     *         first plugin returning false will disable the calling of further
1933
     *         plugins.
1934
     */
1935
    default boolean providerUpdateByExampleWithoutBLOBsMethodGenerated(Method method,
1936
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1937
        return true;
1✔
1938
    }
1939

1940
    /**
1941
     * This method is called when the updateByPrimaryKeySelective method has
1942
     * been generated in the SQL provider.
1943
     *
1944
     * @param method
1945
     *            the generated updateByPrimaryKeySelective method
1946
     * @param topLevelClass
1947
     *            the partially generated provider class
1948
     *            You can add additional imported classes to the class
1949
     *            if necessary.
1950
     * @param introspectedTable
1951
     *            The class containing information about the table as
1952
     *            introspected from the database
1953
     * @return true if the method should be generated, false if the generated
1954
     *         method should be ignored. In the case of multiple plugins, the
1955
     *         first plugin returning false will disable the calling of further
1956
     *         plugins.
1957
     */
1958
    default boolean providerUpdateByPrimaryKeySelectiveMethodGenerated(Method method,
1959
            TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
1960
        return true;
1✔
1961
    }
1962

1963
    /**
1964
     * This method is called when the MyBatis Dynamic SQL support class has
1965
     * been generated in the MyBatis Dynamic SQL runtime.
1966
     *
1967
     * @param supportClass
1968
     *            the generated MyBatis Dynamic SQL support class
1969
     *            You can add additional items to the generated class
1970
     *            if necessary.
1971
     * @param introspectedTable
1972
     *            The class containing information about the table as
1973
     *            introspected from the database
1974
     * @return true if the class should be generated, false if the generated
1975
     *         class should be ignored. In the case of multiple plugins, the
1976
     *         first plugin returning false will disable the calling of further
1977
     *         plugins.
1978
     */
1979
    default boolean dynamicSqlSupportGenerated(TopLevelClass supportClass, IntrospectedTable introspectedTable) {
1980
        return true;
1✔
1981
    }
1982

1983
    /**
1984
     * This method is called when the MyBatis Dynamic SQL support object has been generated. The format of the class
1985
     * is an outer object with an inner class. The inner class contains the table and column definitions. The outer
1986
     * (singleton) object contains a reference to an instance of the inner class, and shortcut properties that
1987
     * reference the columns of that instance.
1988
     *
1989
     * @param kotlinFile the generated Kotlin file containing the outer object and inner class
1990
     * @param outerSupportObject a reference to the outer object in the file
1991
     * @param innerSupportClass a reference to the inner class
1992
     * @param introspectedTable the class containing information about the table as
1993
     *                          introspected from the database
1994
     * @return true if the generated file should be kept
1995
     */
1996
    default boolean dynamicSqlSupportGenerated(KotlinFile kotlinFile, KotlinType outerSupportObject,
1997
                                               KotlinType innerSupportClass, IntrospectedTable introspectedTable) {
1998
        return true;
1✔
1999
    }
2000

2001
    /**
2002
     * This method is no longer called.
2003
     *
2004
     * @param extensionsFile
2005
     *     the partially generated file
2006
     * @param introspectedTable
2007
     *     The class containing information about the table as introspected from the database
2008
     * @return true if the file should be generated, false if the generated
2009
     *         file should be ignored. In the case of multiple plugins, the
2010
     *         first plugin returning false will disable the calling of further
2011
     *         plugins.
2012
     *
2013
     * @deprecated this method is no longer called
2014
     */
2015
    @Deprecated
2016
    default boolean mapperExtensionsGenerated(KotlinFile extensionsFile, IntrospectedTable introspectedTable) {
2017
        return true;
×
2018
    }
2019

2020
    default boolean mapperGenerated(KotlinFile mapperFile, KotlinType mapper, IntrospectedTable introspectedTable) {
2021
        return true;
1✔
2022
    }
2023

2024
    default boolean kotlinDataClassGenerated(KotlinFile kotlinFile, KotlinType dataClass,
2025
            IntrospectedTable introspectedTable) {
2026
        return true;
1✔
2027
    }
2028

2029
    default boolean clientColumnListPropertyGenerated(KotlinProperty kotlinProperty, KotlinFile kotlinFile,
2030
            IntrospectedTable introspectedTable) {
2031
        return true;
1✔
2032
    }
2033

2034
    default boolean clientInsertMultipleVarargMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
2035
            IntrospectedTable introspectedTable) {
2036
        return true;
1✔
2037
    }
2038

2039
    default boolean clientUpdateByPrimaryKeyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile,
2040
            IntrospectedTable introspectedTable) {
2041
        return true;
1✔
2042
    }
2043

2044
    /**
2045
     * The motivation for adding this method can be found in
2046
     * https://github.com/mybatis/generator/issues/1116
2047
     *
2048
     * <p>This method is called when the updateByPrimaryKey method
2049
     * has been generated in the dynamic SQL runtime client interface.
2050
     *
2051
     * @param method
2052
     *            the generated updateByPrimaryKey method
2053
     * @param interfaze
2054
     *            the partially implemented client interface. You can add
2055
     *            additional imported classes to the interface if
2056
     *            necessary.
2057
     * @param introspectedTable
2058
     *            The class containing information about the table as
2059
     *            introspected from the database
2060
     * @return true if the method should be generated, false if the generated
2061
     *         method should be ignored. In the case of multiple plugins, the
2062
     *         first plugin returning false will disable the calling of further
2063
     *         plugins.
2064
     */
2065
    default boolean clientUpdateByPrimaryKeyMethodGenerated(Method method,
2066
            Interface interfaze, IntrospectedTable introspectedTable) {
2067
        return clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(method, interfaze, introspectedTable);
1✔
2068
    }
2069

2070
    /**
2071
     * If false, the table will be skipped in code generation.
2072
     *
2073
     * @param introspectedTable the current table
2074
     * @return true if code should be generated for this table, else false
2075
     */
2076
    default boolean shouldGenerate(IntrospectedTable introspectedTable) {
2077
        return true;
1✔
2078
    }
2079
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc