|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.ibator.api.IbatorPluginAdapter
org.apache.ibatis.ibator.plugins.SerializablePlugin
public class SerializablePlugin
This plugin adds the java.io.Serializable marker interface to all generated model objects.
This plugin demonstrates adding capabilities to generated Java artifacts, and shows the proper way to add imports to a compilation unit.
Important: This is a simplistic implementation of serializable and does not attempt to do any versioning of classes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.ibatis.ibator.api.IbatorPlugin |
---|
IbatorPlugin.ModelClassType |
Field Summary |
---|
Fields inherited from class org.apache.ibatis.ibator.api.IbatorPluginAdapter |
---|
ibatorContext, properties |
Constructor Summary | |
---|---|
SerializablePlugin()
|
Method Summary | |
---|---|
protected void |
makeSerializable(TopLevelClass topLevelClass,
FullyQualifiedTable table)
|
boolean |
modelBaseRecordClassGenerated(TopLevelClass topLevelClass,
IntrospectedTable introspectedTable)
This method is called after the base record class is generated by the ibator supplied JavaModelGenerator. |
boolean |
modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass,
IntrospectedTable introspectedTable)
This method is called after the primary key class is generated by the ibator supplied JavaModelGenerator. |
boolean |
modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass,
IntrospectedTable introspectedTable)
This method is called after the record with BLOBs class is generated by the ibator supplied JavaModelGenerator. |
boolean |
validate(java.util.List<java.lang.String> warnings)
This method is called after all the setXXX methods are called, but before any other method is called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerializablePlugin()
Method Detail |
---|
public boolean validate(java.util.List<java.lang.String> warnings)
IbatorPlugin
warnings
- add strings to this list to specify warnings. For example,
if the plugin is invalid, you should specify why. Warnings are reported
to users after the completion of the ibator run.
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
IbatorPlugin
modelBaseRecordClassGenerated
in interface IbatorPlugin
modelBaseRecordClassGenerated
in class IbatorPluginAdapter
topLevelClass
- the generated base record classintrospectedTable
- ibator's class containing information
about the table as introspected from the database
public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
IbatorPlugin
modelPrimaryKeyClassGenerated
in interface IbatorPlugin
modelPrimaryKeyClassGenerated
in class IbatorPluginAdapter
topLevelClass
- the generated primary key classintrospectedTable
- ibator's class containing information
about the table as introspected from the database
public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
IbatorPlugin
modelRecordWithBLOBsClassGenerated
in interface IbatorPlugin
modelRecordWithBLOBsClassGenerated
in class IbatorPluginAdapter
topLevelClass
- the generated record with BLOBs classintrospectedTable
- ibator's class containing information
about the table as introspected from the database
protected void makeSerializable(TopLevelClass topLevelClass, FullyQualifiedTable table)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |