本文整理匯總了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()
);
}
}
示例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
);
}
示例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
);
}
}
示例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 );
}
示例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);
}