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


Java PersistentBag类代码示例

本文整理汇总了Java中org.hibernate.collection.internal.PersistentBag的典型用法代码示例。如果您正苦于以下问题:Java PersistentBag类的具体用法?Java PersistentBag怎么用?Java PersistentBag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: isLazyInitializedTrue

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
@Test
public void isLazyInitializedTrue() {
	final PersistentBag bag = new PersistentBag() {
		private static final long serialVersionUID = 1L;

		{
			setInitialized();
		}
	};
	Assert.assertTrue(super.isLazyInitialized(bag));
}
 
开发者ID:ligoj,项目名称:bootstrap,代码行数:12,代码来源:TestAbstractJpaTest.java

示例2: getSerializer

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public Serializer getSerializer(Class cl) throws HessianProtocolException{
	if (PersistentMap.class.isAssignableFrom(cl) || PersistentBag.class.isAssignableFrom(cl)) {
		return serializer ;
	}
	return super.getSerializer(cl);
}
 
开发者ID:kane-chen,项目名称:dubbo-demo,代码行数:9,代码来源:MyHessian2SerializerFactory.java

示例3: postBootHook

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
@Override
public void postBootHook(AbstractApplicationContext ctx) {
    if(ctx.containsBean("xstream")){
        XStream xStream = (XStream)ctx.getBean("xstream");
        xStream.registerConverter(new HibernateProxyConverter());
        xStream.registerConverter(new HibernatePersistentCollectionConverter(xStream.getMapper()));
        xStream.alias("list", PersistentList.class);
        xStream.alias("list", PersistentBag.class);
        xStream.alias("set", PersistentSet.class);
    }

}
 
开发者ID:korwe,项目名称:kordapt,代码行数:13,代码来源:HibernateCoreAddon.java

示例4: instantiate

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key)
throws HibernateException {
	return new PersistentBag(session);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:BagType.java

示例5: wrap

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
public PersistentCollection wrap(SessionImplementor session, Object collection) {
	return new PersistentBag( session, (Collection) collection );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:4,代码来源:BagType.java

示例6: canConvert

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
public boolean canConvert(Class type) {
	return type == PersistentBag.class;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:4,代码来源:PersistentBagConverter.java

示例7: canConvert

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
public boolean canConvert(Class clazz) {
	return !ClassUtils.isSystemType(clazz) && clazz != PersistentBag.class;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:4,代码来源:JpaConverter.java

示例8: isLazyInitializedFalse

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
@Test
public void isLazyInitializedFalse() {
	Assert.assertFalse(super.isLazyInitialized(new PersistentBag()));
}
 
开发者ID:ligoj,项目名称:bootstrap,代码行数:5,代码来源:TestAbstractJpaTest.java

示例9: canConvert

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
public boolean canConvert(final Class type) {
    return type == PersistentBag.class
            || type == PersistentList.class
            || type == PersistentSet.class;
}
 
开发者ID:korwe,项目名称:kordapt,代码行数:6,代码来源:HibernatePersistentCollectionConverter.java

示例10: isLazyInitialized

import org.hibernate.collection.internal.PersistentBag; //导入依赖的package包/类
/**
 * Test a collection is a {@link PersistentBag} and is initialized.
 * 
 * @param bag
 *            the JPA bag to test.
 * @return <code>true</code> if the given collection is a {@link PersistentBag} and is initialized.
 */
protected boolean isLazyInitialized(final Collection<?> bag) {
	return bag instanceof PersistentBag && ((PersistentBag) bag).wasInitialized();
}
 
开发者ID:ligoj,项目名称:bootstrap,代码行数:11,代码来源:AbstractJpaTest.java


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