class ConfigurationDaoHelper {

    @SuppressWarnings("unchecked")
    public <T> T getXmlClobPropertyAndUnmarshallToObject(Class<T> classType, String configurationKey)
    {
        String xml = getClobProperty(configurationKey);

        if (StringUtils.isNotBlank(xml))
        {
            try
            {
                return xmlHelper.unmarshallXmlToObject(classType, xml);
            }
            catch (JAXBException e)
            {
                throw new IllegalStateException(String.format("Failed to unmarshall \"%s\" configuration value to %s.", configurationKey, classType.getName()),
                    e);
            }
        }
        else
        {
            return null;
        }
    }

}