Best code examples for Hibernate ORM VersionType class (org.hibernate.type.VersionType)

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

Hibernate ORM VersionType examples from Open Source projects
This code example shows how to use the following methods: nullSafeSet, seed
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position)
	        throws SQLException {
		type.nullSafeSet( statement, type.seed( session ), position, session );
		return 1; 
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public Type getExpectedType() {
		return type;
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isEqual, seed
This code example shows how to use the following methods: getComparator
	public static CacheDataDescriptionImpl decode(Collection model) {
		return new CacheDataDescriptionImpl(
				model.isMutable(),
				model.getOwner().isVersioned(),
				model.getOwner().isVersioned() ? ( ( VersionType ) model.getOwner().getVersion().getType() ).getComparator() : null
		); 
	} 
 
	public static CacheDataDescriptionImpl decode(PluralAttributeBinding model) {
		return new CacheDataDescriptionImpl(
				model.isMutable(),
				model.getContainer().seekEntityBinding().isVersioned(),
				getVersionComparator( model.getContainer().seekEntityBinding() )
		); 
	} 
 
	private static Comparator getVersionComparator(EntityBinding model ) {
		Comparator versionComparator = null;
		if ( model.isVersioned() ) {
			versionComparator = (
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: seed
	 * Apply optimisitc locking based on the a current vs. snapshot comparison 
	 * of <b>all</b> properties. 
	 */ 
	public static final int OPTIMISTIC_LOCK_ALL = 2; 
 
	/** 
	 * Apply optimisitc locking based on the a current vs. snapshot comparison 
	 * of <b>dirty</b> properties. 
	 */ 
	public static final int OPTIMISTIC_LOCK_DIRTY = 1; 
 
    private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, Versioning.class.getName()); 
 
	/** 
	 * Private constructor disallowing instantiation. 
	 */ 
	private Versioning() {} 
 
	/** 
	 * Create an initial optimisitc locking value according the {@link VersionType} 
Full Snippet Info
4
CodeRank