📄 sqlbuilder.html
字号:
<!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="buildSQLQuery(java.lang.String, org.geotools.data.jdbc.fidmapper.FIDMapper, org.geotools.feature.AttributeType[], org.geotools.filter.Filter)"><!-- --></A><H3>buildSQLQuery</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>buildSQLQuery</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> typeName, <A HREF="../../../../org/geotools/data/jdbc/fidmapper/FIDMapper.html" title="interface in org.geotools.data.jdbc.fidmapper">FIDMapper</A> mapper, <A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A>[] attrTypes, <A HREF="../../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter) throws <A HREF="../../../../org/geotools/filter/SQLEncoderException.html" title="class in org.geotools.filter">SQLEncoderException</A></PRE><DL><DD>Makes an SQL Select statement. Constructs an SQL statement that will select the features from the table based on the filter. The default implementation creates a select statement for the table with the name <tt>typeName</tt>, selecting all the columns with the names in the <tt>attrTypes</tt> array using the filter as a WHERE clause. The default implementation ignores the maxFeature parameter since this requires DB dependant SQL. Subclasses can override this to provide the maxFeatures functionality specific to their DB.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>typeName</CODE> - a String with the typeName used as the table to query<DD><CODE>mapper</CODE> - an FIDMapper<DD><CODE>attrTypes</CODE> - the array of AttributeType elements for the select statement<DD><CODE>filter</CODE> - the filter to convert to a where statement<DT><B>Returns:</B><DD>a String representing an SQL statement<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/geotools/filter/SQLEncoderException.html" title="class in org.geotools.filter">SQLEncoderException</A></CODE> - If an error occurs encoding the SQL</DL></DD></DL><HR><A NAME="getPostQueryFilter(org.geotools.filter.Filter)"><!-- --></A><H3>getPostQueryFilter</H3><PRE>public <A HREF="../../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> <B>getPostQueryFilter</B>(<A HREF="../../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter)</PRE><DL><DD>Returns the Filter required for post processing. <p> The result will be null if no post processing is required. </p> <p> This method is used by DefaultJDBCFeatureSource to see if the a Query can be optimized </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>filter</CODE> - <DT><B>Returns:</B><DD>Filter required for post processing, or <code>null</code></DL></DD></DL><HR><A NAME="getPreQueryFilter(org.geotools.filter.Filter)"><!-- --></A><H3>getPreQueryFilter</H3><PRE>public <A HREF="../../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> <B>getPreQueryFilter</B>(<A HREF="../../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="sqlColumns(java.lang.StringBuffer, org.geotools.data.jdbc.fidmapper.FIDMapper, org.geotools.feature.AttributeType[])"><!-- --></A><H3>sqlColumns</H3><PRE>public void <B>sqlColumns</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/StringBuffer.html" title="class or interface in java.lang">StringBuffer</A> sql, <A HREF="../../../../org/geotools/data/jdbc/fidmapper/FIDMapper.html" title="interface in org.geotools.data.jdbc.fidmapper">FIDMapper</A> mapper, <A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A>[] attributes)</PRE><DL><DD>Produces the select information required. <p> The featureType, if known, is always requested. </p> <p> sql: <code>featureID (,attributeColumn)*</code> </p> <p> We may need to provide AttributeReaders with a hook so they can request a wrapper function. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>sql</CODE> - <DD><CODE>mapper</CODE> - <DD><CODE>attributes</CODE> - </DL></DD></DL><HR><A NAME="sqlFrom(java.lang.StringBuffer, java.lang.String)"><!-- --></A><H3>sqlFrom</H3><PRE>public void <B>sqlFrom</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/StringBuffer.html" title="class or interface in java.lang">StringBuffer</A> sql, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> typeName)</PRE><DL><DD>Consutrcts FROM clause for featureType <p> sql: <code>FROM typeName</code> </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>sql</CODE> - <DD><CODE>typeName</CODE> - </DL></DD></DL><HR><A NAME="sqlWhere(java.lang.StringBuffer, org.geotools.filter.Filter)"><!-- --></A><H3>sqlWhere</H3><PRE>public void <B>sqlWhere</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/StringBuffer.html" title="class or interface in java.lang">StringBuffer</A> sql, <A HREF="../../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> preFilter) throws <A HREF="../../../../org/geotools/filter/SQLEncoderException.html" title="class in org.geotools.filter">SQLEncoderException</A></PRE><DL><DD>Constructs WHERE clause, if needed, for FILTER. <p> sql: <code>WHERE filter encoding</code> </p><P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/geotools/filter/SQLEncoderException.html" title="class in org.geotools.filter">SQLEncoderException</A></CODE></DL></DD></DL><HR><A NAME="sqlOrderBy(java.lang.StringBuffer, org.opengis.filter.sort.SortBy[])"><!-- --></A><H3>sqlOrderBy</H3><PRE>public void <B>sqlOrderBy</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/StringBuffer.html" title="class or interface in java.lang">StringBuffer</A> sql, SortBy[] sortBy) throws <A HREF="../../../../org/geotools/filter/SQLEncoderException.html" title="class in org.geotools.filter">SQLEncoderException</A></PRE><DL><DD>Constructs ORDER BY clause. <p> sql: <code>ORDER BY <property1> [ASC|DESC], ....</code> </p><P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/geotools/filter/SQLEncoderException.html" title="class in org.geotools.filter">SQLEncoderException</A></CODE></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SQLBuilder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/geotools/data/jdbc/QueryDataObserver.html" title="interface in org.geotools.data.jdbc"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="SQLBuilder.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 1996-2007 <a href="http://www.geotools.org">Geotools</a>. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -