Best code examples for Hibernate ORM EntityVerifyVersionProcess class (org.hibernate.action.internal.EntityVerifyVersionProcess)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM EntityVerifyVersionProcess class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM EntityVerifyVersionProcess examples from Open Source projects
This code example shows how to use the following methods:
	 * @see org.hibernate.dialect.lock.LockingStrategy#lock 
	public void lock( 
      Serializable id,
      Object version, 
      Object object, 
      int timeout, SessionImplementor session) throws StaleObjectStateException, JDBCException {
		if ( !lockable.isVersioned() ) {
			throw new OptimisticLockException( "[" + lockMode + "] not supported for non-versioned entities [" + lockable.getEntityName() + "]" );
		EntityEntry entry = session.getPersistenceContext().getEntry(object);
		EventSource source = (EventSource)session;
		EntityVerifyVersionProcess verifyVersion = new EntityVerifyVersionProcess(object, entry);
		// Register the EntityVerifyVersionProcess action to run just prior to transaction commit. 
	protected LockMode getLockMode() {
		return lockMode;
Full Snippet Info