Package org.apache.ojb.broker.core.proxy

Examples of org.apache.ojb.broker.core.proxy.CollectionProxy.addListener()


                }
                else
                {
                    status = IS_UNMATERIALIZED_PROXY;
                    if(log.isDebugEnabled()) log.debug("Unmaterialized proxy collection, use proxy listener");
                    colProxy.addListener(this);
                }
            }
            else
            {
                status = IS_NORMAL_OBJECT;
View Full Code Here


                    if (proxy != null)
                    {
                        if (!proxy.isLoaded())
                        {
                            if (log.isDebugEnabled()) log.debug("adding self as listener to collection proxy");
                            proxy.addListener(this);
                            registeredCollectionProxies.add(proxy);
                            continue;
                        }
                    }
                    Iterator colIterator = BrokerHelper.getCollectionIterator(col);
View Full Code Here

        Collection result = (Collection) query.execute();
        assertEquals(1, result.size());
        Book b = (Book) result.iterator().next();
        CollectionProxy handler = ProxyHelper.getCollectionProxy(b.getReviews());
        assertFalse("Don't expect an materialized collection proxy", handler.isLoaded());
        handler.addListener(new CollectionProxyListener()
        {
            public void beforeLoading(CollectionProxyDefaultImpl colProxy)
            {
                fail("Collection proxy shouldn't be materialized");
            }
View Full Code Here

                if (proxy != null)
                {
                    if (!proxy.isLoaded())
                    {
                        if (log.isDebugEnabled()) log.debug("adding self as listener to collection proxy");
                        proxy.addListener(this);
                        continue;
                    }
                }
                Iterator colIterator = BrokerHelper.getCollectionIterator(col);
                // get foreign info for collection elements
View Full Code Here

                    if (proxy != null)
                    {
                        if (!proxy.isLoaded())
                        {
                            if (log.isDebugEnabled()) log.debug("adding self as listener to collection proxy");
                            proxy.addListener(this);
                            registeredCollectionProxies.add(proxy);
                            continue;
                        }
                    }
                    Iterator colIterator = BrokerHelper.getCollectionIterator(col);
View Full Code Here

                }
                else
                {
                    status = IS_UNMATERIALIZED_PROXY;
// TODO: ObjectEnvelopeTable#register take care of proxy objects/collection, no need to handle proxy objects??
                    colProxy.addListener(this);
                    collectionHandler = colProxy;
                }
            }
            else
            {
View Full Code Here

        Collection result = (Collection) query.execute();
        assertEquals(1, result.size());
        Book b = (Book) result.iterator().next();
        CollectionProxy handler = ProxyHelper.getCollectionProxy(b.getReviews());
        assertFalse("Don't expect an materialized collection proxy", handler.isLoaded());
        handler.addListener(new CollectionProxyListener()
        {
            public void beforeLoading(CollectionProxyDefaultImpl colProxy)
            {
                fail("Collection proxy shouldn't be materialized");
            }
View Full Code Here

                if (proxy != null)
                {
                    if (!proxy.isLoaded())
                    {
                        if (log.isDebugEnabled()) log.debug("adding self as listener to collection proxy");
                        proxy.addListener(this);
                        continue;
                    }
                }
                Iterator colIterator = BrokerHelper.getCollectionIterator(col);
                // get foreign info for collection elements
View Full Code Here

                }
                else
                {
                    status = IS_UNMATERIALIZED_PROXY;
// TODO: ObjectEnvelopeTable#register take care of proxy objects/collection, no need to handle proxy objects??
                    colProxy.addListener(this);
                    collectionHandler = colProxy;
                }
            }
            else
            {
View Full Code Here

                    if (proxy != null)
                    {
                        if (!proxy.isLoaded())
                        {
                            if (log.isDebugEnabled()) log.debug("adding self as listener to collection proxy");
                            proxy.addListener(this);
                            registeredCollectionProxies.add(proxy);
                            continue;
                        }
                    }
                    Iterator colIterator = BrokerHelper.getCollectionIterator(col);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.