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

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

Hibernate ORM LockOptions examples from Open Source projects
This code example shows how to use the following methods: setAliasSpecificLockMode
	@Override 
	public Query setLockMode(String alias, LockMode lockMode) {
		org.hibernate.LockMode hibernateLockMode = LockModeTranslator.translate(
			lockMode);
 
		LockOptions lockOptions = new LockOptions(hibernateLockMode);
 
		lockOptions.setAliasSpecificLockMode(alias, hibernateLockMode);
 
		_query.setLockOptions(lockOptions);
 
		return this;
	} 
 
	@Override 
	public Query setLong(int pos, long value) {
		_query.setLong(pos, value);
 
		return this;
	} 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getLockMode, getScope, getTimeOut
	 
	public Query setLockOptions(LockOptions lockOption) {
		this.lockOptions.setLockMode(lockOption.getLockMode());
		this.lockOptions.setScope(lockOption.getScope());
		this.lockOptions.setTimeOut(lockOption.getTimeOut());
		return this;
	} 
 
	public LockOptions getLockOptions() {
		return lockOptions;
	} 
 
} 
 
 
 
 
 
 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getLockMode, setLockMode
 
	public void setEntityId(Serializable entityId) {
		this.entityId = entityId;
	} 
 
	public String getEntityClassName() {
		return entityClassName;
	} 
 
	public void setEntityClassName(String entityClassName) {
		this.entityClassName = entityClassName;
	} 
 
	public Object getInstanceToLoad() { 
		return instanceToLoad; 
	} 
 
	public void setInstanceToLoad(Object instanceToLoad) { 
		this.instanceToLoad = instanceToLoad;
	} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setLockMode
public class RefreshEvent extends AbstractEvent {
 
	private Object object; 
	private String entityName;
 
	private LockOptions lockOptions = new LockOptions().setLockMode(LockMode.READ);
 
	public RefreshEvent(Object object, EventSource source) {
		super(source);
		if (object == null) { 
			throw new IllegalArgumentException("Attempt to generate refresh event with null object");
		} 
		this.object = object;
	} 
 
	public RefreshEvent(String entityName, Object object, EventSource source){
		this(object, source);
		this.entityName = entityName;
	} 
 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setLockMode
	} 
 
	public LockEvent(Object object, LockMode lockMode, EventSource source) {
		super(source);
		this.object = object;
		this.lockOptions = new LockOptions().setLockMode(lockMode);
	} 
 
	public LockEvent(Object object, LockOptions lockOptions, EventSource source) {
		super(source);
		this.object = object;
		this.lockOptions = lockOptions;
	} 
 
	public Object getObject() { 
		return object; 
	} 
 
	public void setObject(Object object) { 
		this.object = object;
Full Snippet Info
5
CodeRank
See Code Examples for Hibernate ORM LockOptions Methods: