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


Java ListProxyDefaultImpl类代码示例

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


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

示例1: XmlObjectSerializerIgnoreMissingFieldsServiceImpl

import org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl; //导入依赖的package包/类
public XmlObjectSerializerIgnoreMissingFieldsServiceImpl() {

        xstream = new XStream(new ProxyAwareJavaReflectionProvider()) {
            @Override
            protected MapperWrapper wrapMapper(MapperWrapper next) {
                return new MapperWrapper(next) {
                    @Override
                    public boolean shouldSerializeMember(Class definedIn,
                            String fieldName) {
                        if (definedIn == Object.class) {
                            return false;
                        }
                      return super.shouldSerializeMember(definedIn, fieldName);
                   }
               };
           }
       };

		xstream.registerConverter(new ProxyConverter(xstream.getMapper(), xstream.getReflectionProvider() ));
		xstream.addDefaultImplementation(ArrayList.class, ListProxyDefaultImpl.class);
        xstream.registerConverter(new DateTimeConverter());
	}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:23,代码来源:XmlObjectSerializerIgnoreMissingFieldsServiceImpl.java

示例2: XmlObjectSerializerServiceImpl

import org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl; //导入依赖的package包/类
public XmlObjectSerializerServiceImpl() {
		xstream = new XStream(new ProxyAwareJavaReflectionProvider());

        // See http://xstream.codehaus.org/faq.html#Serialization_CGLIB
        // To use a newer version of XStream we may need to do something like this:
//        xstream = new XStream() {
//
//            @Override
//            public ReflectionProvider getReflectionProvider() {
//                return new ProxyAwareJavaReflectionProvider();
//            }
//
//            protected MapperWrapper wrapMapper(MapperWrapper next) {
//                return new CGLIBMapper(next);
//            }
//        };
//        xstream.registerConverter(new CGLIBEnhancedConverter(xstream.getMapper(), xstream.getReflectionProvider()));

		xstream.registerConverter(new ProxyConverter(xstream.getMapper(), xstream.getReflectionProvider() ));
		xstream.addDefaultImplementation(ArrayList.class, ListProxyDefaultImpl.class);
        xstream.registerConverter(new DateTimeConverter());
	}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:23,代码来源:XmlObjectSerializerServiceImpl.java

示例3: XmlObjectSerializerServiceImpl

