Package org.geotools.data.joining

Examples of org.geotools.data.joining.JoiningQuery


        if (postFilter != null && postFilter != Filter.INCLUDE) {
            throw new IllegalArgumentException ("Postfilters not allowed in Joining Queries");
        }
       
        // rebuild a new query with the same params, but just the pre-filter
        JoiningQuery preQuery = new JoiningQuery(query);
        preQuery.setFilter(preFilter);
       
        // Build the feature type returned by this query. Also build an eventual extra feature type
        // containing the attributes we might need in order to evaluate the post filter
        SimpleFeatureType querySchema;
        if(query.getPropertyNames() == Query.ALL_NAMES) {
View Full Code Here


    protected Query joinQuery( Query query ) {
        if (this.query==null) {
            return query;
        }
        else if (query instanceof JoiningQuery) {           
            JoiningQuery jQuery = new JoiningQuery(super.joinQuery(query));
            for (String id : ((JoiningQuery) query).getIds()) {
                jQuery.addId(id);
            }
            jQuery.setQueryJoins(((JoiningQuery)query).getQueryJoins());           
            return jQuery;           
        }
        else {           
            return super.joinQuery(query);
        }
View Full Code Here

        if (isJoining) {
            if (!(query instanceof JoiningQuery)) {
                boolean hasIdColumn = !Expression.NIL.equals(mapping.getFeatureIdExpression())
                        && !(mapping.getFeatureIdExpression() instanceof Literal);
                query = new JoiningQuery(query);
                if (hasIdColumn) {
                    FilterAttributeExtractor extractor = new FilterAttributeExtractor();
                    mapping.getFeatureIdExpression().accept(extractor, null);
                    for (String pn : extractor.getAttributeNameSet()) {
                        ((JoiningQuery) query).addId(pn);
View Full Code Here

    private Query namedQuery(Filter filter, int countLimit, boolean isJoining) {
      return namedQuery(filter, countLimit, isJoining, null);     
    }

    private Query namedQuery(Filter filter, int countLimit, boolean isJoining, Hints hints) {
       Query query = isJoining ? new JoiningQuery() : new Query();
        if (getName().getNamespaceURI() != null) {
            try {
                query.setNamespace(new URI(getName().getNamespaceURI()));
            } catch (URISyntaxException e) {
                throw new RuntimeException(e);
View Full Code Here

                                            + "and only use functions that are supported by your database."
                                            + "\nIf this cannot be helped, you can turn off joining in app-schema.properties file.",
                                    mapping.getFeatureIdExpression(), ns, separator, typeName));
                }
               
                JoiningQuery jQuery = new JoiningQuery(newQuery);
                jQuery.setDenormalised(((JoiningQuery) query).isDenormalised());
                jQuery.setQueryJoins(((JoiningQuery) query).getQueryJoins());
                jQuery.setSubset(((JoiningQuery) query).isSubset());

                for (String att : extractor.getAttributeNameSet()) {
                    sort.add(new SortByImpl(filterFac.property(att), SortOrder.ASCENDING));
                    jQuery.addId(att);
                }

               
                unrolledQuery = jQuery;
            } else {
View Full Code Here

TOP

Related Classes of org.geotools.data.joining.JoiningQuery

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.