ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reuben Firmin" <Reuben.Fir...@Copart.Com>
Subject checking that a statement exists
Date Wed, 09 Aug 2006 15:38:51 GMT
Hello, is there any way to ask the SqlMapClient object whether a given statement exists?
 
I am thinking of a pattern like this:
 
enum StatementName
{
      GET_FOO("getFoo");
      GET_BAH("getBah");
}
 
...
 
sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
for (StatementName statement: StatementName.values())
{
     if (!sqlMap.statementExists(statement))
     {
         throw ProgrammerErrorException(....)
     }
}
 
...
 
sqlMap.queryForList(StatementName.GET_FOO, ...)
 
Thanks
Reuben

Mime
View raw message