Examples of readNestedProperty()


Examples of org.apache.art.Painting.readNestedProperty()

    public void testReadNestedProperty1() throws Exception {
        prepareNestedProperties();

        Painting p1 = fetchPainting();
        assertEquals(artistName, p1.readNestedProperty("toArtist.artistName"));
    }

    public void testReadNestedProperty2() throws Exception {
        prepareNestedProperties();
View Full Code Here

Examples of org.apache.cayenne.CayenneDataObject.readNestedProperty()

        CayenneDataObject fk1 = (CayenneDataObject) objects.get(0);

        blockQueries();
        try {

            Object toOnePrefetch = fk1.readNestedProperty("toCompoundPk");
            assertNotNull(toOnePrefetch);
            assertTrue(
                    "Expected DataObject, got: " + toOnePrefetch.getClass().getName(),
                    toOnePrefetch instanceof DataObject);
View Full Code Here

Examples of org.apache.cayenne.CayenneDataObject.readNestedProperty()

        CayenneDataObject fk1 = (CayenneDataObject) objects.get(0);

        blockQueries();
        try {

            Object toOnePrefetch = fk1.readNestedProperty("toCompoundPk");
            assertNotNull(toOnePrefetch);
            assertTrue(
                    "Expected DataObject, got: " + toOnePrefetch.getClass().getName(),
                    toOnePrefetch instanceof DataObject);
View Full Code Here

Examples of org.apache.cayenne.CayenneDataObject.readNestedProperty()

        List<?> objects = context.performQuery(q);
        assertEquals(1, objects.size());
        CayenneDataObject fk1 = (CayenneDataObject) objects.get(0);

        Object toOnePrefetch = fk1.readNestedProperty("toCompoundPk");
        assertNotNull(toOnePrefetch);
        assertTrue(
                "Expected DataObject, got: " + toOnePrefetch.getClass().getName(),
                toOnePrefetch instanceof DataObject);
View Full Code Here

Examples of org.apache.cayenne.DataObject.readNestedProperty()

                AuditableChild.class);
        if (annotation == null) {
            throw new IllegalArgumentException("No 'AuditableChild' annotation found");
        }

        return dataObject.readNestedProperty(annotation.value());
    }
}
View Full Code Here

Examples of org.apache.cayenne.DataObject.readNestedProperty()

        blockQueries();

        try {

            Object toOnePrefetch = p1.readNestedProperty("toArtist");
            assertNotNull(toOnePrefetch);
            assertTrue(
                    "Expected DataObject, got: " + toOnePrefetch.getClass().getName(),
                    toOnePrefetch instanceof DataObject);
View Full Code Here

Examples of org.apache.cayenne.DataObject.readNestedProperty()

        blockQueries();
        try {
            assertFalse(result.isEmpty());
            DataObject p1 = (DataObject) result.get(0);

            Object toOnePrefetch = p1.readNestedProperty("toArtist");
            assertNotNull(toOnePrefetch);
            assertTrue(
                    "Expected DataObject, got: " + toOnePrefetch.getClass().getName(),
                    toOnePrefetch instanceof DataObject);
View Full Code Here

Examples of org.apache.cayenne.DataObject.readNestedProperty()

            List cachedResult = context.performQuery(q);

            assertFalse(cachedResult.isEmpty());
            DataObject p1 = (DataObject) cachedResult.get(0);

            Object toOnePrefetch = p1.readNestedProperty("toArtist");
            assertNotNull(toOnePrefetch);
            assertTrue(
                    "Expected DataObject, got: " + toOnePrefetch.getClass().getName(),
                    toOnePrefetch instanceof DataObject);
View Full Code Here

Examples of org.apache.cayenne.DataObject.readNestedProperty()

            List cachedResult = context.performQuery(q);

            assertFalse(cachedResult.isEmpty());
            DataObject p1 = (DataObject) cachedResult.get(0);

            Object toOnePrefetch = p1.readNestedProperty("toArtist");
            assertNotNull(toOnePrefetch);
            assertTrue(
                    "Expected DataObject, got: " + toOnePrefetch.getClass().getName(),
                    toOnePrefetch instanceof DataObject);
View Full Code Here

Examples of org.apache.cayenne.DataObject.readNestedProperty()

        if (propertyPath == null || propertyPath.equals("")) {
            throw new IllegalStateException("Either 'value' or 'objectIdRelationship' of @AuditableChild must be set");
        }

        return (Persistent) dataObject.readNestedProperty(propertyPath);
    }

    // TODO: It's a temporary clone method of {@link
    // org.apache.cayenne.lifecycle.relationship.ObjectIdRelationshipHandler#objectIdRelationshipName(String)}.
    // Needs to be encapsulated to some separate class to avoid a code
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.