Examples of alreadyMaterialized()


Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

        if(handler != null)
        {
            this.handler = handler;
            isNew = Boolean.FALSE;
            identity = handler.getIdentity();
            if(handler.alreadyMaterialized())
            {
                cld = tx.getBroker().getClassDescriptor(handler.getRealSubject().getClass());
            }
            else
            {
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

                            item = colIterator.next();
                            RuntimeObject rt = new RuntimeObject(item, this);
                            if (rt.isProxy())
                            {
                                IndirectionHandler handler = ProxyHelper.getIndirectionHandler(item);
                                if (!handler.alreadyMaterialized())
                                {
                                    registerToIndirectionHandler(handler);
                                    continue;
                                }
                                else
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

            IndirectionHandler handler = rtObject.getHandler();
            if(handler == null)
            {
                throw new OJBRuntimeException("Unexpected error, expect an proxy object as indicated: " + rtObject);
            }
            if (handler.alreadyMaterialized())
            {
                objectToRegister = handler.getRealSubject();
            }
            else
            {
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

                // in any case we have to link the source object when the object needs insert
                source.addLinkOneToOne(ord, false);

                IndirectionHandler handler = ProxyHelper.getIndirectionHandler(depObj);
                // if the object is not materialized, nothing has changed
                if(handler == null || handler.alreadyMaterialized())
                {
                    RuntimeObject rt;
                    // if materialized
                    if(handler != null)
                    {
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

        lockManager = LockManager.getInstance();
        swizzlingStrategy = kit.getSwizzlingStrategy();

        handler = ProxyHelper.getIndirectionHandler(userObject);
        if ((handler != null) && handler.alreadyMaterialized())
        {
            userObject = handler.getRealSubject();
            handler = null;
        }
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

    {
        FieldDescriptor[] fields = cld.getPkFields();
        boolean hasNull = false;
        // an unmaterialized proxy object can never have nullified PK's
        IndirectionHandler handler = ProxyHelper.getIndirectionHandler(obj);
        if(handler == null || handler.alreadyMaterialized())
        {
            if(handler != null) obj = handler.getRealSubject();
            FieldDescriptor fld;
            for(int i = 0; i < fields.length; i++)
            {
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

        Collection result = (Collection) query.execute();
        assertEquals(1, result.size());
        Book b = (Book) result.iterator().next();
        IndirectionHandler handler = ProxyHelper.getIndirectionHandler(b.getPublisher());
        assertNotNull(handler);
        assertFalse(handler.alreadyMaterialized());
        handler.addListener(
                new MaterializationListener()
                {
                    public void beforeMaterialization(IndirectionHandler handler, Identity oid)
                    {
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

        Collection result = (Collection) query.execute();
        assertEquals(1, result.size());
        Book b = (Book) result.iterator().next();
        IndirectionHandler handler = ProxyHelper.getIndirectionHandler(b.getPublisher());
        assertNotNull(handler);
        assertFalse(handler.alreadyMaterialized());
        handler.addListener(
                new MaterializationListener()
                {
                    public void beforeMaterialization(IndirectionHandler handler, Identity oid)
                    {
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

           at some later point in time it invokes callbacks on all it's listeners.
           Using this callback we can defer the registering until it's really needed.
        */
        if (handler != null)
        {
            if (handler.alreadyMaterialized())
            {
                objectToRegister = handler.getRealSubject();
            }
            else
            {
View Full Code Here

Examples of org.apache.ojb.broker.core.proxy.IndirectionHandler.alreadyMaterialized()

                    {
                        item = colIterator.next();
                        IndirectionHandler handler = ProxyHelper.getIndirectionHandler(item);
                        if (handler != null)
                        {
                            if (!handler.alreadyMaterialized())
                            {
                                continue;
                            }
                            else
                            {
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.