Package org.geotools.data.jdbc

Examples of org.geotools.data.jdbc.FilterToSQL.encodeToString()


                        joinClause.append(" ");
                        getDataStore().dialect.encodeTableName(alias, joinClause);
                        joinClause.append(" ON ( ");

                        toSQL2.setFieldEncoder(new JoiningFieldEncoder(alias));
                        joinClause.append(toSQL2.encodeToString(join.getForeignKeyName()));

                    } else {
                        aliases[i] = null;
                        getDataStore().encodeTableName(join.getJoiningTypeName(), joinClause,
                                query.getHints());
View Full Code Here


                        aliases[i] = null;
                        getDataStore().encodeTableName(join.getJoiningTypeName(), joinClause,
                                query.getHints());
                        joinClause.append(" ON ( ");
                        toSQL2.setFieldEncoder(new JoiningFieldEncoder(join.getJoiningTypeName()));
                        joinClause.append(toSQL2.encodeToString(join.getForeignKeyName()));
                    }

                    joinClause.append(" = ");
                    String fromTypeName = curTypeName;
                    toSQL1.setFieldEncoder(new JoiningFieldEncoder(fromTypeName));
View Full Code Here

                             // skip if inner join is already done in paging
                             getDataStore().dialect.encodeColumnName(null, lastSortBy[i].getPropertyName().getPropertyName(), sortBySQL);
                             if (i < lastSortBy.length-1) sortBySQL.append(",");
                             sortBySQL.append(" FROM ");
                             getDataStore().encodeTableName(lastTableName, sortBySQL, query.getHints());                                       
                             sortBySQL.append(" ").append(toSQL.encodeToString(filter));
                             sortBySQL.append(" ) ");
                             getDataStore().dialect.encodeTableName(TEMP_FILTER_ALIAS, sortBySQL);
                             sortBySQL.append(" ON ( ");
                             encodeColumnName2(lastSortBy[i].getPropertyName().getPropertyName(), lastTableAlias , sortBySQL, null);           
                             sortBySQL.append(" = ");
View Full Code Here

                                getDataStore().dialect.encodeColumnName(null, pk, sortBySQL);
                                if (i < lastPkColumnNames.size() - 1)
                                    sortBySQL.append(",");
                                sortBySQL.append(" FROM ");
                                getDataStore().encodeTableName(lastTableName, sortBySQL, query.getHints());                                       
                                sortBySQL.append(" ").append(toSQL.encodeToString(filter));
                                sortBySQL.append(" ) ");
                                getDataStore().dialect.encodeTableName(TEMP_FILTER_ALIAS, sortBySQL);
                                sortBySQL.append(" ON ( ");
                                encodeColumnName2(pk, lastTableAlias, sortBySQL, null);
                                sortBySQL.append(" = ");
View Full Code Here

                    if (hasSortBy) {
                        sql.append(sortBySQL).append(" ) ");
                    }
                } else if (!pagingApplied) {
                    toSQL.setFieldEncoder(new JoiningFieldEncoder(curTypeName));
                    sql.append(" ").append(toSQL.encodeToString(filter));
                }
            } catch (FilterToSQLException e) {
                throw new RuntimeException(e);
            }
        } else {
View Full Code Here

            // that uses attributes that aren't returned in the results
            SimpleFeatureType fullSchema = getSchema(featureType.getTypeName());
            FilterToSQL toSQL = dialect instanceof PreparedStatementSQLDialect ?
                createPreparedFilterToSQL(fullSchema) : createFilterToSQL(fullSchema);
            toSQL.setInline(true);
            sql.append(" ").append(toSQL.encodeToString(filter));
            return toSQL;
        } catch (FilterToSQLException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

        Filter filter = query.getFilter();
        if (filter != null  && !Filter.INCLUDE.equals(filter)) {
            //encode filter
            try {
                FilterToSQL toSQL = createFilterToSQL(featureType);
                sql.append(" ").append(toSQL.encodeToString(filter));
            } catch (FilterToSQLException e) {
                throw new RuntimeException(e);
            }
        }
       
View Full Code Here

        if (filter != null && !Filter.INCLUDE.equals(filter)) {
            //encode filter
            try {
                FilterToSQL toSQL = createFilterToSQL(featureType);
                sql.append(" ").append(toSQL.encodeToString(filter));
            } catch (FilterToSQLException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

        if (filter != null  && !Filter.INCLUDE.equals(filter)) {
            //encode filter
            try {
                FilterToSQL toSQL = createFilterToSQL(featureType);
                sql.append(" ").append(toSQL.encodeToString(filter));
            } catch (FilterToSQLException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

            FilterToSQL toSQL = dialect instanceof PreparedStatementSQLDialect ?
                createPreparedFilterToSQL(null) : createFilterToSQL(null);
            toSQL.setInline(true);
            try {
                sql.append(" ").append(toSQL.encodeToString(j));
            }
            catch (FilterToSQLException e) {
                throw new RuntimeException(e);
            }
        }
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.