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