|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mybatis.generator.internal.rules.RulesDelegate
public class RulesDelegate
This class can be used by plugins to easily implement a custom rules implementation. Plugins should respect the rules implementation calculated by the generator, as well as implementations from other plugins. In general if something is disabled by the default rules, or is disabled by some other plugin, it should not be re-enabled. Therefore, the following pattern of use is recommended:
public class MyPlugin extends PluginAdapter { @Override public void initialized(IntrospectedTable introspectedTable) { MyRules myRules = new MyRules(introspectedTable.getRules()); introspectedTable.setRules(myRules); } } public class MyRules extends RulesDelegate ( public MyRules(Rules rules) { super(rules); } @Override public boolean generateInsert() { boolean rc = super.generateInsert(); if (rc) { // Other plugins, and the default rules, enable generation // of the insert method. We can decide to disable it here // if needed. } return rc; }
Field Summary | |
---|---|
protected Rules |
rules
|
Constructor Summary | |
---|---|
RulesDelegate(Rules rules)
|
Method Summary | |
---|---|
FullyQualifiedJavaType |
calculateAllFieldsClass()
Calculates the class that contains all fields. |
boolean |
generateBaseColumnList()
Implements the rule for generating the SQL base column list element. |
boolean |
generateBaseRecordClass()
Implements the rule for generating a base record. |
boolean |
generateBaseResultMap()
Implements the rule for generating the result map without BLOBs. |
boolean |
generateBlobColumnList()
Implements the rule for generating the SQL blob column list element. |
boolean |
generateCountByExample()
|
boolean |
generateDeleteByExample()
Implements the rule for generating the delete by example SQL Map element and DAO method. |
boolean |
generateDeleteByPrimaryKey()
Implements the rule for generating the delete by primary key SQL Map element and DAO method. |
boolean |
generateExampleClass()
Implements the rule for generating an example class. |
boolean |
generateInsert()
Implements the rule for generating the insert SQL Map element and DAO method. |
boolean |
generateInsertSelective()
Implements the rule for generating the insert selective SQL Map element and DAO method. |
boolean |
generateJavaClient()
Implements the rule for generating a Java client. |
boolean |
generateMyBatis3UpdateByExampleWhereClause()
Implements the rule for generating the SQL example where clause element specifically for use in the update by example methods. |
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. |
boolean |
generateResultMapWithBLOBs()
Implements the rule for generating the result map with BLOBs. |
boolean |
generateSelectByExampleWithBLOBs()
Implements the rule for generating the select by example with BLOBs SQL Map element and DAO method. |
boolean |
generateSelectByExampleWithoutBLOBs()
Implements the rule for generating the select by example without BLOBs SQL Map element and DAO method. |
boolean |
generateSelectByPrimaryKey()
Implements the rule for generating the select by primary key SQL Map element and DAO method. |
boolean |
generateSQLExampleWhereClause()
Implements the rule for generating the SQL example where clause element. |
boolean |
generateUpdateByExampleSelective()
|
boolean |
generateUpdateByExampleWithBLOBs()
|
boolean |
generateUpdateByExampleWithoutBLOBs()
|
boolean |
generateUpdateByPrimaryKeySelective()
Implements the rule for generating the update by primary key selective SQL Map element and DAO method. |
boolean |
generateUpdateByPrimaryKeyWithBLOBs()
Implements the rule for generating the update by primary key with BLOBs SQL Map element and DAO method. |
boolean |
generateUpdateByPrimaryKeyWithoutBLOBs()
Implements the rule for generating the update by primary key without BLOBs SQL Map element and DAO method. |
IntrospectedTable |
getIntrospectedTable()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Rules rules
Constructor Detail |
---|
public RulesDelegate(Rules rules)
Method Detail |
---|
public FullyQualifiedJavaType calculateAllFieldsClass()
Rules
calculateAllFieldsClass
in interface Rules
public boolean generateBaseRecordClass()
Rules
generateBaseRecordClass
in interface Rules
public boolean generateBaseResultMap()
Rules
generateBaseResultMap
in interface Rules
public boolean generateCountByExample()
generateCountByExample
in interface Rules
public boolean generateDeleteByExample()
Rules
generateDeleteByExample
in interface Rules
public boolean generateDeleteByPrimaryKey()
Rules
generateDeleteByPrimaryKey
in interface Rules
public boolean generateExampleClass()
Rules
generateExampleClass
in interface Rules
public boolean generateInsert()
Rules
generateInsert
in interface Rules
public boolean generateInsertSelective()
Rules
generateInsertSelective
in interface Rules
public boolean generatePrimaryKeyClass()
Rules
generatePrimaryKeyClass
in interface Rules
public boolean generateRecordWithBLOBsClass()
Rules
generateRecordWithBLOBsClass
in interface Rules
public boolean generateResultMapWithBLOBs()
Rules
generateResultMapWithBLOBs
in interface Rules
public boolean generateSelectByExampleWithBLOBs()
Rules
generateSelectByExampleWithBLOBs
in interface Rules
public boolean generateSelectByExampleWithoutBLOBs()
Rules
generateSelectByExampleWithoutBLOBs
in interface Rules
public boolean generateSelectByPrimaryKey()
Rules
generateSelectByPrimaryKey
in interface Rules
public boolean generateSQLExampleWhereClause()
Rules
generateSQLExampleWhereClause
in interface Rules
public boolean generateMyBatis3UpdateByExampleWhereClause()
Rules
generateMyBatis3UpdateByExampleWhereClause
in interface Rules
public boolean generateUpdateByExampleSelective()
generateUpdateByExampleSelective
in interface Rules
public boolean generateUpdateByExampleWithBLOBs()
generateUpdateByExampleWithBLOBs
in interface Rules
public boolean generateUpdateByExampleWithoutBLOBs()
generateUpdateByExampleWithoutBLOBs
in interface Rules
public boolean generateUpdateByPrimaryKeySelective()
Rules
generateUpdateByPrimaryKeySelective
in interface Rules
public boolean generateUpdateByPrimaryKeyWithBLOBs()
Rules
generateUpdateByPrimaryKeyWithBLOBs
in interface Rules
public boolean generateUpdateByPrimaryKeyWithoutBLOBs()
Rules
generateUpdateByPrimaryKeyWithoutBLOBs
in interface Rules
public IntrospectedTable getIntrospectedTable()
getIntrospectedTable
in interface Rules
public boolean generateBaseColumnList()
Rules
generateBaseColumnList
in interface Rules
public boolean generateBlobColumnList()
Rules
generateBlobColumnList
in interface Rules
public boolean generateJavaClient()
Rules
generateJavaClient
in interface Rules
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |