[ http://issues.apache.org/jira/browse/IBATIS-205?page=comments#action_12414108 ]
Jeff Butler commented on IBATIS-205: ------------------------------------ As stated in the list discussion about this, subclasses of these classes are not supported - meaning that this is not a published API and is subject to change at any time. Nevertheless, we will make the change and say "use at your own risk". > Change access modifiers from private to protected in many classes to allow > developers to create extensions and subclasses to the iBatis classes > ----------------------------------------------------------------------------------------------------------------------------------------------- > > Key: IBATIS-205 > URL: http://issues.apache.org/jira/browse/IBATIS-205 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.1.5 > Reporter: Jeff Roberts > Assignee: Jeff Butler > Priority: Minor > Attachments: SqlMapClientBuilder.java, SqlMapClientImpl.java, > SqlMapConfigParser.java, SqlMapExecutorDelegate.java, SqlMapParser.java > > I have recently added and extension to the iBatis > framework. In order for my extension to work > effectively, I had to subclass several of the iBatis > classes. In doing so, I found that some of the > methods and variables in the iBatis classes were > declared as private, preventing me access to them from > my subclasses. > I changed the following access modifiers in the > following iBatis classes: > - com.ibatis.sqlmap.client.SqlMapClient > I changed the default constructor from private to > protected. This still prevents public instantiation > of the class, but allows me to instantiate my > subclass. > - > com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser > I changed the static variable "parser" from private to > protected. This allows me to access the parser from > my subclass. > I also changed the addSqlMapNodelets() method from > private to protected, allowing me to override it in my > subclass and extend its behavior. > - com.ibatis.sqlmap.engine.builder.xml.SqlMapParser > I changed the static variable "parser" from private to > protected. This allows me to access the parser from > my subclass. > I also changed the addStatementNodelets() method from > private to protected, allowing me to override it in my > subclass and extend its behavior. > - com.ibatis.sqlmap.engine.impl.SqlMapClientImpl > I changed the variable "localSqlMapSession" from > private to protected, allowing my subclass to access > it. > I also changed the getLocalSqlMapSession() from > private to protected, allowing me to override it in my > subclass and extend its behavior. > - com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate > I changed the variable "sqlExecutor" from private to > protected, allowing my subclass to access it. > I also changed the autoEndTransaction(), > autoCommitTransaction() and autoStartTransaction() > methods from private to protected, allowing my > subclass to invoke them. > I would like to request that the iBatis development > team make these same changes to the iBatis source > code. In my view, it doesn't change any behavior or > introduce any changes to the source code other than to > make key pieces of the code accessible to subclasses. > By making these changes, I can implement an extension > to iBatis by subclassing the classes I've mentioned > above and providing an additional feature. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira