List of usage examples for org.hibernate StatelessSession update
void update(String entityName, Object entity);
From source file:edu.uncc.genosets.studyset.StudySetPersister.java
License:Open Source License
@Override public void persist(StatelessSession ss) { if (studySet.getId() == null) { ss.insert(studySet.getEntityName(), studySet); } else {// w ww . j av a 2s . c om ss.update(studySet.getEntityName(), studySet); } if (toAdd != null) { for (FactStudySet factStudySet : toAdd) { if (factStudySet.getFactId() == null) { factStudySet.setStudySetId(studySet.getId()); ss.insert(factStudySet.getEntityName(), factStudySet); } } } if (toDelete != null) { for (FactStudySet factStudySet : toDelete) { if (factStudySet.getFactId() != null) { ss.delete(factStudySet.getEntityName(), factStudySet); } } } }