Transaction tx = null;
try {
aSession = getSession();
tx = aSession.beginTransaction();
SbiEngines hibEngine = (SbiEngines) aSession.load(SbiEngines.class,
aEngine.getId());
SbiDomains hibDomainBiobjType = (SbiDomains) aSession.load(SbiDomains.class,
aEngine.getBiobjTypeId());
SbiDomains hibDomainEngineType = (SbiDomains) aSession.load(SbiDomains.class,
aEngine.getEngineTypeId());
SbiDataSource hibDataSource = null;
if (aEngine.getDataSourceId() != null) {
hibDataSource = (SbiDataSource) aSession.load(SbiDataSource.class, aEngine.getDataSourceId());
}
hibEngine.setName(aEngine.getName());
hibEngine.setLabel(aEngine.getLabel());
hibEngine.setDescr(aEngine.getDescription());
hibEngine.setDriverNm(aEngine.getDriverName());
hibEngine.setEncrypt(new Short((short) aEngine.getCriptable()
.intValue()));
hibEngine.setMainUrl(aEngine.getUrl());
hibEngine.setObjUplDir(aEngine.getDirUpload());
hibEngine.setObjUseDir(aEngine.getDirUsable());
hibEngine.setSecnUrl(aEngine.getSecondaryUrl());
hibEngine.setEngineType(hibDomainEngineType);
hibEngine.setClassNm(aEngine.getClassName());
hibEngine.setBiobjType(hibDomainBiobjType);
hibEngine.setUseDataSet(new Boolean(aEngine.getUseDataSet()));
hibEngine.setUseDataSource(new Boolean(aEngine.getUseDataSource()));
hibEngine.setDataSource(hibDataSource);
updateSbiCommonInfo4Update(hibEngine);
tx.commit();
} catch (HibernateException he) {
logException(he);