Hibernate ORM EntityIncrementVersionProcess - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM EntityIncrementVersionProcess class.

This code example shows how to use the following methods:
			int timeout, SessionImplementor session) throws StaleObjectStateException, JDBCException {
		if ( !lockable.isVersioned() ) {
			throw new HibernateException( "[" + lockMode + "] not supported for non-versioned entities [" + lockable.getEntityName() + "]" );
		} 
		EntityEntry entry = session.getPersistenceContext().getEntry( object );
		EntityIncrementVersionProcess incrementVersion = new EntityIncrementVersionProcess( object, entry );
		EventSource source = (EventSource) session;
		// Register the EntityIncrementVersionProcess action to run just prior to transaction commit.  
		source.getActionQueue().registerProcess( incrementVersion );
	} 
 
	protected LockMode getLockMode() {
		return lockMode;
	} 
} 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java