org.hibernate.loader.JoinWalker源码实例Demo

类org.hibernate.loader.JoinWalker源码实例Demo

下面列出了org.hibernate.loader.JoinWalker 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

public ReactiveDynamicBatchingCollectionInitializer(
		QueryableCollection collectionPersister,
		SessionFactoryImplementor factory,
		LoadQueryInfluencers influencers) {
	super( collectionPersister, factory, influencers );

	JoinWalker walker = buildJoinWalker( collectionPersister, factory, influencers );
	initFromWalker( walker );
	this.sqlTemplate = walker.getSQLString();
	this.alias = StringHelper.generateAlias( collectionPersister.getRole(), 0 );
	postInstantiate();

	if ( LOG.isDebugEnabled() ) {
		LOG.debugf(
				"SQL-template for dynamic collection [%s] batch-fetching : %s",
				collectionPersister.getRole(),
				sqlTemplate
		);
	}
}
 
源代码2 项目: lams   文件: CascadeEntityLoader.java
public CascadeEntityLoader(
		OuterJoinLoadable persister,
		CascadingAction action,
		SessionFactoryImplementor factory) throws MappingException {
	super(
			persister,
			persister.getIdentifierType(),
			factory,
			LoadQueryInfluencers.NONE
	);

	JoinWalker walker = new CascadeEntityJoinWalker(
			persister,
			action,
			factory
	);
	initFromWalker( walker );

	postInstantiate();

	if ( LOG.isDebugEnabled() ) {
		LOG.debugf( "Static select for action %s on entity %s: %s", action, entityName, getSQLString() );
	}
}
 
源代码3 项目: lams   文件: OneToManyLoader.java
public OneToManyLoader(
		QueryableCollection oneToManyPersister,
		int batchSize,
		String subquery,
		SessionFactoryImplementor factory,
		LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
	super( oneToManyPersister, factory, loadQueryInfluencers );

	JoinWalker walker = new OneToManyJoinWalker(
			oneToManyPersister,
			batchSize,
			subquery,
			factory,
			loadQueryInfluencers
	);
	initFromWalker( walker );

	postInstantiate();
	if ( LOG.isDebugEnabled() ) {
		LOG.debugf( "Static select for one-to-many %s: %s", oneToManyPersister.getRole(), getSQLString() );
	}
}
 
public DynamicBatchingCollectionLoader(
		QueryableCollection collectionPersister,
		SessionFactoryImplementor factory,
		LoadQueryInfluencers influencers) {
	super( collectionPersister, factory, influencers );

	JoinWalker walker = buildJoinWalker( collectionPersister, factory, influencers );
	initFromWalker( walker );
	this.sqlTemplate = walker.getSQLString();
	this.alias = StringHelper.generateAlias( collectionPersister.getRole(), 0 );
	postInstantiate();

	if ( LOG.isDebugEnabled() ) {
		LOG.debugf(
				"SQL-template for dynamic collection [%s] batch-fetching : %s",
				collectionPersister.getRole(),
				sqlTemplate
		);
	}
}
 
源代码5 项目: lams   文件: BasicCollectionLoader.java
protected BasicCollectionLoader(
		QueryableCollection collectionPersister,
		int batchSize,
		String subquery,
		SessionFactoryImplementor factory,
		LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
	super( collectionPersister, factory, loadQueryInfluencers );

	JoinWalker walker = new BasicCollectionJoinWalker(
			collectionPersister,
			batchSize,
			subquery,
			factory,
			loadQueryInfluencers
	);
	initFromWalker( walker );

	postInstantiate();

	if ( LOG.isDebugEnabled() ) {
		LOG.debugf( "Static select for collection %s: %s", collectionPersister.getRole(), getSQLString() );
	}
}
 
源代码6 项目: cacheonix-core   文件: CascadeEntityLoader.java
public CascadeEntityLoader(
		OuterJoinLoadable persister,
		CascadingAction action,
		SessionFactoryImplementor factory) 
throws MappingException {
	super(
			persister, 
			persister.getIdentifierType(), 
			factory, 
			CollectionHelper.EMPTY_MAP
		);

	JoinWalker walker = new CascadeEntityJoinWalker(
			persister, 
			action,
			factory
		);
	initFromWalker( walker );

	postInstantiate();
	
	log.debug( "Static select for action " + action + " on entity " + entityName + ": " + getSQLString() );

}
 
