aSession = getSession();
tx = aSession.beginTransaction();
Criterion labelCriterrion = Expression.eq("scaleCd",cd);
Criteria criteria = aSession.createCriteria(SbiMeasureUnit.class);
criteria.add(labelCriterrion);
SbiMeasureUnit hibMu = (SbiMeasureUnit) criteria.uniqueResult();
toReturn = new MeasureUnit();
toReturn.setId(hibMu.getIdMeasureUnit());
toReturn.setName(hibMu.getName());
toReturn.setScaleCd(hibMu.getScaleCd());
toReturn.setScaleNm(hibMu.getScaleNm());
toReturn.setScaleTypeId(hibMu.getScaleType().getValueId());
} catch (HibernateException he) {
logger.error("Error while loading the MeasureUnit with id "+ cd , he);
if (tx != null)