Package org.apache.openjpa.util

Examples of org.apache.openjpa.util.Proxy


        assertNotNull(proxy.getDeclaredMethod("setElementAt",
            new Class[] {Object.class, int.class}));
    }

    public void testListChangeTracker() {
        Proxy coll = _mgr.newCollectionProxy(ArrayList.class, null, null);
        assertNotNull(coll);
        assertNotNull(coll.getChangeTracker());
        assertTrue(coll.getChangeTracker()
            instanceof CollectionChangeTrackerImpl);
        CollectionChangeTrackerImpl ct = (CollectionChangeTrackerImpl)
            coll.getChangeTracker();
        assertTrue(ct.allowsDuplicates());
        assertTrue(ct.isOrdered());
    }
View Full Code Here


        assertTrue(ct.allowsDuplicates());
        assertTrue(ct.isOrdered());
    }
   
    public void testSetChangeTracker() {
        Proxy coll = _mgr.newCollectionProxy(HashSet.class, null, null);
        assertNotNull(coll);
        assertNotNull(coll.getChangeTracker());
        assertTrue(coll.getChangeTracker()
            instanceof CollectionChangeTrackerImpl);
        CollectionChangeTrackerImpl ct = (CollectionChangeTrackerImpl)
            coll.getChangeTracker();
        assertFalse(ct.allowsDuplicates());
        assertFalse(ct.isOrdered());
    }
View Full Code Here

        assertFalse(ct.allowsDuplicates());
        assertFalse(ct.isOrdered());
    }
    public void testCollectionInterfaceProxy() {
        Proxy coll = _mgr.newCollectionProxy(Collection.class, null, null);
        assertNotNull(coll);
    }
View Full Code Here

        Proxy coll = _mgr.newCollectionProxy(Collection.class, null, null);
        assertNotNull(coll);
    }

    public void testListInterfaceProxy() {
        Proxy coll = _mgr.newCollectionProxy(List.class, null, null);
        assertNotNull(coll);
        assertTrue(coll instanceof List);
    }
View Full Code Here

        assertNotNull(coll);
        assertTrue(coll instanceof List);
    }

    public void testSetInterfaceProxy() {
        Proxy coll = _mgr.newCollectionProxy(Set.class, null, null);
        assertNotNull(coll);
        assertTrue(coll instanceof Set);
        assertFalse(coll instanceof SortedSet);
    }
View Full Code Here

        assertTrue(coll instanceof Set);
        assertFalse(coll instanceof SortedSet);
    }

    public void testSortedSetInterfaceProxy() {
        Proxy coll = _mgr.newCollectionProxy(SortedSet.class, null, null);
        assertNotNull(coll);
        assertTrue(coll instanceof SortedSet);
    }
View Full Code Here

    public void testQueueInterfaceProxy() {
        Class queue = getQueueClass();
        if (queue == null)
            return;

        Proxy coll = _mgr.newCollectionProxy(queue, null, null);
        assertNotNull(coll);
        assertTrue(queue.isInstance(coll));
    }
View Full Code Here

        populate(cal);
        assertCalendarsEquals(cal, (Calendar)orig.clone());
    }

    public void testCalendarAbstractClassProxy() {
        Proxy cal = _mgr.newCalendarProxy(Calendar.class, null);
        assertNotNull(cal);
    }
View Full Code Here

                case JavaTypes.CALENDAR:
                case JavaTypes.DATE:
                case JavaTypes.OBJECT:
                    sm.provideField(getDetachedPersistenceCapable(), this, i);
                    if (objval instanceof Proxy) {
                        Proxy proxy = (Proxy) objval;
                        if (proxy.getChangeTracker() != null)
                            proxy.getChangeTracker().stopTracking();
                        proxy.setOwner(dsm, (dsm == null) ? -1 : i);
                    }
                }
            }
            clear();
        }
View Full Code Here

                case JavaTypes.CALENDAR:
                case JavaTypes.DATE:
                case JavaTypes.OBJECT:
                    sm.provideField(getDetachedPersistenceCapable(), this, i);
                    if (objval instanceof Proxy) {
                        Proxy proxy = (Proxy) objval;
                        if (proxy.getChangeTracker() != null)
                            proxy.getChangeTracker().stopTracking();
                        proxy.setOwner(dsm, (dsm == null) ? -1 : i);
                    }
                }
            }
            clear();
        }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.util.Proxy

Copyright © 2018 www.massapicom. 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.