final String originalId = xec.getEntityResolver().getOriginalId(ins);
// completely new object, manually added to the xml
if (originalId == null) {
continue;
}
final ReferenceDataStore rdl = OBProvider.getInstance().get(ReferenceDataStore.class);
if (ins instanceof ClientEnabled) {
rdl.setClient(((ClientEnabled) ins).getClient());
}
if (ins instanceof OrganizationEnabled) {
rdl.setOrganization(((OrganizationEnabled) ins).getOrganization());
}
rdl.setGeneric(originalId);
rdl.setSpecific((String) ins.getId());
rdl.setTable(OBDal.getInstance().get(Table.class, ins.getEntity().getTableId()));
if (module != null) {
rdl.setModule(module);
}
OBDal.getInstance().save(rdl);
}
OBDal.getInstance().flush();
} finally {