Package org.apache.commons.betwixt.expression

Examples of org.apache.commons.betwixt.expression.IteratorExpression


                ElementDescriptor loopDescriptor = new ElementDescriptor();
                loopDescriptor.setCollective(true);
                loopDescriptor.setHollow(true);
                loopDescriptor.setSingularPropertyType(Object.class);
                loopDescriptor.setContextExpression(
                    new IteratorExpression( EmptyExpression.getInstance() )
                );
                loopDescriptor.setUpdater(CollectionUpdater.getInstance());
                if ( bean.isMapType() ) {
                    loopDescriptor.setQualifiedName( "entry" );
                }
View Full Code Here


                log.trace("Loop type: " + name);
                log.trace("Wrap in collections? " + introspector.isWrapCollectionsInElement());
            }
            ElementDescriptor loopDescriptor = new ElementDescriptor();
            loopDescriptor.setContextExpression(
                new IteratorExpression( new MethodExpression( readMethod ) )
            );
            loopDescriptor.setWrapCollectionsInElement(
                        introspector.isWrapCollectionsInElement());
            // XXX: need to support some kind of 'add' or handle arrays, Lists or indexed properties
            //loopDescriptor.setUpdater( new MethodUpdater( writeMethod ) );
View Full Code Here

            log.trace("Loop type ??");
           
            // don't wrap this in an extra element as its specified in the
            // XML descriptor so no need.           
            elementDescriptor.setContextExpression(
                new IteratorExpression( new MethodExpression( readMethod ) )
            );

            writeMethod = null;
        } else {
            log.trace( "Standard property" );
View Full Code Here

                        standardProperty = true;
                    }
                }
            }
            if (!standardProperty) {
                expression = new IteratorExpression(methodExpression);
            }
            elementDescriptor.setContextExpression(expression);
            elementDescriptor.setHollow(true);

            writeMethod = null;
View Full Code Here

                log.trace("Loop type: " + name);
                log.trace("Wrap in collections? " + introspector.isWrapCollectionsInElement());
            }
            ElementDescriptor loopDescriptor = new ElementDescriptor();
            loopDescriptor.setContextExpression(
                new IteratorExpression( new MethodExpression( readMethod ) )
            );
            loopDescriptor.setWrapCollectionsInElement(
                        introspector.isWrapCollectionsInElement());
            // XXX: need to support some kind of 'add' or handle arrays, Lists or indexed properties
            //loopDescriptor.setUpdater( new MethodUpdater( writeMethod ) );
View Full Code Here

            log.trace("Loop type ??");
           
            // don't wrap this in an extra element as its specified in the
            // XML descriptor so no need.           
            elementDescriptor.setContextExpression(
                new IteratorExpression( new MethodExpression( readMethod ) )
            );

            writeMethod = null;
        } else {
            log.trace( "Standard property" );
View Full Code Here

           
        } else if ( bean.isLoopType() ) {
            log.trace("Bean is loop");
            ElementDescriptor loopDescriptor = new ElementDescriptor();
            loopDescriptor.setContextExpression(
                new IteratorExpression( EmptyExpression.getInstance() )
            );
            if ( bean.isMapType() ) {
                loopDescriptor.setQualifiedName( "entry" );
            }
            elementDescriptor.setElementDescriptors( new ElementDescriptor[] { loopDescriptor } );
View Full Code Here

                log.trace("Loop type: " + name);
                log.trace("Wrap in collections? " + isWrapCollectionsInElement());
            }
            ElementDescriptor loopDescriptor = new ElementDescriptor();
            loopDescriptor.setContextExpression(
                new IteratorExpression( propertyExpression )
            );
            loopDescriptor.setWrapCollectionsInElement( isWrapCollectionsInElement() );
            // XXX: need to support some kind of 'add' or handle arrays, Lists or indexed properties
            //loopDescriptor.setUpdater( new MethodUpdater( writeMethod ) );
            if ( Map.class.isAssignableFrom( type ) ) {
View Full Code Here

        //TODO: need to clean the element descriptors so that the wrappers are plain
        ElementDescriptor result;
       
        ElementDescriptor entryDescriptor = new ElementDescriptor();
        entryDescriptor.setContextExpression(
            new IteratorExpression( propertyExpression )
        );

        entryDescriptor.setLocalName( "entry" );
        entryDescriptor.setPropertyName( getPropertyName() );
        entryDescriptor.setPropertyType( getPropertyType() );
View Full Code Here

           
        ElementDescriptor result;
       
        ElementDescriptor loopDescriptor = new ElementDescriptor();
        loopDescriptor.setContextExpression(
            new IteratorExpression( propertyExpression )
        );
        loopDescriptor.setPropertyName(getPropertyName());
        loopDescriptor.setPropertyType(getPropertyType());
        loopDescriptor.setHollow(true);
        // set the property updater (if it exists)
View Full Code Here

TOP

Related Classes of org.apache.commons.betwixt.expression.IteratorExpression

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.