public static void saveWithPrimaryKey(Object obj, Serializable id) throws DotHibernateException{
try{
Session session = getSession();
session.save(obj, id);
}catch (Exception e) {
throw new DotHibernateException("Unable to save Object with primary key " + id + " to Hibernate Session ", e);
}try{
Session session = getSession();
session.flush();
}catch (Exception e) {
throw new DotHibernateException("Unable to flush Hibernate Session ", e);
}
}