brianm/jdbi — pull request #87 by sbrossie (2013-12-09 23:19:41+00:00)
Title: Add the ability to specify a superGroup when creating a StringTemplateGr...

...oup.

I added two new CTORs in StringTemplate3StatementLocator that allow to specify the superGroup, and refactor the code
so all CTOR call the same underlying method createGroup.

Added the option to cache the StringTemplate evaluated string. By default the cache is not used and one has to enable it explicitely using setCachedEvaluatedTemplate().
Caching StringTemplate is a little bit tricky because by default StringTemplate maintains a map of attributes and adding twice the same key in the map
will not replace the value but append it! So, they key associated to the cached value must take into consideration the map of attributes
in such a way that each cached value is associated with a unique template name and map of attributes.

Added some tests to verify that both superGroup and caching works.

This patch did not modify LocatorFactory which instanciates StringTemplate3StatementLocator so unless one defined a custom factory, this should be invisible.