当前位置: 首页>>代码示例>>Java>>正文


Java CollectionPersister.getFactory方法代码示例

本文整理汇总了Java中org.hibernate.persister.collection.CollectionPersister.getFactory方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionPersister.getFactory方法的具体用法?Java CollectionPersister.getFactory怎么用?Java CollectionPersister.getFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hibernate.persister.collection.CollectionPersister的用法示例。


在下文中一共展示了CollectionPersister.getFactory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeCollectionLoadQueryDetails

import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
/**
 * Constructs a BasicCollectionLoadQueryDetails object from the given inputs.
 *
 * @param collectionPersister The collection persister.
 * @param loadPlan The load plan.
 * @param buildingParameters And influencers that would affect the generated SQL (mostly we are concerned with those
 * that add additional joins here)
 *
 * @return The EntityLoadQueryDetails
 */
public static LoadQueryDetails makeCollectionLoadQueryDetails(
		CollectionPersister collectionPersister,
		LoadPlan loadPlan,
		QueryBuildingParameters buildingParameters) {
	final CollectionReturn rootReturn = RootHelper.INSTANCE.extractRootReturn( loadPlan, CollectionReturn.class );
	final AliasResolutionContextImpl aliasResolutionContext = new AliasResolutionContextImpl(
			collectionPersister.getFactory()
	);
	return collectionPersister.isOneToMany() ?
			new OneToManyLoadQueryDetails(
					loadPlan,
					aliasResolutionContext,
					rootReturn,
					buildingParameters,
					collectionPersister.getFactory()
			) :
			new BasicCollectionLoadQueryDetails(
					loadPlan,
					aliasResolutionContext,
					rootReturn,
					buildingParameters,
					collectionPersister.getFactory()
			);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:35,代码来源:BatchingLoadQueryDetailsFactory.java

示例2: readFrom

import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
@Override
@SuppressWarnings({"deprecation", "unchecked"})
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
		throws HibernateException, SQLException {
	final Object object = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );
	final Type elementType = persister.getElementType();
	final SessionFactoryImplementor factory = persister.getFactory();
	final String indexNode = getIndexAttributeName( persister );

	final Element elem = element.addElement( persister.getElementNodeName() );
	elementType.setToXMLNode( elem, object, factory ); 

	final Type indexType = persister.getIndexType();
	final Object indexValue = persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() );
	final String index = ( (XmlRepresentableType) indexType ).toXMLString( indexValue, factory );
	setIndex( elem, indexNode, index );
	return object;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:PersistentIndexedElementHolder.java

示例3: CollectionKey

import org.hibernate.persister.collection.CollectionPersister; //导入方法依赖的package包/类
public CollectionKey(CollectionPersister persister, Serializable key) {
	this(
			persister.getRole(),
			key,
			persister.getKeyType(),
			persister.getOwnerEntityPersister().getEntityMetamodel().getEntityMode(),
			persister.getFactory()
	);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:CollectionKey.java


注:本文中的org.hibernate.persister.collection.CollectionPersister.getFactory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。