Rename Mapper Class Plugin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Rename Mapper Class Plugin

Scott Warner
I am trying to write a plugin to rename the Mapper class from xxxMapper to xxxDAO.   I copied the RenameExampleClassPlugin source, but am having trouble figuring out which method on introspectedTable contains the mapper class filename.  I tried getMyBatis3JavaMapperType() and getDAOInterfaceType but neither one changed the file name when I ran it.  Any help would be appreciated

Scott Warner

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Rename Mapper Class Plugin

Scott Warner
This plugin is used by the Mybatis Generator.


On Monday, June 4, 2018 at 2:33:47 PM UTC-6, Scott Warner wrote:
I am trying to write a plugin to rename the Mapper class from xxxMapper to xxxDAO.   I copied the RenameExampleClassPlugin source, but am having trouble figuring out which method on introspectedTable contains the mapper class filename.  I tried getMyBatis3JavaMapperType() and getDAOInterfaceType but neither one changed the file name when I ran it.  Any help would be appreciated

Scott Warner

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Rename Mapper Class Plugin

Jeff Butler
Calling setMyBatis3JavaMapperType() should do it.  If you want to change the name of the generated XML file too, then you should also call setMyBatis3XmlMapperFileName() and setMyBatis3XmlMapperPackage().

Jeff Butler


On Mon, Jun 4, 2018 at 4:35 PM Scott Warner <[hidden email]> wrote:
This plugin is used by the Mybatis Generator.


On Monday, June 4, 2018 at 2:33:47 PM UTC-6, Scott Warner wrote:
I am trying to write a plugin to rename the Mapper class from xxxMapper to xxxDAO.   I copied the RenameExampleClassPlugin source, but am having trouble figuring out which method on introspectedTable contains the mapper class filename.  I tried getMyBatis3JavaMapperType() and getDAOInterfaceType but neither one changed the file name when I ran it.  Any help would be appreciated

Scott Warner

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.