Hibernate ORM DefaultSaveOrUpdateEventListener - 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 DefaultSaveOrUpdateEventListener class.

This code example shows how to use the following methods: isVersionIncrementDisabled
			boolean useIdentityColumn,
			EventSource source,
			boolean shouldDelayIdentityInserts) {
		if ( useIdentityColumn ) {
			EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
					values, entity, persister, isVersionIncrementDisabled(), source, shouldDelayIdentityInserts
			); 
			source.getActionQueue().addAction( insert );
			return insert;
		} 
		else { 
			Object version = Versioning.getVersion( values, persister );
			EntityInsertAction insert = new EntityInsertAction(
					id, values, entity, version, persister, isVersionIncrementDisabled(), source
			); 
			source.getActionQueue().addAction( insert );
			return insert;
		} 
	} 
 
Full Snippet Info
3
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE