Java Code Examples for org.hibernate.LockOptions#copy()

The following examples show how to use org.hibernate.LockOptions#copy() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EntityJoinWalker.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
public EntityJoinWalker(
		OuterJoinLoadable persister,
		String[] uniqueKey,
		int batchSize,
		LockOptions lockOptions,
		SessionFactoryImplementor factory,
		LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
	super( persister, factory, loadQueryInfluencers );
	LockOptions.copy(lockOptions, this.lockOptions);

	StringBuilder whereCondition = whereString( getAlias(), uniqueKey, batchSize )
			//include the discriminator and class-level where, but not filters
			.append( persister.filterFragment( getAlias(), Collections.EMPTY_MAP ) );

	AssociationInitCallbackImpl callback = new AssociationInitCallbackImpl( factory );
	initAll( whereCondition.toString(), "", lockOptions, callback );
	this.compositeKeyManyToOneTargetIndices = callback.resolve();
}
 
Example 2
Source File: SessionImpl.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Override
public LockOptions getLockRequest(LockModeType lockModeType, Map<String, Object> properties) {
	LockOptions lockOptions = new LockOptions();
	LockOptions.copy( this.lockOptions, lockOptions );
	lockOptions.setLockMode( LockModeTypeHelper.getLockMode( lockModeType ) );
	if ( properties != null ) {
		setLockOptions( properties, lockOptions );
	}
	return lockOptions;
}
 
Example 3
Source File: SessionImpl.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private LockRequestImpl(LockOptions lo) {
	lockOptions = new LockOptions();
	LockOptions.copy( lo, lockOptions );
}
 
Example 4
Source File: SimpleSelect.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public SimpleSelect setLockOptions(LockOptions lockOptions) {
	LockOptions.copy( lockOptions, this.lockOptions );
	return this;
}
 
Example 5
Source File: SelectStatementBuilder.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Sets the lock options for the select statement.
 *
 * @param lockOptions The lock options.
 */
public void setLockOptions(LockOptions lockOptions) {
	LockOptions.copy( lockOptions, this.lockOptions );
}
 
Example 6
Source File: Select.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Set the lock options
 * @param lockOptions
 * @return this object
 */
public Select setLockOptions(LockOptions lockOptions) {
	LockOptions.copy(lockOptions, this.lockOptions);
	return this;
}