return liveDataValues;
}
protected LiveDataField getLiveDataField(final String fieldName) {
LiveDataField field = getHibernateTemplate().execute(new HibernateCallback<LiveDataField>() {
@Override
public LiveDataField doInHibernate(Session session) throws HibernateException, SQLException {
Query query = session.getNamedQuery("LiveDataField.one.byName");
query.setString("name", fieldName);
return (LiveDataField) query.uniqueResult();
}
});
if (field == null) {
field = new LiveDataField();
field.setName(fieldName);
getHibernateTemplate().save(field);
getHibernateTemplate().flush();
}
return field;
}