J2EE & SAP Portal & Swift
Friday, February 07, 2014
Continue: How the Data Access Bean Look Like
Here is one of the data access bean.
package com.mycomp.app1.data; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.support.JdbcDaoSupport; public final class SimpleApp1ReaderImpl extends JdbcDaoSupport implements Appl1Reader { private static final String SELECT_SQL = "SELECT ..."; ... private final class App1Mapper implements RowMapper
{ @Override public App1DTO mapRow(ResultSet rs, int row) throws SQLException { ... return new App1DTO(...); } } }
I always choose JdbcDaoSupport over Hibernate because I can have so much more control over what I want to do with the database.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
►
2016
(3)
►
August 2016
(3)
►
2015
(2)
►
March 2015
(2)
▼
2014
(11)
▼
February 2014
(11)
Separate Properties from WAR
Use Maven to Manage Javascript Libraries
MyEclipse Install/Uninstall Zip File to Maven Loca...
Continue: How the CastorMarshaller Mapping Look Like
Continue: How WebServiceTemplate Look Like
Continue: How the Data Access Bean Look Like
Continue: How the Controllers Look Like
Example: Spring-MVC Spring-JDBC Spring-WS CastorMa...
RESTClient to Test JSON Web Services
Example: JBoss and LDAP
MyEclipse Enable Maven Dependencies in the Build Path
►
2013
(2)
►
December 2013
(1)
►
January 2013
(1)
►
2012
(6)
►
September 2012
(1)
►
July 2012
(1)
►
June 2012
(1)
►
April 2012
(1)
►
March 2012
(1)
►
February 2012
(1)
►
2011
(2)
►
September 2011
(2)
►
2010
(25)
►
October 2010
(2)
►
September 2010
(2)
►
August 2010
(1)
►
July 2010
(1)
►
June 2010
(2)
►
May 2010
(4)
►
April 2010
(1)
►
March 2010
(9)
►
February 2010
(1)
►
January 2010
(2)
►
2009
(61)
►
December 2009
(2)
►
November 2009
(4)
►
October 2009
(4)
►
September 2009
(2)
►
August 2009
(1)
►
July 2009
(3)
►
June 2009
(2)
►
May 2009
(25)
►
April 2009
(2)
►
March 2009
(2)
►
February 2009
(9)
►
January 2009
(5)
►
2008
(30)
►
December 2008
(2)
►
November 2008
(2)
►
October 2008
(3)
►
September 2008
(1)
►
August 2008
(5)
►
May 2008
(1)
►
April 2008
(6)
►
March 2008
(8)
►
January 2008
(2)
►
2007
(61)
►
December 2007
(3)
►
November 2007
(9)
►
October 2007
(10)
►
September 2007
(7)
►
August 2007
(6)
►
July 2007
(1)
►
June 2007
(1)
►
May 2007
(6)
►
April 2007
(6)
►
March 2007
(1)
►
February 2007
(10)
►
January 2007
(1)
►
2006
(113)
►
December 2006
(7)
►
November 2006
(4)
►
October 2006
(15)
►
September 2006
(33)
►
August 2006
(3)
►
July 2006
(51)
J2EE Fans
No comments:
Post a Comment