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


Java HibernateMapper类代码示例

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


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

示例1: createCloner

import com.thoughtworks.xstream.hibernate.mapper.HibernateMapper; //导入依赖的package包/类
@Override
public <T> Function<T, T> createCloner(ClassLoader classLoader)
{
	final XStream xstream = new XStream() {
		@Override
		protected MapperWrapper wrapMapper(MapperWrapper next) {
			return new HibernateMapper(next);
		}
	};
	xstream.setClassLoader(classLoader);
	xstream.autodetectAnnotations(true);
	xstream.registerConverter(new HibernateProxyConverter());
	xstream.registerConverter(new HibernatePersistentCollectionConverter(xstream.getMapper()));
	xstream.registerConverter(new HibernatePersistentMapConverter(xstream.getMapper()));
	xstream.registerConverter(new HibernatePersistentSortedMapConverter(xstream.getMapper()));
	xstream.registerConverter(new HibernatePersistentSortedSetConverter(xstream.getMapper()));
	return t -> (T) xstream.fromXML(xstream.toXML(t));
}
 
开发者ID:equella,项目名称:Equella,代码行数:19,代码来源:InitialiserServiceImpl.java

示例2: getXStream

import com.thoughtworks.xstream.hibernate.mapper.HibernateMapper; //导入依赖的package包/类
private synchronized XStream getXStream()
{
	if( xstream == null )
	{
		xstream = new XmlServiceImpl.ExtXStream(getClass().getClassLoader()) {
			@Override
			protected MapperWrapper wrapMapper(MapperWrapper next) {
				return new HibernateMapper(next);
			}
		};
		xstream.registerConverter(new WorkflowNodeConverter());
		xstream.registerConverter(new BaseEntityXmlConverter(registry));
		xstream.registerConverter(new HibernateProxyConverter());
		xstream.registerConverter(new HibernatePersistentCollectionConverter(xstream.getMapper()));
		xstream.registerConverter(new HibernatePersistentMapConverter(xstream.getMapper()));
	}
	return xstream;
}
 
开发者ID:equella,项目名称:Equella,代码行数:19,代码来源:ItemConverter.java

示例3: getXStream

import com.thoughtworks.xstream.hibernate.mapper.HibernateMapper; //导入依赖的package包/类
private synchronized XStream getXStream()
{
	if( xstream == null )
	{
		xstream = new XmlServiceImpl.ExtXStream(getClass().getClassLoader()) {
			@Override
			protected MapperWrapper wrapMapper(MapperWrapper next) {
				return new HibernateMapper(next);
			}
		};
		xstream.registerConverter(new HibernateProxyConverter());
		xstream.registerConverter(new HibernatePersistentCollectionConverter(xstream.getMapper()));
		xstream.alias("com.tle.core.oauth.beans.OAuthToken", OAuthToken.class);
		xstream.alias("com.tle.core.oauth.beans.OAuthClient", OAuthClient.class);
		xstream.registerConverter(new ClientXStreamConverter());
	}
	return xstream;
}
 
开发者ID:equella,项目名称:Equella,代码行数:19,代码来源:OAuthTokenConverter.java

示例4: createXStream

import com.thoughtworks.xstream.hibernate.mapper.HibernateMapper; //导入依赖的package包/类
protected XStream createXStream() {
    final XStream xstream = new XStream() {

        protected MapperWrapper wrapMapper(final MapperWrapper next) {
            return new HibernateMapper(next);
        }

    };
    xstream.registerConverter(new HibernateProxyConverter());
    xstream.registerConverter(new HibernatePersistentCollectionConverter(xstream
        .getMapper()));
    xstream.registerConverter(new HibernatePersistentMapConverter(xstream.getMapper()));
    xstream
        .registerConverter(new HibernatePersistentSortedMapConverter(xstream.getMapper()));
    xstream
        .registerConverter(new HibernatePersistentSortedSetConverter(xstream.getMapper()));

    return xstream;
}
 
开发者ID:x-stream,项目名称:xstream,代码行数:20,代码来源:AbstractHibernateAcceptanceTest.java

示例5: getXStream

import com.thoughtworks.xstream.hibernate.mapper.HibernateMapper; //导入依赖的package包/类
private synchronized XStream getXStream()
{
	if( xstream == null )
	{
		xstream = new XmlServiceImpl.ExtXStream(getClass().getClassLoader()) {
			@Override
			protected MapperWrapper wrapMapper(MapperWrapper next) {
				return new HibernateMapper(next);
			}
		};
		xstream.registerConverter(new WorkflowNodeConverter());
	}
	return xstream;
}
 
开发者ID:equella,项目名称:Equella,代码行数:15,代码来源:TaskHistoryConverter.java

示例6: instanciateXstreamForHibernate

import com.thoughtworks.xstream.hibernate.mapper.HibernateMapper; //导入依赖的package包/类
public static XStream instanciateXstreamForHibernate() {
    XStream xstream1 =new XStream() {
        protected MapperWrapper wrapMapper(final MapperWrapper next) {
            return new HibernateMapper(next);
        }
    };
    xstream1.registerConverter(new HibernateProxyConverter());
    xstream1.registerConverter(new HibernatePersistentCollectionConverter(xstream1.getMapper()));
    xstream1.registerConverter(new HibernatePersistentMapConverter(xstream1.getMapper()));
    xstream1.registerConverter(new HibernatePersistentSortedMapConverter(xstream1.getMapper()));
    xstream1.registerConverter(new HibernatePersistentSortedSetConverter(xstream1.getMapper()));
    return xstream1;
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:14,代码来源:XStreamUtils.java


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