Heheheh, this is funny.
OK, here is an iBATIS application.
It is not the best example, but it shows how nonsensical this statement
is: "For small project SqlMap is adding unnecessary complexity."
===
Main.java
===
package blah;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.common.resources.Resources;
import java.io.Reader;
import java.util.List;
public class Main {
public static void main(String arg[]) throws Exception {
String resource;
Reader reader;
List list;
SqlMapClient sqlMap;
resource = "blah/SqlMapConfig.xml";
reader = Resources.getResourceAsReader (resource);
sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
list = sqlMap.queryForList("getAll", null);
System.out.println("Selected " + list.size() + " records.");
System.out.println("--------------------");
for(int i = 0; i < list.size(); i++) {
System.out.println(list.get(i));
}
System.out.println("--------------------");
}
}
===
OH! I almost forgot the configuration files!
===
SqlMapConfig.xml
===
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings cacheModelsEnabled="true"
enhancementEnabled="true"
lazyLoadingEnabled="true" maxRequests="32"
maxSessions="10" maxTransactions="5"
useStatementNamespaces="false" />
<transactionManager type="JDBC" >
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
<property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost/test"/>
<property name="JDBC.Username" value="root"/>
<property name="JDBC.Password" value=""/>
</dataSource>
</transactionManager>
<sqlMap resource="org/apache/mapper2/ii15/SqlMap.xml" />
</sqlMapConfig>
===
And here is the second one:
===
SqlMap.xml
===
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap
PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="ii15">
<select id="getAll" resultClass="java.util.HashMap">
select * from user
</select>
</sqlMap>
===
Now, where is the complexity?
I think brandon may have hit the nail on the head...who wrote the framework that your peer wants to use?
Larry
- Please Help in arguing for iBatis SqlMaps Kaushik Ashodiya
- Re: Please Help in arguing for iBatis SqlMaps Mark Bennett
- Re: Please Help in arguing for iBatis SqlMaps NetSQL
- Re[2]: Please Help in arguing for iBatis SqlM... Andrey Rogov
- Re: Please Help in arguing for iBatis SqlMaps Brandon Goodin
- Re: Please Help in arguing for iBatis SqlMaps Larry Meadors
- Re: Please Help in arguing for iBatis SqlMaps Clinton Begin
- Re: Please Help in arguing for iBatis SqlMaps J.F. Zarama
- Re: Please Help in arguing for iBatis SqlMaps Vic Cekvenich
- Re: Please Help in arguing for iBatis SqlMaps Fabio Insaccanebbia
- R: Please Help in arguing for iBatis SqlMaps Fabrizio Gianneschi
- Re: R: Please Help in arguing for iBatis SqlM... Brice Ruth
- Re: R: Please Help in arguing for iBatis ... Larry Meadors