Created
February 22, 2010 01:56
-
-
Save vscarpenter/310700 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SqlMapClient sqlMapClient = null; | |
try { | |
String sqlMapConfigFile = "sql-map-config.xml"; | |
Reader sqlMapConfigReader = Resources.getResourceAsReader(sqlMapConfigFile); | |
sqlMapClient = SqlMapClientBuilder.buildSqlMapClient(sqlMapConfigReader); | |
} catch (IOException e) { | |
log.error(e); | |
} | |
try { | |
Account myAccount = (Account) sqlMapClient.queryForObject("getAccount", new Integer(1234)); | |
log.debug("myAccount.getFirstName() = " + myAccount.getFirstName()); | |
} catch (SQLException e) { | |
e.printStackTrace(); | |
log.error(e.toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment