Package org.apache.cayenne.reflect

Examples of org.apache.cayenne.reflect.PersistentDescriptor


        assertNull(d1.getSuperclassDescriptor());
        assertSame(d1, d2.getSuperclassDescriptor());
    }

    public void testCopyObjectProperties() {
        PersistentDescriptor d1 = new PersistentDescriptor();

        FieldAccessor accessor = new FieldAccessor(TestBean.class, "string", String.class);
        Property property = new SimpleAttributeProperty(d1, accessor, null);

        d1.declaredProperties.put(property.getName(), property);

        TestBean from = new TestBean();
        from.setString("123");

        TestBean to = new TestBean();

        d1.shallowMerge(from, to);
        assertEquals("123", to.getString());
    }
View Full Code Here


import org.apache.cayenne.unit.util.TestBean;

public class PersistentDescriptorTest extends TestCase {

    public void testConstructor() {
        PersistentDescriptor d1 = new PersistentDescriptor();
        assertNull(d1.getSuperclassDescriptor());

        PersistentDescriptor d2 = new PersistentDescriptor();
        d2.setSuperclassDescriptor(d1);
        assertNull(d1.getSuperclassDescriptor());
        assertSame(d1, d2.getSuperclassDescriptor());
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.reflect.PersistentDescriptor

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.