Package org.apache.cayenne

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


        blockQueries();

        try {

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

        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

            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

            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

        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

        final DataObject p1 = (DataObject) result.get(q.getPageSize());

        queryInterceptor.runWithQueriesBlocked(new UnitTestClosure() {

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

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

        return 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 duplication
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.