use of org.jbei.ice.storage.model.TraceSequenceAlignment in project ice by JBEI.
the class TraceSequenceDAO method save.
/**
* Save the given {@link TraceSequence} object in the database.
*
* @param traceSequence object to save
* @return Saved TraceSequence object.
* @throws DAOException on hibernate exception saving
*/
public TraceSequence save(TraceSequence traceSequence) {
TraceSequenceAlignment traceSequenceAlignment = traceSequence.getTraceSequenceAlignment();
Session session = currentSession();
try {
session.saveOrUpdate(traceSequenceAlignment);
traceSequence.setTraceSequenceAlignment(traceSequenceAlignment);
session.saveOrUpdate(traceSequence);
return traceSequence;
} catch (HibernateException e) {
throw new DAOException("Error saving trace sequence", e);
}
}
Aggregations