Code example for Session

Methods: save

0
	protected <T> T find(Class<T> entityClass, Serializable id) {
		return (T)session.load(entityClass, id);
	} 
	@Override 
	protected <T> T save(T entity) {
		session.save(entity);
		return entity;
	} 
	@SuppressWarnings("unchecked") 
	@Override 
	protected <T> T merge(T entity) {
		return (T)session.merge(entity);
	} 
	@Override 
	protected void flush() { 
		session.flush();
		tx.commit();
	} 
	@Override 
	protected void close() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE