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

mybatis / generator / 1942

12 Jan 2026 05:01PM UTC coverage: 88.75% (+0.4%) from 88.365%
1942

push

github

web-flow
Merge pull request #1412 from jeffgbutler/jspecify

Adopt JSpecify

2331 of 3162 branches covered (73.72%)

1800 of 1949 new or added lines in 202 files covered. (92.36%)

18 existing lines in 10 files now uncovered.

11384 of 12827 relevant lines covered (88.75%)

0.89 hits per line

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

95.82
/core/mybatis-generator-core/src/main/java/org/mybatis/generator/api/IntrospectedTable.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 static org.mybatis.generator.internal.util.StringUtility.isTrue;
19
import static org.mybatis.generator.internal.util.StringUtility.stringHasValue;
20

21
import java.util.ArrayList;
22
import java.util.EnumMap;
23
import java.util.HashMap;
24
import java.util.Iterator;
25
import java.util.List;
26
import java.util.Map;
27
import java.util.Objects;
28
import java.util.Optional;
29
import java.util.Properties;
30
import java.util.function.Function;
31
import java.util.stream.Stream;
32

33
import org.jspecify.annotations.Nullable;
34
import org.mybatis.generator.config.Context;
35
import org.mybatis.generator.config.GeneratedKey;
36
import org.mybatis.generator.config.JavaModelGeneratorConfiguration;
37
import org.mybatis.generator.config.ModelType;
38
import org.mybatis.generator.config.PropertyHolder;
39
import org.mybatis.generator.config.PropertyRegistry;
40
import org.mybatis.generator.config.TableConfiguration;
41
import org.mybatis.generator.internal.rules.ConditionalModelRules;
42
import org.mybatis.generator.internal.rules.FlatModelRules;
43
import org.mybatis.generator.internal.rules.HierarchicalModelRules;
44
import org.mybatis.generator.internal.rules.Rules;
45

46
/**
47
 * Base class for all code generator implementations. This class provides many
48
 * of the housekeeping methods needed to implement a code generator, with only
49
 * the actual code generation methods left unimplemented.
50
 *
51
 * @author Jeff Butler
52
 */
53
public abstract class IntrospectedTable {
54

55
    public enum TargetRuntime {
1✔
56
        MYBATIS3,
1✔
57
        MYBATIS3_DSQL
1✔
58
    }
59

60
    protected enum InternalAttribute {
1✔
61
        ATTR_PRIMARY_KEY_TYPE,
1✔
62
        ATTR_BASE_RECORD_TYPE,
1✔
63
        ATTR_RECORD_WITH_BLOBS_TYPE,
1✔
64
        ATTR_EXAMPLE_TYPE,
1✔
65
        ATTR_MYBATIS3_XML_MAPPER_PACKAGE,
1✔
66
        ATTR_MYBATIS3_XML_MAPPER_FILE_NAME,
1✔
67
        /** also used as XML Mapper namespace if a Java mapper is generated. */
68
        ATTR_MYBATIS3_JAVA_MAPPER_TYPE,
1✔
69
        /** used as XML Mapper namespace if no client is generated. */
70
        ATTR_MYBATIS3_FALLBACK_SQL_MAP_NAMESPACE,
1✔
71
        ATTR_FULLY_QUALIFIED_TABLE_NAME_AT_RUNTIME,
1✔
72
        ATTR_ALIASED_FULLY_QUALIFIED_TABLE_NAME_AT_RUNTIME,
1✔
73
        ATTR_COUNT_BY_EXAMPLE_STATEMENT_ID,
1✔
74
        ATTR_DELETE_BY_EXAMPLE_STATEMENT_ID,
1✔
75
        ATTR_DELETE_BY_PRIMARY_KEY_STATEMENT_ID,
1✔
76
        ATTR_INSERT_STATEMENT_ID,
1✔
77
        ATTR_INSERT_SELECTIVE_STATEMENT_ID,
1✔
78
        ATTR_SELECT_ALL_STATEMENT_ID,
1✔
79
        ATTR_SELECT_BY_EXAMPLE_STATEMENT_ID,
1✔
80
        ATTR_SELECT_BY_EXAMPLE_WITH_BLOBS_STATEMENT_ID,
1✔
81
        ATTR_SELECT_BY_PRIMARY_KEY_STATEMENT_ID,
1✔
82
        ATTR_UPDATE_BY_EXAMPLE_STATEMENT_ID,
1✔
83
        ATTR_UPDATE_BY_EXAMPLE_SELECTIVE_STATEMENT_ID,
1✔
84
        ATTR_UPDATE_BY_EXAMPLE_WITH_BLOBS_STATEMENT_ID,
1✔
85
        ATTR_UPDATE_BY_PRIMARY_KEY_STATEMENT_ID,
1✔
86
        ATTR_UPDATE_BY_PRIMARY_KEY_SELECTIVE_STATEMENT_ID,
1✔
87
        ATTR_UPDATE_BY_PRIMARY_KEY_WITH_BLOBS_STATEMENT_ID,
1✔
88
        ATTR_BASE_RESULT_MAP_ID,
1✔
89
        ATTR_RESULT_MAP_WITH_BLOBS_ID,
1✔
90
        ATTR_EXAMPLE_WHERE_CLAUSE_ID,
1✔
91
        ATTR_BASE_COLUMN_LIST_ID,
1✔
92
        ATTR_BLOB_COLUMN_LIST_ID,
1✔
93
        ATTR_MYBATIS3_UPDATE_BY_EXAMPLE_WHERE_CLAUSE_ID,
1✔
94
        ATTR_MYBATIS3_SQL_PROVIDER_TYPE,
1✔
95
        ATTR_MYBATIS_DYNAMIC_SQL_SUPPORT_TYPE,
1✔
96
        ATTR_KOTLIN_RECORD_TYPE,
1✔
97
        ATTR_MYBATIS_DYNAMIC_SQL_TABLE_OBJECT_NAME
1✔
98
    }
99

100
    /**
101
     * Only nullable because instances of this class are built through introspection. Not null in practice.
102
     */
103
    protected @Nullable TableConfiguration tableConfiguration;
104

105
    /**
106
     * Only nullable because instances of this class are built through introspection. Not null in practice.
107
     */
108
    protected @Nullable FullyQualifiedTable fullyQualifiedTable;
109

110
    /**
111
     * Only nullable because instances of this class are built through introspection. Not null in practice.
112
     */
113
    protected @Nullable Context context;
114

115
    /**
116
     * Only nullable because instances of this class are calculated on initialization. Not null in practice.
117
     */
118
    protected @Nullable Rules rules;
119

120
    protected final List<IntrospectedColumn> primaryKeyColumns = new ArrayList<>();
1✔
121

122
    protected final List<IntrospectedColumn> baseColumns = new ArrayList<>();
1✔
123

124
    protected final List<IntrospectedColumn> blobColumns = new ArrayList<>();
1✔
125

126
    protected TargetRuntime targetRuntime;
127

128
    /**
129
     * Attributes may be used by plugins to capture table related state between
130
     * the different plugin calls.
131
     */
132
    protected final Map<String, Object> attributes = new HashMap<>();
1✔
133

134
    /** Internal attributes are used to store commonly accessed items by all code generators. */
135
    protected final Map<IntrospectedTable.InternalAttribute, String> internalAttributes =
1✔
136
            new EnumMap<>(InternalAttribute.class);
137

138
    /**
139
     * Table remarks retrieved from database metadata.
140
     */
141
    protected @Nullable String remarks;
142

143
    /**
144
     * Table type retrieved from database metadata.
145
     *
146
     * <p>Non-null in practice
147
     */
148
    protected @Nullable String tableType;
149

150
    protected IntrospectedTable(TargetRuntime targetRuntime) {
1✔
151
        this.targetRuntime = targetRuntime;
1✔
152
    }
1✔
153

154
    public FullyQualifiedTable getFullyQualifiedTable() {
155
        return Objects.requireNonNull(fullyQualifiedTable);
1✔
156
    }
157

158
    public Optional<String> getSelectByExampleQueryId() {
159
        return getTableConfiguration().getSelectByExampleQueryId();
1✔
160
    }
161

162
    public Optional<String> getSelectByPrimaryKeyQueryId() {
163
        return getTableConfiguration().getSelectByPrimaryKeyQueryId();
1✔
164
    }
165

166
    public Optional<GeneratedKey> getGeneratedKey() {
167
        return getTableConfiguration().getGeneratedKey();
1✔
168
    }
169

170
    public Optional<IntrospectedColumn> getColumn(String columnName) {
171
        return Stream.of(primaryKeyColumns.stream(), baseColumns.stream(), blobColumns.stream())
1✔
172
                .flatMap(Function.identity())
1✔
173
                .filter(ic -> columnMatches(ic, columnName))
1✔
174
                .findFirst();
1✔
175
    }
176

177
    private boolean columnMatches(IntrospectedColumn introspectedColumn, String columnName) {
178
        if (introspectedColumn.isColumnNameDelimited()) {
1✔
179
            return introspectedColumn.getActualColumnName().equals(columnName);
1✔
180
        } else {
181
            return introspectedColumn.getActualColumnName().equalsIgnoreCase(columnName);
1✔
182
        }
183
    }
184

185
    /**
186
     * Returns true if any of the columns in the table are JDBC Dates (as
187
     * opposed to timestamps).
188
     *
189
     * @return true if the table contains DATE columns
190
     */
191
    public boolean hasJDBCDateColumns() {
192
        return Stream.of(primaryKeyColumns.stream(), baseColumns.stream())
1✔
193
                .flatMap(Function.identity())
1✔
194
                .anyMatch(IntrospectedColumn::isJDBCDateColumn);
1✔
195
    }
196

197
    /**
198
     * Returns true if any of the columns in the table are JDBC Times (as
199
     * opposed to timestamps).
200
     *
201
     * @return true if the table contains TIME columns
202
     */
203
    public boolean hasJDBCTimeColumns() {
204
        return Stream.of(primaryKeyColumns.stream(), baseColumns.stream())
1✔
205
                .flatMap(Function.identity())
1✔
206
                .anyMatch(IntrospectedColumn::isJDBCTimeColumn);
1✔
207
    }
208

209
    /**
210
     * Returns the columns in the primary key. If the generatePrimaryKeyClass()
211
     * method returns false, then these columns will be iterated as the
212
     * parameters of the selectByPrimaryKay and deleteByPrimaryKey methods
213
     *
214
     * @return a List of ColumnDefinition objects for columns in the primary key
215
     */
216
    public List<IntrospectedColumn> getPrimaryKeyColumns() {
217
        return primaryKeyColumns;
1✔
218
    }
219

220
    public boolean hasPrimaryKeyColumns() {
221
        return !primaryKeyColumns.isEmpty();
1✔
222
    }
223

224
    public List<IntrospectedColumn> getBaseColumns() {
225
        return baseColumns;
1✔
226
    }
227

228
    /**
229
     * Returns all columns in the table (for use by the select by primary key and
230
     * select by example with BLOBs methods).
231
     *
232
     * @return a List of ColumnDefinition objects for all columns in the table
233
     */
234
    public List<IntrospectedColumn> getAllColumns() {
235
        return Stream.of(primaryKeyColumns.stream(), baseColumns.stream(), blobColumns.stream())
1✔
236
                .flatMap(Function.identity())
1✔
237
                .toList();
1✔
238
    }
239

240
    /**
241
     * Returns all columns except BLOBs (for use by the select by example without BLOBs method).
242
     *
243
     * @return a List of ColumnDefinition objects for columns in the table that are non BLOBs
244
     */
245
    public List<IntrospectedColumn> getNonBLOBColumns() {
246
        return Stream.of(primaryKeyColumns.stream(), baseColumns.stream())
1✔
247
                .flatMap(Function.identity())
1✔
248
                .toList();
1✔
249
    }
250

251
    public int getNonBLOBColumnCount() {
252
        return primaryKeyColumns.size() + baseColumns.size();
×
253
    }
254

255
    public List<IntrospectedColumn> getNonPrimaryKeyColumns() {
256
        return Stream.of(baseColumns.stream(), blobColumns.stream())
1✔
257
                .flatMap(Function.identity())
1✔
258
                .toList();
1✔
259
    }
260

261
    public List<IntrospectedColumn> getBLOBColumns() {
262
        return blobColumns;
1✔
263
    }
264

265
    public boolean hasBLOBColumns() {
266
        return !blobColumns.isEmpty();
1✔
267
    }
268

269
    public boolean hasBaseColumns() {
270
        return !baseColumns.isEmpty();
1✔
271
    }
272

273
    public Rules getRules() {
274
        return Objects.requireNonNull(rules);
1✔
275
    }
276

277
    public @Nullable String getTableConfigurationProperty(String property) {
278
        return getTableConfiguration().getProperty(property);
1✔
279
    }
280

281
    public String getPrimaryKeyType() {
282
        return internalAttributes.get(InternalAttribute.ATTR_PRIMARY_KEY_TYPE);
1✔
283
    }
284

285
    /**
286
     * Gets the base record type.
287
     *
288
     * @return the type for the record (the class that holds non-primary key and non-BLOB fields). Note that the value
289
     *         will be calculated regardless of whether the table has these columns or not.
290
     */
291
    public String getBaseRecordType() {
292
        return internalAttributes.get(InternalAttribute.ATTR_BASE_RECORD_TYPE);
1✔
293
    }
294

295
    public String getKotlinRecordType() {
296
        return internalAttributes.get(InternalAttribute.ATTR_KOTLIN_RECORD_TYPE);
1✔
297
    }
298

299
    /**
300
     * Gets the example type.
301
     *
302
     * @return the type for the example class.
303
     */
304
    public String getExampleType() {
305
        return internalAttributes.get(InternalAttribute.ATTR_EXAMPLE_TYPE);
1✔
306
    }
307

308
    /**
309
     * Gets the record with blobs type.
310
     *
311
     * @return the type for the record with BLOBs class. Note that the value will be calculated regardless of whether
312
     *         the table has BLOB columns or not.
313
     */
314
    public String getRecordWithBLOBsType() {
315
        return internalAttributes.get(InternalAttribute.ATTR_RECORD_WITH_BLOBS_TYPE);
1✔
316
    }
317

318
    public String getMyBatis3SqlMapNamespace() {
319
        String namespace = getMyBatis3JavaMapperType();
1✔
320
        if (namespace == null) {
1✔
321
            namespace = getMyBatis3FallbackSqlMapNamespace();
1✔
322
        }
323

324
        return namespace;
1✔
325
    }
326

327
    public String getMyBatis3FallbackSqlMapNamespace() {
328
        return internalAttributes
1✔
329
                .get(InternalAttribute.ATTR_MYBATIS3_FALLBACK_SQL_MAP_NAMESPACE);
1✔
330
    }
331

332
    public boolean hasAnyColumns() {
333
        return hasPrimaryKeyColumns() || hasBaseColumns() || hasBLOBColumns();
1!
334
    }
335

336
    public void setTableConfiguration(TableConfiguration tableConfiguration) {
337
        this.tableConfiguration = tableConfiguration;
1✔
338
    }
1✔
339

340
    public void setFullyQualifiedTable(FullyQualifiedTable fullyQualifiedTable) {
341
        this.fullyQualifiedTable = fullyQualifiedTable;
1✔
342
    }
1✔
343

344
    public void setContext(Context context) {
345
        this.context = context;
1✔
346
    }
1✔
347

348
    public void addColumn(IntrospectedColumn introspectedColumn) {
349
        if (introspectedColumn.isBLOBColumn()) {
1✔
350
            blobColumns.add(introspectedColumn);
1✔
351
        } else {
352
            baseColumns.add(introspectedColumn);
1✔
353
        }
354

355
        introspectedColumn.setIntrospectedTable(this);
1✔
356
    }
1✔
357

358
    public void addPrimaryKeyColumn(String columnName) {
359
        boolean found = false;
1✔
360
        // first search base columns
361
        Iterator<IntrospectedColumn> iter = baseColumns.iterator();
1✔
362
        while (iter.hasNext()) {
1!
363
            IntrospectedColumn introspectedColumn = iter.next();
1✔
364
            if (introspectedColumn.getActualColumnName().equals(columnName)) {
1✔
365
                primaryKeyColumns.add(introspectedColumn);
1✔
366
                iter.remove();
1✔
367
                found = true;
1✔
368
                break;
1✔
369
            }
370
        }
1✔
371

372
        // search blob columns in the weird event that a blob is the primary key
373
        if (!found) {
1!
374
            iter = blobColumns.iterator();
×
375
            while (iter.hasNext()) {
×
376
                IntrospectedColumn introspectedColumn = iter.next();
×
377
                if (introspectedColumn.getActualColumnName().equals(columnName)) {
×
378
                    primaryKeyColumns.add(introspectedColumn);
×
379
                    iter.remove();
×
380
                    break;
×
381
                }
382
            }
×
383
        }
384
    }
1✔
385

386
    public Object getAttribute(String name) {
387
        return attributes.get(name);
×
388
    }
389

390
    public void removeAttribute(String name) {
391
        attributes.remove(name);
×
392
    }
×
393

394
    public void setAttribute(String name, Object value) {
395
        attributes.put(name, value);
×
396
    }
×
397

398
    public void initialize() {
399
        calculateJavaClientAttributes();
1✔
400
        calculateModelAttributes();
1✔
401
        calculateXmlAttributes();
1✔
402

403
        switch (getTableConfiguration().getModelType()) {
1!
404
        case HIERARCHICAL:
405
            rules = new HierarchicalModelRules(this);
1✔
406
            break;
1✔
407
        case FLAT:
408
            rules = new FlatModelRules(this);
1✔
409
            break;
1✔
410
        case CONDITIONAL:
411
            rules = new ConditionalModelRules(this);
1✔
412
            break;
413
        }
414

415
        getContext().getPlugins().initialized(this);
1✔
416
    }
1✔
417

418
    protected void calculateXmlAttributes() {
419
        setMyBatis3XmlMapperFileName(calculateMyBatis3XmlMapperFileName());
1✔
420
        setMyBatis3XmlMapperPackage(calculateSqlMapPackage());
1✔
421

422
        setMyBatis3FallbackSqlMapNamespace(calculateMyBatis3FallbackSqlMapNamespace());
1✔
423

424
        setSqlMapFullyQualifiedRuntimeTableName(calculateSqlMapFullyQualifiedRuntimeTableName());
1✔
425
        setSqlMapAliasedFullyQualifiedRuntimeTableName(calculateSqlMapAliasedFullyQualifiedRuntimeTableName());
1✔
426

427
        setCountByExampleStatementId("countByExample"); //$NON-NLS-1$
1✔
428
        setDeleteByExampleStatementId("deleteByExample"); //$NON-NLS-1$
1✔
429
        setDeleteByPrimaryKeyStatementId("deleteByPrimaryKey"); //$NON-NLS-1$
1✔
430
        setInsertStatementId("insert"); //$NON-NLS-1$
1✔
431
        setInsertSelectiveStatementId("insertSelective"); //$NON-NLS-1$
1✔
432
        setSelectAllStatementId("selectAll"); //$NON-NLS-1$
1✔
433
        setSelectByExampleStatementId("selectByExample"); //$NON-NLS-1$
1✔
434
        setSelectByExampleWithBLOBsStatementId("selectByExampleWithBLOBs"); //$NON-NLS-1$
1✔
435
        setSelectByPrimaryKeyStatementId("selectByPrimaryKey"); //$NON-NLS-1$
1✔
436
        setUpdateByExampleStatementId("updateByExample"); //$NON-NLS-1$
1✔
437
        setUpdateByExampleSelectiveStatementId("updateByExampleSelective"); //$NON-NLS-1$
1✔
438
        setUpdateByExampleWithBLOBsStatementId("updateByExampleWithBLOBs"); //$NON-NLS-1$
1✔
439
        setUpdateByPrimaryKeyStatementId("updateByPrimaryKey"); //$NON-NLS-1$
1✔
440
        setUpdateByPrimaryKeySelectiveStatementId("updateByPrimaryKeySelective"); //$NON-NLS-1$
1✔
441
        setUpdateByPrimaryKeyWithBLOBsStatementId("updateByPrimaryKeyWithBLOBs"); //$NON-NLS-1$
1✔
442
        setBaseResultMapId("BaseResultMap"); //$NON-NLS-1$
1✔
443
        setResultMapWithBLOBsId("ResultMapWithBLOBs"); //$NON-NLS-1$
1✔
444
        setExampleWhereClauseId("Example_Where_Clause"); //$NON-NLS-1$
1✔
445
        setBaseColumnListId("Base_Column_List"); //$NON-NLS-1$
1✔
446
        setBlobColumnListId("Blob_Column_List"); //$NON-NLS-1$
1✔
447
        setMyBatis3UpdateByExampleWhereClauseId("Update_By_Example_Where_Clause"); //$NON-NLS-1$
1✔
448
    }
1✔
449

450
    public void setBlobColumnListId(String s) {
451
        internalAttributes.put(InternalAttribute.ATTR_BLOB_COLUMN_LIST_ID, s);
1✔
452
    }
1✔
453

454
    public void setBaseColumnListId(String s) {
455
        internalAttributes.put(InternalAttribute.ATTR_BASE_COLUMN_LIST_ID, s);
1✔
456
    }
1✔
457

458
    public void setExampleWhereClauseId(String s) {
459
        internalAttributes.put(InternalAttribute.ATTR_EXAMPLE_WHERE_CLAUSE_ID, s);
1✔
460
    }
1✔
461

462
    public void setMyBatis3UpdateByExampleWhereClauseId(String s) {
463
        internalAttributes.put(InternalAttribute.ATTR_MYBATIS3_UPDATE_BY_EXAMPLE_WHERE_CLAUSE_ID, s);
1✔
464
    }
1✔
465

466
    public void setResultMapWithBLOBsId(String s) {
467
        internalAttributes.put(InternalAttribute.ATTR_RESULT_MAP_WITH_BLOBS_ID, s);
1✔
468
    }
1✔
469

470
    public void setBaseResultMapId(String s) {
471
        internalAttributes.put(InternalAttribute.ATTR_BASE_RESULT_MAP_ID, s);
1✔
472
    }
1✔
473

474
    public void setUpdateByPrimaryKeyWithBLOBsStatementId(String s) {
475
        internalAttributes.put(InternalAttribute.ATTR_UPDATE_BY_PRIMARY_KEY_WITH_BLOBS_STATEMENT_ID, s);
1✔
476
    }
1✔
477

478
    public void setUpdateByPrimaryKeySelectiveStatementId(String s) {
479
        internalAttributes.put(InternalAttribute.ATTR_UPDATE_BY_PRIMARY_KEY_SELECTIVE_STATEMENT_ID, s);
1✔
480
    }
1✔
481

482
    public void setUpdateByPrimaryKeyStatementId(String s) {
483
        internalAttributes.put(InternalAttribute.ATTR_UPDATE_BY_PRIMARY_KEY_STATEMENT_ID, s);
1✔
484
    }
1✔
485

486
    public void setUpdateByExampleWithBLOBsStatementId(String s) {
487
        internalAttributes.put(InternalAttribute.ATTR_UPDATE_BY_EXAMPLE_WITH_BLOBS_STATEMENT_ID, s);
1✔
488
    }
1✔
489

490
    public void setUpdateByExampleSelectiveStatementId(String s) {
491
        internalAttributes.put(InternalAttribute.ATTR_UPDATE_BY_EXAMPLE_SELECTIVE_STATEMENT_ID, s);
1✔
492
    }
1✔
493

494
    public void setUpdateByExampleStatementId(String s) {
495
        internalAttributes.put(InternalAttribute.ATTR_UPDATE_BY_EXAMPLE_STATEMENT_ID, s);
1✔
496
    }
1✔
497

498
    public void setSelectByPrimaryKeyStatementId(String s) {
499
        internalAttributes.put(InternalAttribute.ATTR_SELECT_BY_PRIMARY_KEY_STATEMENT_ID, s);
1✔
500
    }
1✔
501

502
    public void setSelectByExampleWithBLOBsStatementId(String s) {
503
        internalAttributes.put(InternalAttribute.ATTR_SELECT_BY_EXAMPLE_WITH_BLOBS_STATEMENT_ID, s);
1✔
504
    }
1✔
505

506
    public void setSelectAllStatementId(String s) {
507
        internalAttributes.put(InternalAttribute.ATTR_SELECT_ALL_STATEMENT_ID, s);
1✔
508
    }
1✔
509

510
    public void setSelectByExampleStatementId(String s) {
511
        internalAttributes.put(InternalAttribute.ATTR_SELECT_BY_EXAMPLE_STATEMENT_ID, s);
1✔
512
    }
1✔
513

514
    public void setInsertSelectiveStatementId(String s) {
515
        internalAttributes.put(InternalAttribute.ATTR_INSERT_SELECTIVE_STATEMENT_ID, s);
1✔
516
    }
1✔
517

518
    public void setInsertStatementId(String s) {
519
        internalAttributes.put(InternalAttribute.ATTR_INSERT_STATEMENT_ID, s);
1✔
520
    }
1✔
521

522
    public void setDeleteByPrimaryKeyStatementId(String s) {
523
        internalAttributes.put(InternalAttribute.ATTR_DELETE_BY_PRIMARY_KEY_STATEMENT_ID, s);
1✔
524
    }
1✔
525

526
    public void setDeleteByExampleStatementId(String s) {
527
        internalAttributes.put(InternalAttribute.ATTR_DELETE_BY_EXAMPLE_STATEMENT_ID, s);
1✔
528
    }
1✔
529

530
    public void setCountByExampleStatementId(String s) {
531
        internalAttributes.put(InternalAttribute.ATTR_COUNT_BY_EXAMPLE_STATEMENT_ID, s);
1✔
532
    }
1✔
533

534
    public String getBlobColumnListId() {
535
        return internalAttributes.get(InternalAttribute.ATTR_BLOB_COLUMN_LIST_ID);
1✔
536
    }
537

538
    public String getBaseColumnListId() {
539
        return internalAttributes.get(InternalAttribute.ATTR_BASE_COLUMN_LIST_ID);
1✔
540
    }
541

542
    public String getExampleWhereClauseId() {
543
        return internalAttributes.get(InternalAttribute.ATTR_EXAMPLE_WHERE_CLAUSE_ID);
1✔
544
    }
545

546
    public String getMyBatis3UpdateByExampleWhereClauseId() {
547
        return internalAttributes.get(InternalAttribute.ATTR_MYBATIS3_UPDATE_BY_EXAMPLE_WHERE_CLAUSE_ID);
1✔
548
    }
549

550
    public String getResultMapWithBLOBsId() {
551
        return internalAttributes.get(InternalAttribute.ATTR_RESULT_MAP_WITH_BLOBS_ID);
1✔
552
    }
553

554
    public String getBaseResultMapId() {
555
        return internalAttributes.get(InternalAttribute.ATTR_BASE_RESULT_MAP_ID);
1✔
556
    }
557

558
    public String getUpdateByPrimaryKeyWithBLOBsStatementId() {
559
        return internalAttributes.get(InternalAttribute.ATTR_UPDATE_BY_PRIMARY_KEY_WITH_BLOBS_STATEMENT_ID);
1✔
560
    }
561

562
    public String getUpdateByPrimaryKeySelectiveStatementId() {
563
        return internalAttributes.get(InternalAttribute.ATTR_UPDATE_BY_PRIMARY_KEY_SELECTIVE_STATEMENT_ID);
1✔
564
    }
565

566
    public String getUpdateByPrimaryKeyStatementId() {
567
        return internalAttributes.get(InternalAttribute.ATTR_UPDATE_BY_PRIMARY_KEY_STATEMENT_ID);
1✔
568
    }
569

570
    public String getUpdateByExampleWithBLOBsStatementId() {
571
        return internalAttributes.get(InternalAttribute.ATTR_UPDATE_BY_EXAMPLE_WITH_BLOBS_STATEMENT_ID);
1✔
572
    }
573

574
    public String getUpdateByExampleSelectiveStatementId() {
575
        return internalAttributes.get(InternalAttribute.ATTR_UPDATE_BY_EXAMPLE_SELECTIVE_STATEMENT_ID);
1✔
576
    }
577

578
    public String getUpdateByExampleStatementId() {
579
        return internalAttributes.get(InternalAttribute.ATTR_UPDATE_BY_EXAMPLE_STATEMENT_ID);
1✔
580
    }
581

582
    public String getSelectByPrimaryKeyStatementId() {
583
        return internalAttributes.get(InternalAttribute.ATTR_SELECT_BY_PRIMARY_KEY_STATEMENT_ID);
1✔
584
    }
585

586
    public String getSelectByExampleWithBLOBsStatementId() {
587
        return internalAttributes.get(InternalAttribute.ATTR_SELECT_BY_EXAMPLE_WITH_BLOBS_STATEMENT_ID);
1✔
588
    }
589

590
    public String getSelectAllStatementId() {
591
        return internalAttributes.get(InternalAttribute.ATTR_SELECT_ALL_STATEMENT_ID);
1✔
592
    }
593

594
    public String getSelectByExampleStatementId() {
595
        return internalAttributes.get(InternalAttribute.ATTR_SELECT_BY_EXAMPLE_STATEMENT_ID);
1✔
596
    }
597

598
    public String getInsertSelectiveStatementId() {
599
        return internalAttributes.get(InternalAttribute.ATTR_INSERT_SELECTIVE_STATEMENT_ID);
1✔
600
    }
601

602
    public String getInsertStatementId() {
603
        return internalAttributes.get(InternalAttribute.ATTR_INSERT_STATEMENT_ID);
1✔
604
    }
605

606
    public String getDeleteByPrimaryKeyStatementId() {
607
        return internalAttributes.get(InternalAttribute.ATTR_DELETE_BY_PRIMARY_KEY_STATEMENT_ID);
1✔
608
    }
609

610
    public String getDeleteByExampleStatementId() {
611
        return internalAttributes.get(InternalAttribute.ATTR_DELETE_BY_EXAMPLE_STATEMENT_ID);
1✔
612
    }
613

614
    public String getCountByExampleStatementId() {
615
        return internalAttributes.get(InternalAttribute.ATTR_COUNT_BY_EXAMPLE_STATEMENT_ID);
1✔
616
    }
617

618
    public String getMyBatisDynamicSQLTableObjectName() {
619
        return internalAttributes.get(InternalAttribute.ATTR_MYBATIS_DYNAMIC_SQL_TABLE_OBJECT_NAME);
1✔
620
    }
621

622
    public void setMyBatisDynamicSQLTableObjectName(String name) {
623
        internalAttributes.put(InternalAttribute.ATTR_MYBATIS_DYNAMIC_SQL_TABLE_OBJECT_NAME, name);
1✔
624
    }
1✔
625

626
    private boolean isSubPackagesEnabled(PropertyHolder propertyHolder) {
627
        return isTrue(propertyHolder.getProperty(PropertyRegistry.ANY_ENABLE_SUB_PACKAGES));
1✔
628
    }
629

630
    protected @Nullable String calculateJavaClientInterfacePackage() {
631
        return getContext().getJavaClientGeneratorConfiguration()
1✔
632
                .map(c -> c.getTargetPackage()
1✔
633
                        + getFullyQualifiedTable().getSubPackageForClientOrSqlMap(isSubPackagesEnabled(c)))
1✔
634
                .orElse(null);
1✔
635
    }
636

637
    protected @Nullable String calculateDynamicSqlSupportPackage() {
638
        return getContext().getJavaClientGeneratorConfiguration()
1✔
639
                .map(c -> {
1✔
640
                    String packkage = c.getProperty(PropertyRegistry.CLIENT_DYNAMIC_SQL_SUPPORT_PACKAGE);
1✔
641
                    if (stringHasValue(packkage)) {
1✔
642
                        return packkage
1✔
643
                                + getFullyQualifiedTable().getSubPackageForClientOrSqlMap(isSubPackagesEnabled(c));
1✔
644
                    } else {
645
                        return calculateJavaClientInterfacePackage();
1✔
646
                    }
647
                }).orElse(null);
1✔
648
    }
649

650
    protected void calculateJavaClientAttributes() {
651
        if (getContext().getJavaClientGeneratorConfiguration().isEmpty()) {
1✔
652
            return;
1✔
653
        }
654

655
        StringBuilder sb = new StringBuilder();
1✔
656
        sb.append(calculateJavaClientInterfacePackage());
1✔
657
        sb.append('.');
1✔
658
        if (stringHasValue(getTableConfiguration().getMapperName())) {
1✔
659
            sb.append(getTableConfiguration().getMapperName());
1✔
660
        } else {
661
            getFullyQualifiedTable().getDomainObjectSubPackage().ifPresent(sp -> sb.append(sp).append('.'));
1✔
662
            sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
663
            sb.append("Mapper"); //$NON-NLS-1$
1✔
664
        }
665
        setMyBatis3JavaMapperType(sb.toString());
1✔
666

667
        sb.setLength(0);
1✔
668
        sb.append(calculateJavaClientInterfacePackage());
1✔
669
        sb.append('.');
1✔
670
        if (stringHasValue(getTableConfiguration().getSqlProviderName())) {
1!
NEW
671
            sb.append(getTableConfiguration().getSqlProviderName());
×
672
        } else {
673
            getFullyQualifiedTable().getDomainObjectSubPackage().ifPresent(sp -> sb.append(sp).append('.'));
1✔
674
            sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
675
            sb.append("SqlProvider"); //$NON-NLS-1$
1✔
676
        }
677
        setMyBatis3SqlProviderType(sb.toString());
1✔
678

679
        sb.setLength(0);
1✔
680
        sb.append(calculateDynamicSqlSupportPackage());
1✔
681
        sb.append('.');
1✔
682
        if (stringHasValue(getTableConfiguration().getDynamicSqlSupportClassName())) {
1✔
683
            sb.append(getTableConfiguration().getDynamicSqlSupportClassName());
1✔
684
        } else {
685
            getFullyQualifiedTable().getDomainObjectSubPackage().ifPresent(sp -> sb.append(sp).append('.'));
1✔
686
            sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
687
            sb.append("DynamicSqlSupport"); //$NON-NLS-1$
1✔
688
        }
689
        setMyBatisDynamicSqlSupportType(sb.toString());
1✔
690

691
        if (stringHasValue(getTableConfiguration().getDynamicSqlTableObjectName())) {
1✔
692
            setMyBatisDynamicSQLTableObjectName(getTableConfiguration().getDynamicSqlTableObjectName());
1✔
693
        } else {
694
            setMyBatisDynamicSQLTableObjectName(getFullyQualifiedTable().getDomainObjectName());
1✔
695
        }
696
    }
1✔
697

698
    protected String calculateJavaModelPackage() {
699
        JavaModelGeneratorConfiguration config = getContext().getJavaModelGeneratorConfiguration();
1✔
700

701
        return config.getTargetPackage() + getFullyQualifiedTable().getSubPackageForModel(isSubPackagesEnabled(config));
1✔
702
    }
703

704
    protected void calculateModelAttributes() {
705
        String pakkage = calculateJavaModelPackage();
1✔
706

707
        StringBuilder sb = new StringBuilder();
1✔
708
        sb.append(pakkage);
1✔
709
        sb.append('.');
1✔
710
        sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
711
        sb.append("Key"); //$NON-NLS-1$
1✔
712
        setPrimaryKeyType(sb.toString());
1✔
713

714
        sb.setLength(0);
1✔
715
        sb.append(pakkage);
1✔
716
        sb.append('.');
1✔
717
        sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
718
        setBaseRecordType(sb.toString());
1✔
719

720
        sb.setLength(0);
1✔
721
        sb.append(pakkage);
1✔
722
        sb.append('.');
1✔
723
        sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
724
        setKotlinRecordType(sb.toString());
1✔
725

726
        sb.setLength(0);
1✔
727
        sb.append(pakkage);
1✔
728
        sb.append('.');
1✔
729
        sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
730
        sb.append("WithBLOBs"); //$NON-NLS-1$
1✔
731
        setRecordWithBLOBsType(sb.toString());
1✔
732

733
        String exampleTargetPackage = calculateJavaModelExamplePackage();
1✔
734
        sb.setLength(0);
1✔
735
        sb.append(exampleTargetPackage);
1✔
736
        sb.append('.');
1✔
737
        sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
738
        sb.append("Example"); //$NON-NLS-1$
1✔
739
        setExampleType(sb.toString());
1✔
740
    }
1✔
741

742
    /**
743
     * If property exampleTargetPackage specified for example use the specified value, else
744
     * use default value (targetPackage).
745
     *
746
     * @return the calculated package
747
     */
748
    protected String calculateJavaModelExamplePackage() {
749
        JavaModelGeneratorConfiguration config = getContext().getJavaModelGeneratorConfiguration();
1✔
750
        String exampleTargetPackage = config.getProperty(PropertyRegistry.MODEL_GENERATOR_EXAMPLE_PACKAGE);
1✔
751
        if (!stringHasValue(exampleTargetPackage)) {
1✔
752
            return calculateJavaModelPackage();
1✔
753
        }
754

755
        return exampleTargetPackage + getFullyQualifiedTable().getSubPackageForModel(isSubPackagesEnabled(config));
1✔
756
    }
757

758
    protected String calculateSqlMapPackage() {
759
        StringBuilder sb = new StringBuilder();
1✔
760
        // config can be null if the Java client does not require XML
761
        getContext().getSqlMapGeneratorConfiguration().ifPresent(config -> {
1✔
762
            sb.append(config.getTargetPackage());
1✔
763
            sb.append(getFullyQualifiedTable().getSubPackageForClientOrSqlMap(isSubPackagesEnabled(config)));
1✔
764
            if (stringHasValue(getTableConfiguration().getMapperName())) {
1✔
765
                String mapperName = getTableConfiguration().getMapperName();
1✔
766
                int ind = mapperName.lastIndexOf('.');
1✔
767
                if (ind != -1) {
1✔
768
                    sb.append('.').append(mapperName, 0, ind);
1✔
769
                }
770
            } else {
1✔
771
                getFullyQualifiedTable().getDomainObjectSubPackage().ifPresent(sp -> sb.append('.').append(sp));
1✔
772
            }
773
        });
1✔
774

775
        return sb.toString();
1✔
776
    }
777

778
    protected String calculateMyBatis3XmlMapperFileName() {
779
        StringBuilder sb = new StringBuilder();
1✔
780
        if (stringHasValue(getTableConfiguration().getMapperName())) {
1✔
781
            String mapperName = getTableConfiguration().getMapperName();
1✔
782
            int ind = mapperName.lastIndexOf('.');
1✔
783
            if (ind == -1) {
1✔
784
                sb.append(mapperName);
1✔
785
            } else {
786
                sb.append(mapperName.substring(ind + 1));
1✔
787
            }
788
            sb.append(".xml"); //$NON-NLS-1$
1✔
789
        } else {
1✔
790
            sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
791
            sb.append("Mapper.xml"); //$NON-NLS-1$
1✔
792
        }
793
        return sb.toString();
1✔
794
    }
795

796
    protected String calculateMyBatis3FallbackSqlMapNamespace() {
797
        StringBuilder sb = new StringBuilder();
1✔
798
        sb.append(calculateSqlMapPackage());
1✔
799
        sb.append('.');
1✔
800
        if (stringHasValue(getTableConfiguration().getMapperName())) {
1✔
801
            sb.append(getTableConfiguration().getMapperName());
1✔
802
        } else {
803
            sb.append(getFullyQualifiedTable().getDomainObjectName());
1✔
804
            sb.append("Mapper"); //$NON-NLS-1$
1✔
805
        }
806
        return sb.toString();
1✔
807
    }
808

809
    protected String calculateSqlMapFullyQualifiedRuntimeTableName() {
810
        return getFullyQualifiedTable().getFullyQualifiedTableNameAtRuntime();
1✔
811
    }
812

813
    protected String calculateSqlMapAliasedFullyQualifiedRuntimeTableName() {
814
        return getFullyQualifiedTable().getAliasedFullyQualifiedTableNameAtRuntime();
1✔
815
    }
816

817
    public String getFullyQualifiedTableNameAtRuntime() {
818
        return internalAttributes.get(InternalAttribute.ATTR_FULLY_QUALIFIED_TABLE_NAME_AT_RUNTIME);
1✔
819
    }
820

821
    public String getAliasedFullyQualifiedTableNameAtRuntime() {
822
        return internalAttributes.get(InternalAttribute.ATTR_ALIASED_FULLY_QUALIFIED_TABLE_NAME_AT_RUNTIME);
1✔
823
    }
824

825
    /**
826
     * This method can be used to initialize the generators before they will be called.
827
     *
828
     * <p>This method is called after all the setX methods, but before getNumberOfSubtasks(), getGeneratedJavaFiles, and
829
     * getGeneratedXmlFiles.
830
     *
831
     * @param warnings
832
     *            the warnings
833
     * @param progressCallback
834
     *            the progress callback
835
     */
836
    public abstract void calculateGenerators(List<String> warnings, ProgressCallback progressCallback);
837

838
    /**
839
     * This method should return a list of generated Java files related to this
840
     * table. This list could include various types of model classes, as well as
841
     * DAO classes.
842
     *
843
     * @return the list of generated Java files for this table
844
     */
845
    public abstract List<GeneratedJavaFile> getGeneratedJavaFiles();
846

847
    /**
848
     * This method should return a list of generated XML files related to this
849
     * table. Most implementations will only return one file - the generated
850
     * SqlMap file.
851
     *
852
     * @return the list of generated XML files for this table
853
     */
854
    public abstract List<GeneratedXmlFile> getGeneratedXmlFiles();
855

856
    /**
857
     * This method should return a list of generated Kotlin files related to this
858
     * table. This list could include a data classes, a mapper interface, extension methods, etc.
859
     *
860
     * @return the list of generated Kotlin files for this table
861
     */
862
    public abstract List<GeneratedKotlinFile> getGeneratedKotlinFiles();
863

864
    /**
865
     * This method should return the number of progress messages that will be
866
     * sent during the generation phase.
867
     *
868
     * @return the number of progress messages
869
     */
870
    public abstract int getGenerationSteps();
871

872
    /**
873
     * This method exists to give plugins the opportunity to replace the calculated rules if necessary.
874
     *
875
     * @param rules
876
     *            the new rules
877
     */
878
    public void setRules(Rules rules) {
879
        this.rules = rules;
×
880
    }
×
881

882
    public TableConfiguration getTableConfiguration() {
883
        return Objects.requireNonNull(tableConfiguration);
1✔
884
    }
885

886
    public void setPrimaryKeyType(String primaryKeyType) {
887
        internalAttributes.put(InternalAttribute.ATTR_PRIMARY_KEY_TYPE, primaryKeyType);
1✔
888
    }
1✔
889

890
    public void setBaseRecordType(String baseRecordType) {
891
        internalAttributes.put(InternalAttribute.ATTR_BASE_RECORD_TYPE, baseRecordType);
1✔
892
    }
1✔
893

894
    public void setKotlinRecordType(String kotlinRecordType) {
895
        internalAttributes.put(InternalAttribute.ATTR_KOTLIN_RECORD_TYPE, kotlinRecordType);
1✔
896
    }
1✔
897

898
    public void setRecordWithBLOBsType(String recordWithBLOBsType) {
899
        internalAttributes.put(InternalAttribute.ATTR_RECORD_WITH_BLOBS_TYPE, recordWithBLOBsType);
1✔
900
    }
1✔
901

902
    public void setExampleType(String exampleType) {
903
        internalAttributes.put(InternalAttribute.ATTR_EXAMPLE_TYPE, exampleType);
1✔
904
    }
1✔
905

906
    public void setMyBatis3FallbackSqlMapNamespace(String sqlMapNamespace) {
907
        internalAttributes.put(InternalAttribute.ATTR_MYBATIS3_FALLBACK_SQL_MAP_NAMESPACE, sqlMapNamespace);
1✔
908
    }
1✔
909

910
    public void setSqlMapFullyQualifiedRuntimeTableName(String fullyQualifiedRuntimeTableName) {
911
        internalAttributes.put(InternalAttribute.ATTR_FULLY_QUALIFIED_TABLE_NAME_AT_RUNTIME,
1✔
912
                fullyQualifiedRuntimeTableName);
913
    }
1✔
914

915
    public void setSqlMapAliasedFullyQualifiedRuntimeTableName(String aliasedFullyQualifiedRuntimeTableName) {
916
        internalAttributes.put(InternalAttribute.ATTR_ALIASED_FULLY_QUALIFIED_TABLE_NAME_AT_RUNTIME,
1✔
917
                        aliasedFullyQualifiedRuntimeTableName);
918
    }
1✔
919

920
    public String getMyBatis3XmlMapperPackage() {
921
        return internalAttributes.get(InternalAttribute.ATTR_MYBATIS3_XML_MAPPER_PACKAGE);
1✔
922
    }
923

924
    public void setMyBatis3XmlMapperPackage(String mybatis3XmlMapperPackage) {
925
        internalAttributes.put(InternalAttribute.ATTR_MYBATIS3_XML_MAPPER_PACKAGE, mybatis3XmlMapperPackage);
1✔
926
    }
1✔
927

928
    public String getMyBatis3XmlMapperFileName() {
929
        return internalAttributes.get(InternalAttribute.ATTR_MYBATIS3_XML_MAPPER_FILE_NAME);
1✔
930
    }
931

932
    public void setMyBatis3XmlMapperFileName(String mybatis3XmlMapperFileName) {
933
        internalAttributes.put(InternalAttribute.ATTR_MYBATIS3_XML_MAPPER_FILE_NAME, mybatis3XmlMapperFileName);
1✔
934
    }
1✔
935

936
    public String getMyBatis3JavaMapperType() {
937
        return internalAttributes.get(InternalAttribute.ATTR_MYBATIS3_JAVA_MAPPER_TYPE);
1✔
938
    }
939

940
    public void setMyBatis3JavaMapperType(String mybatis3JavaMapperType) {
941
        internalAttributes.put(InternalAttribute.ATTR_MYBATIS3_JAVA_MAPPER_TYPE, mybatis3JavaMapperType);
1✔
942
    }
1✔
943

944
    public String getMyBatis3SqlProviderType() {
945
        return internalAttributes.get(InternalAttribute.ATTR_MYBATIS3_SQL_PROVIDER_TYPE);
1✔
946
    }
947

948
    public void setMyBatis3SqlProviderType(String mybatis3SqlProviderType) {
949
        internalAttributes.put(InternalAttribute.ATTR_MYBATIS3_SQL_PROVIDER_TYPE, mybatis3SqlProviderType);
1✔
950
    }
1✔
951

952
    public String getMyBatisDynamicSqlSupportType() {
953
        return internalAttributes.get(InternalAttribute.ATTR_MYBATIS_DYNAMIC_SQL_SUPPORT_TYPE);
1✔
954
    }
955

956
    public void setMyBatisDynamicSqlSupportType(String s) {
957
        internalAttributes.put(InternalAttribute.ATTR_MYBATIS_DYNAMIC_SQL_SUPPORT_TYPE, s);
1✔
958
    }
1✔
959

960
    public TargetRuntime getTargetRuntime() {
961
        return targetRuntime;
1✔
962
    }
963

964
    public boolean isImmutable() {
965
        Properties properties;
966

967
        if (getTableConfiguration().getProperties().containsKey(PropertyRegistry.ANY_IMMUTABLE)) {
1✔
968
            properties = getTableConfiguration().getProperties();
1✔
969
        } else {
970
            properties = getContext().getJavaModelGeneratorConfiguration().getProperties();
1✔
971
        }
972

973
        return isTrue(properties.getProperty(PropertyRegistry.ANY_IMMUTABLE));
1✔
974
    }
975

976
    public boolean isConstructorBased() {
977
        if (isImmutable()) {
1✔
978
            return true;
1✔
979
        }
980

981
        Properties properties;
982

983
        if (getTableConfiguration().getProperties().containsKey(PropertyRegistry.ANY_CONSTRUCTOR_BASED)) {
1✔
984
            properties = getTableConfiguration().getProperties();
1✔
985
        } else {
986
            properties = getContext().getJavaModelGeneratorConfiguration().getProperties();
1✔
987
        }
988

989
        return isTrue(properties.getProperty(PropertyRegistry.ANY_CONSTRUCTOR_BASED));
1✔
990
    }
991

992
    /**
993
     * Should return true if an XML generator is required for this table. This method will be called during validation
994
     * of the configuration, so it should not rely on database introspection. This method simply tells the validator if
995
     * an XML configuration is normally required for this implementation.
996
     *
997
     * @return true, if successful
998
     */
999
    public abstract boolean requiresXMLGenerator();
1000

1001
    public Context getContext() {
1002
        return Objects.requireNonNull(context);
1✔
1003
    }
1004

1005
    public Optional<String> getRemarks() {
1006
        return Optional.ofNullable(remarks);
1✔
1007
    }
1008

1009
    public void setRemarks(String remarks) {
1010
        this.remarks = remarks;
1✔
1011
    }
1✔
1012

1013
    public String getTableType() {
1014
        return Objects.requireNonNull(tableType);
1✔
1015
    }
1016

1017
    public void setTableType(String tableType) {
1018
        this.tableType = tableType;
1✔
1019
    }
1✔
1020
}
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