import org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl; //导入依赖的package包/类
public XmlObjectSerializerServiceImpl() {
    xstream = new XStream(new ProxyAwareJavaReflectionProvider());
    xstream.registerConverter(new ProxyConverter(xstream.getMapper(), xstream.getReflectionProvider()));
    xstream.addDefaultImplementation(ArrayList.class, ListProxyDefaultImpl.class);

    // register converters so that ListProxyDefaultImpl and SetProxyDefaultImpl are
    // serialized as ArrayLists and HashSets
    xstream.registerConverter(new ListProxyDefaultImplConverter(xstream.getMapper()));
    xstream.registerConverter(new SetProxyDefaultImplConverter(xstream.getMapper()));
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:11,代码来源:XmlObjectSerializerServiceImpl.java

示例4: SerializerServiceBase

import org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl; //导入依赖的package包/类
public SerializerServiceBase() {
    serializationStates = new ThreadLocal<SerializationState>();
    evaluators = new ThreadLocal<PropertySerializabilityEvaluator>();
    
    xstream = new XStream(new ProxyAndStateAwareJavaReflectionProvider());
    xstream.registerConverter(new ProxyConverter(xstream.getMapper(), xstream.getReflectionProvider() ));
    xstream.addDefaultImplementation(ArrayList.class, ListProxyDefaultImpl.class);
    xstream.addDefaultImplementation(AutoPopulatingList.class, ListProxyDefaultImpl.class);
    xstream.registerConverter(new AutoPopulatingListConverter(xstream.getMapper()));
    xstream.registerConverter(new DateTimeConverter());
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:12,代码来源:SerializerServiceBase.java

示例5: marshal

import org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl; //导入依赖的package包/类
public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) {
    if (obj instanceof ListProxyDefaultImpl) { 
        List copiedList = new ArrayList(); 
        List proxiedList = (List) obj; 
        for (Iterator iter = proxiedList.iterator(); iter.hasNext();) { 
            copiedList.add(iter.next()); 
        } 
        context.convertAnother( copiedList );
    } 
    else { 
        super.marshal(getPersistenceService().resolveProxy(obj), writer, context);
    }           
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:14,代码来源:SerializerServiceBase.java

示例6: canConvert

import org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public boolean canConvert(Class type) {
    return ListProxyDefaultImpl.class.equals(type);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:6,代码来源:XmlObjectSerializerServiceImpl.java

示例7: load

import org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl; //导入依赖的package包/类
/**
 * Loads the configuration from file "OBJ.properties". If the system
 * property "OJB.properties" is set, then the configuration in that file is
 * loaded. Otherwise, the file "OJB.properties" is tried. If that is also
 * unsuccessful, then the configuration is filled with default values.
 */
protected void load()
{
    // properties file may be set as a System property.
    // if no property is set take default name.
    String fn = System.getProperty(OJB_PROPERTIES_FILE, OJB_PROPERTIES_FILE);
    setFilename(fn);
    super.load();

    // default repository & connection descriptor file
    repositoryFilename = getString("repositoryFile", OJB_METADATA_FILE);

    // object cache class
    objectCacheClass = getClass("ObjectCacheClass", ObjectCacheDefaultImpl.class, ObjectCache.class);

    // load PersistentField Class
    persistentFieldClass =
            getClass("PersistentFieldClass", PersistentFieldDirectImpl.class, PersistentField.class);

    // load PersistenceBroker Class
    persistenceBrokerClass =
            getClass("PersistenceBrokerClass", PersistenceBrokerImpl.class, PersistenceBroker.class);

    // load ListProxy Class
    listProxyClass = getClass("ListProxyClass", ListProxyDefaultImpl.class);

    // load SetProxy Class
    setProxyClass = getClass("SetProxyClass", SetProxyDefaultImpl.class);

    // load CollectionProxy Class
    collectionProxyClass = getClass("CollectionProxyClass", CollectionProxyDefaultImpl.class);

    // load IndirectionHandler Class
    indirectionHandlerClass =
        getClass("IndirectionHandlerClass", IndirectionHandlerJDKImpl.class, IndirectionHandler.class);
    
    // load ProxyFactory Class
    proxyFactoryClass =
        getClass("ProxyFactoryClass", ProxyFactoryJDKImpl.class, ProxyFactory.class);

    // load configuration for ImplicitLocking parameter:
    useImplicitLocking = getBoolean("ImplicitLocking", false);

    // load configuration for LockAssociations parameter:
    lockAssociationAsWrites = (getString("LockAssociations", "WRITE").equalsIgnoreCase("WRITE"));

    // load OQL Collection Class
    oqlCollectionClass = getClass("OqlCollectionClass", DListImpl.class, ManageableCollection.class);

    // set the limit for IN-sql , -1 for no limits
    sqlInLimit = getInteger("SqlInLimit", -1);

    //load configuration for PB pool
    maxActive = getInteger(PoolConfiguration.MAX_ACTIVE,
            PoolConfiguration.DEFAULT_MAX_ACTIVE);
    maxIdle = getInteger(PoolConfiguration.MAX_IDLE,
            PoolConfiguration.DEFAULT_MAX_IDLE);
    maxWait = getLong(PoolConfiguration.MAX_WAIT,
            PoolConfiguration.DEFAULT_MAX_WAIT);
    timeBetweenEvictionRunsMillis = getLong(PoolConfiguration.TIME_BETWEEN_EVICTION_RUNS_MILLIS,
            PoolConfiguration.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS);
    minEvictableIdleTimeMillis = getLong(PoolConfiguration.MIN_EVICTABLE_IDLE_TIME_MILLIS,
            PoolConfiguration.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS);
    whenExhaustedAction = getByte(PoolConfiguration.WHEN_EXHAUSTED_ACTION,
            PoolConfiguration.DEFAULT_WHEN_EXHAUSTED_ACTION);

    useSerializedRepository = getBoolean("useSerializedRepository", false);
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:74,代码来源:OjbConfiguration.java


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