}
//Loading all old sbiObjects
Criterion kpiCriter = Expression.eq("sbiKpi",sbiKpi);
Criteria crite = aSession.createCriteria(SbiKpiDocument.class);
crite.add(kpiCriter);
List existingDocs = crite.list();
List kpiDocsList = kpi.getSbiKpiDocuments();
Set sbiKpiDocuments = new HashSet(0);
Iterator i = kpiDocsList.iterator();
while (i.hasNext()) {
KpiDocuments doc = (KpiDocuments) i.next();
String label = doc.getBiObjLabel();
Criterion labelCriterrion = Expression.eq("label",label);
Criteria criteria = aSession.createCriteria(SbiObjects.class);
criteria.add(labelCriterrion);
SbiObjects hibObject = (SbiObjects) criteria.uniqueResult();
Integer kpiId = kpi.getKpiId();
Criterion kpiCriterrion = Expression.eq("sbiKpi",sbiKpi);
Criterion sbiObjCriterrion = Expression.eq("sbiObjects",hibObject);
Criteria crit = aSession.createCriteria(SbiKpiDocument.class);
crit.add(kpiCriterrion);
crit.add(sbiObjCriterrion);
SbiKpiDocument kpiDoc = (SbiKpiDocument) crit.uniqueResult();