@Override
public void setAutowiredProperty(String key, String value) {
String cachedValue = autowiringCache.get(key);
if (cachedValue == null || !cachedValue.equals(value)) {
verifyContextOpen();
ProcessToolAutowire pta = (ProcessToolAutowire) hibernateSession.createCriteria(ProcessToolAutowire.class)
.add(Restrictions.eq("key", key)).uniqueResult();
if (pta == null) {
pta = new ProcessToolAutowire();
pta.setKey(key);
}
pta.setValue(value);
hibernateSession.saveOrUpdate(pta);
autowiringCache.put(key, value);
}
}