當前位置: 首頁>>代碼示例>>Java>>正文


Java EntityLoader類代碼示例

本文整理匯總了Java中org.hibernate.loader.entity.EntityLoader的典型用法代碼示例。如果您正苦於以下問題:Java EntityLoader類的具體用法?Java EntityLoader怎麽用?Java EntityLoader使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EntityLoader類屬於org.hibernate.loader.entity包,在下文中一共展示了EntityLoader類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getAppropriateUniqueKeyLoader

import org.hibernate.loader.entity.EntityLoader; //導入依賴的package包/類
private EntityLoader getAppropriateUniqueKeyLoader(String propertyName, SessionImplementor session) {
	final boolean useStaticLoader = !session.getLoadQueryInfluencers().hasEnabledFilters()
			&& !session.getLoadQueryInfluencers().hasEnabledFetchProfiles()
			&& propertyName.indexOf('.')<0; //ugly little workaround for fact that createUniqueKeyLoaders() does not handle component properties

	if ( useStaticLoader ) {
		return ( EntityLoader ) uniqueKeyLoaders.get( propertyName );
	}
	else {
		return createUniqueKeyLoader(
				propertyMapping.toType( propertyName ),
				propertyMapping.toColumns( propertyName ),
				session.getLoadQueryInfluencers()
		);
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:17,代碼來源:AbstractEntityPersister.java

示例2: createUniqueKeyLoader

import org.hibernate.loader.entity.EntityLoader; //導入依賴的package包/類
private EntityLoader createUniqueKeyLoader(
		Type uniqueKeyType,
		String[] columns,
		LoadQueryInfluencers loadQueryInfluencers) {
	if ( uniqueKeyType.isEntityType() ) {
		String className = ( ( EntityType ) uniqueKeyType ).getAssociatedEntityName();
		uniqueKeyType = getFactory().getEntityPersister( className ).getIdentifierType();
	}
	return new EntityLoader(
			this,
			columns,
			uniqueKeyType,
			1,
			LockMode.NONE,
			getFactory(),
			loadQueryInfluencers
	);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:19,代碼來源:AbstractEntityPersister.java

示例3: getAppropriateUniqueKeyLoader

import org.hibernate.loader.entity.EntityLoader; //導入依賴的package包/類
private EntityLoader getAppropriateUniqueKeyLoader(String propertyName, Map enabledFilters) {

		final boolean useStaticLoader = ( enabledFilters == null || enabledFilters.isEmpty() )
				&& propertyName.indexOf('.')<0; //ugly little workaround for fact that createUniqueKeyLoaders() does not handle component properties

		if ( useStaticLoader ) {
			return (EntityLoader) uniqueKeyLoaders.get( propertyName );
		}
		else {
			return createUniqueKeyLoader(
					propertyMapping.toType(propertyName),
					propertyMapping.toColumns(propertyName),
					enabledFilters
				);
		}
	}
 
開發者ID:cacheonix,項目名稱:cacheonix-core,代碼行數:17,代碼來源:AbstractEntityPersister.java

示例4: createUniqueKeyLoader

import org.hibernate.loader.entity.EntityLoader; //導入依賴的package包/類
private EntityLoader createUniqueKeyLoader(Type uniqueKeyType, String[] columns, Map enabledFilters) {
	if ( uniqueKeyType.isEntityType() ) {
		String className = ( ( EntityType ) uniqueKeyType ).getAssociatedEntityName();
		uniqueKeyType = getFactory().getEntityPersister( className ).getIdentifierType();
	}

	return new EntityLoader( this, columns, uniqueKeyType, 1, LockMode.NONE, getFactory(), enabledFilters );
}
 
開發者ID:cacheonix,項目名稱:cacheonix-core,代碼行數:9,代碼來源:AbstractEntityPersister.java

示例5: createBatchingEntityLoader

import org.hibernate.loader.entity.EntityLoader; //導入依賴的package包/類
public static BatchingEntityLoader createBatchingEntityLoader(
			final OuterJoinLoadable persister,
			final SessionFactoryImplementor factory) throws MappingException {
			int[] batchSizesToCreate = ArrayHelper.getBatchSizes(DEFAULT_MAX_BATCH_SIZE);
      //System.out.print("created loader");
			Loader[] loadersToCreate = new Loader[ batchSizesToCreate.length ];
			for ( int i=0; i<batchSizesToCreate.length; i++ ) {
				loadersToCreate[i] = new EntityLoader(persister, batchSizesToCreate[i], LockMode.NONE, factory, LoadQueryInfluencers.NONE);
//        System.out.print(", " + batchSizesToCreate[i]);
			}
//      org.webdsl.logging.Logger.info();
			return new BatchingEntityLoader(persister, batchSizesToCreate, loadersToCreate);
	}
 
開發者ID:webdsl,項目名稱:webdsl,代碼行數:14,代碼來源:BatchingEntityLoader.java


注:本文中的org.hibernate.loader.entity.EntityLoader類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。