源代码7 项目: cacheonix-core   文件: OneToManyLoader.java
public OneToManyLoader(
		QueryableCollection oneToManyPersister, 
		int batchSize, 
		String subquery, 
		SessionFactoryImplementor factory, 
		Map enabledFilters)
throws MappingException {

	super(oneToManyPersister, factory, enabledFilters);
	
	JoinWalker walker = new OneToManyJoinWalker(
			oneToManyPersister, 
			batchSize, 
			subquery, 
			factory, 
			enabledFilters
		);
	initFromWalker( walker );

	postInstantiate();

	log.debug( "Static select for one-to-many " + oneToManyPersister.getRole() + ": " + getSQLString() );
}
 
源代码8 项目: cacheonix-core   文件: BasicCollectionLoader.java
protected BasicCollectionLoader(
		QueryableCollection collectionPersister, 
		int batchSize, 
		String subquery, 
		SessionFactoryImplementor factory, 
		Map enabledFilters)
throws MappingException {
	
	super(collectionPersister, factory, enabledFilters);
	
	JoinWalker walker = new BasicCollectionJoinWalker(
			collectionPersister, 
			batchSize, 
			subquery, 
			factory, 
			enabledFilters
		);
	initFromWalker( walker );

	postInstantiate();

	log.debug( "Static select for collection " + collectionPersister.getRole() + ": " + getSQLString() );
}
 
源代码9 项目: lams   文件: CollectionElementLoader.java
public CollectionElementLoader(
		QueryableCollection collectionPersister,
		SessionFactoryImplementor factory,
		LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
	super( factory, loadQueryInfluencers );

	this.keyType = collectionPersister.getKeyType();
	this.indexType = collectionPersister.getIndexType();
	this.persister = (OuterJoinLoadable) collectionPersister.getElementPersister();
	this.entityName = persister.getEntityName();

	JoinWalker walker = new EntityJoinWalker(
			persister,
			ArrayHelper.join(
					collectionPersister.getKeyColumnNames(),
					collectionPersister.toColumns( "index" )
			),
			1,
			LockMode.NONE,
			factory,
			loadQueryInfluencers
	);
	initFromWalker( walker );

	postInstantiate();

	if ( LOG.isDebugEnabled() ) {
		LOG.debugf( "Static select for entity %s: %s", entityName, getSQLString() );
	}

}
 
源代码10 项目: cacheonix-core   文件: EntityLoader.java
public EntityLoader(
		OuterJoinLoadable persister, 
		String[] uniqueKey, 
		Type uniqueKeyType, 
		int batchSize, 
		LockMode lockMode,
		SessionFactoryImplementor factory, 
		Map enabledFilters) 
throws MappingException {
	super(persister, uniqueKeyType, factory, enabledFilters);

	JoinWalker walker = new EntityJoinWalker(
			persister, 
			uniqueKey, 
			batchSize, 
			lockMode, 
			factory, 
			enabledFilters
		);
	initFromWalker( walker );

	postInstantiate();

	batchLoader = batchSize > 1;
	
	log.debug( "Static select for entity " + entityName + ": " + getSQLString() );

}
 
源代码11 项目: cacheonix-core   文件: CollectionElementLoader.java
public CollectionElementLoader(
		QueryableCollection collectionPersister,
		SessionFactoryImplementor factory, 
		Map enabledFilters) 
throws MappingException {
	super(factory, enabledFilters);

	this.keyType = collectionPersister.getKeyType();
	this.indexType = collectionPersister.getIndexType();
	this.persister = (OuterJoinLoadable) collectionPersister.getElementPersister();
	this.entityName = persister.getEntityName();
	
	JoinWalker walker = new EntityJoinWalker(
			persister, 
			ArrayHelper.join( 
					collectionPersister.getKeyColumnNames(), 
					collectionPersister.getIndexColumnNames()
				),
			1, 
			LockMode.NONE, 
			factory, 
			enabledFilters
		);
	initFromWalker( walker );

	postInstantiate();
	
	log.debug( "Static select for entity " + entityName + ": " + getSQLString() );

}
 
如果文章对您有帮助,请点击页面广告。以鼓励作者做出的努力。
 类所在包
 类方法
 同包方法