Package org.apache.cayenne.reflect

Examples of org.apache.cayenne.reflect.PropertyVisitor


            final Persistent sourceObject,
            final Persistent targetObject) {

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

                public boolean visitToMany(ToManyProperty property) {
                    property.removeTarget(targetObject, sourceObject, false);
                    return false;
                }
View Full Code Here


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

        descriptor.visitProperties(new PropertyVisitor() {

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

                errorMessage.append(" Declared properties are: ");

                // Grab each of the declared properties.
                final List<String> properties = new ArrayList<String>();
                classDescriptor.visitProperties(new PropertyVisitor() {

                    public boolean visitAttribute(final AttributeProperty property) {
                        properties.add(property.getName());

                        return true;
View Full Code Here

        PropertyChangeProcessingStrategy oldStrategy = ((CayenneContext) context)
                .getPropertyChangeProcessingStrategy();
        ((CayenneContext) context)
                .setPropertyChangeProcessingStrategy(PropertyChangeProcessingStrategy.IGNORE);
        try {
            property.visit(new PropertyVisitor() {

                public boolean visitAttribute(AttributeProperty property) {
                    return false;
                }
View Full Code Here

                .setPropertyChangeProcessingStrategy(PropertyChangeProcessingStrategy.IGNORE);
        final Persistent[] target = new Persistent[1];
        target[0] = findObject(targetNodeId);
       
        try {
            property.visit(new PropertyVisitor() {

                public boolean visitAttribute(AttributeProperty property) {
                    return false;
                }
View Full Code Here

            0
        };

        final Set<String> visited = new HashSet<String>();

        PropertyVisitor visitor = new PropertyVisitor() {

            public boolean visitAttribute(AttributeProperty property) {
                ObjAttribute oa = property.getAttribute();
                if (visited.add(oa.getDbAttributePath())) {
                    entityResult.addObjectField(
View Full Code Here

                errorMessage.append(" Declared properties are: ");

                // Grab each of the declared properties.
                final List<String> properties = new ArrayList<String>();
                classDescriptor.visitProperties(new PropertyVisitor() {

                    public boolean visitAttribute(final AttributeProperty property) {
                        properties.add(property.getName());

                        return true;
View Full Code Here

        // * joined prefetch PK

        ClassDescriptor descriptor = queryMetadata.getClassDescriptor();
        ObjEntity oe = descriptor.getEntity();

        PropertyVisitor visitor = new PropertyVisitor() {

            public boolean visitAttribute(AttributeProperty property) {
                ObjAttribute oa = property.getAttribute();

                resetJoinStack();
View Full Code Here

        ObjEntity entity = getEntityResolver().lookupObjEntity(object);
        final ClassDescriptor descriptor = getEntityResolver().getClassDescriptor(
                entity.getName());
        final DataRow snapshot = new DataRow(10);

        descriptor.visitProperties(new PropertyVisitor() {

            public boolean visitAttribute(AttributeProperty property) {
                ObjAttribute objAttr = property.getAttribute();

                // processing compound attributes correctly
View Full Code Here

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

        descriptor.visitProperties(new PropertyVisitor() {

            public boolean visitToMany(ToManyProperty property) {
                property.injectValueHolder(persistent);

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

TOP

Related Classes of org.apache.cayenne.reflect.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.