Package org.apache.cayenne.property

Examples of org.apache.cayenne.property.PropertyVisitor


                entity.getName());
        if (descriptor == null) {
            throw new IllegalArgumentException("Invalid entity name: " + entity.getName());
        }

        descriptor.visitProperties(new PropertyVisitor() {

            public boolean visitCollectionArc(CollectionProperty property) {
                property.injectValueHolder(object);

                if (!property.isFault(object)) {
View Full Code Here


                entity.getName());
        if (descriptor == null) {
            throw new IllegalArgumentException("Invalid entity name: " + entity.getName());
        }

        descriptor.visitProperties(new PropertyVisitor() {

            public boolean visitCollectionArc(CollectionProperty property) {
                property.injectValueHolder(object);

                if (!property.isFault(object)) {
View Full Code Here

        final Persistent target = context.localObject(id, source);
        seen.put(id, target);

        descriptor = descriptor.getSubclassDescriptor(source.getClass());
        descriptor.visitProperties(new PropertyVisitor() {

            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {

                if (!property.isFault(source)) {
                    Object destinationSource = property.readProperty(source);
View Full Code Here

        String entityName = object.getObjectId().getEntityName();
        final ObjEntity entity = context.getEntityResolver().lookupObjEntity(entityName);
        ClassDescriptor descriptor = context.getEntityResolver().getClassDescriptor(
                entityName);

        descriptor.visitProperties(new PropertyVisitor() {

            public boolean visitCollectionArc(CollectionProperty property) {
                ObjRelationship relationship = (ObjRelationship) entity
                        .getRelationship(property.getName());
View Full Code Here

            final Persistent sourceObject,
            final Persistent targetObject) {

        ArcProperty reverseArc = property.getComplimentaryReverseArc();
        if (reverseArc != null) {
            reverseArc.visit(new PropertyVisitor() {

                public boolean visitCollectionArc(CollectionProperty property) {
                    property.addTarget(targetObject, sourceObject, false);
                    return false;
                }
View Full Code Here

        final Persistent target = (Persistent) targetDescriptor.createObject();
        target.setObjectId(id);
        seen.put(id, target);

        descriptor.visitProperties(new PropertyVisitor() {

            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
                if (prefetchTree != null) {

                    PrefetchTreeNode child = prefetchTree.getNode(property.getName());
View Full Code Here

            final boolean lock = entity.getLockType() == ObjEntity.LOCK_TYPE_OPTIMISTIC;

            this.snapshot = new HashMap();
            this.arcSnapshot = new HashMap();

            classDescriptor.visitProperties(new PropertyVisitor() {

                public boolean visitProperty(Property property) {
                    snapshot.put(property.getName(), property.readProperty(object));
                    return true;
                }
View Full Code Here

            return false;
        }

        // check phantom mods

        getClassDescriptor().visitProperties(new PropertyVisitor() {

            public boolean visitProperty(Property property) {
                Object oldValue = snapshot.get(property.getName());
                Object newValue = property.readProperty(object);
View Full Code Here

        applySimplePropertyChanges(handler);
    }

    private void applySimplePropertyChanges(final GraphChangeHandler handler) {
        final Persistent object = (Persistent) objectStore.getNodeNoSync(nodeId);
        getClassDescriptor().visitProperties(new PropertyVisitor() {

            public boolean visitProperty(Property property) {

                Object newValue = property.readProperty(object);
View Full Code Here

                entity.getName());
        if (descriptor == null) {
            throw new IllegalArgumentException("Invalid entity name: " + entity.getName());
        }

        descriptor.visitProperties(new PropertyVisitor() {

            public boolean visitCollectionArc(CollectionProperty property) {
                property.injectValueHolder(object);

                if (!property.isFault(object)) {
View Full Code Here

TOP

Related Classes of org.apache.cayenne.property.PropertyVisitor

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.