Session aSession = null;
Transaction tx = null;
try {
aSession = getSession();
tx = aSession.beginTransaction();
SbiViewpoints hibViewpoint = new SbiViewpoints();
//hibViewpoint.setVpId(vpId);
SbiObjects aSbiObject = (SbiObjects) aSession.load(SbiObjects.class, viewpoint.getBiobjId());
hibViewpoint.setSbiObject(aSbiObject);
hibViewpoint.setVpDesc(viewpoint.getVpDesc());
hibViewpoint.setVpOwner(viewpoint.getVpOwner());
hibViewpoint.setVpName(viewpoint.getVpName());
hibViewpoint.setVpScope(viewpoint.getVpScope());
hibViewpoint.setVpValueParams(viewpoint.getVpValueParams());
hibViewpoint.setVpCreationDate(viewpoint.getVpCreationDate());
updateSbiCommonInfo4Insert(hibViewpoint);
aSession.save(hibViewpoint);
tx.commit();
} catch (HibernateException he) {
logException(he);