final PreparedStatement stmt = createPreparedStatement(
connection,
"select stores.destination, stores.domain, messages.message, messages.messageid from stores, messages where stores.storeId=? and destination=? and stores.messageid = messages.messageid order by messages.messageid",
new Object[] { storeId, messageFactory.getDestinationName(destination) });
return new MessageResultSetHandler(connection, stmt, messageFactory, headerPolicy);
}