Code example for Session

Methods: delete

0
	@SuppressWarnings("unchecked") 
	protected <T> T save(T entity) {
		return (T)session.merge(entity);
	} 
	protected <T> void remove(T entity) {
		session.delete(entity);
	} 
	protected void flush() { 
		flush(true); 
	} 
	protected void flush(boolean commit) {
		session.flush();
		if (commit)
			tx.commit();
	} 
	protected void flushOnly() { 
		session.flush();
	} 
	protected void close() { 
		session.clear();