public class

HierarchicalModelRules

extends BaseRules
java.lang.Object
   ↳ org.mybatis.generator.internal.rules.BaseRules
     ↳ org.mybatis.generator.internal.rules.HierarchicalModelRules

Class Overview

This class encapsulates all the code generation rules for a table using the hierarchical model.

Summary

[Expand]
Inherited Fields
From class org.mybatis.generator.internal.rules.BaseRules
Public Constructors
HierarchicalModelRules(IntrospectedTable introspectedTable)
Public Methods
boolean generateBaseRecordClass()
Implements the rule for generating a base record.
boolean generatePrimaryKeyClass()
Implements the rule for determining whether to generate a primary key class.
boolean generateRecordWithBLOBsClass()
Implements the rule for generating a record with BLOBs.
[Expand]
Inherited Methods
From class org.mybatis.generator.internal.rules.BaseRules
From class java.lang.Object
From interface org.mybatis.generator.internal.rules.Rules

Public Constructors

public HierarchicalModelRules (IntrospectedTable introspectedTable)

Public Methods

public boolean generateBaseRecordClass ()

Implements the rule for generating a base record. If the table has fields that are not in the primary key, and non-BLOB fields, then generate the class.

Returns
  • true if the class should be generated

public boolean generatePrimaryKeyClass ()

Implements the rule for determining whether to generate a primary key class. If the physical table has a primary key, then we generate the class.

Returns
  • true if the primary key should be generated

public boolean generateRecordWithBLOBsClass ()

Implements the rule for generating a record with BLOBs. A record with BLOBs is generated if the table contains any BLOB fields.

Returns
  • true if the record with BLOBs class should be generated