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

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} 
	 */ 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
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 = (
4
CodeRank
Experience pair programming with AI  Get Codota for Java
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} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Hibernate ORM VersionType Methods: