📄 sqlunpacker.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_13) on Tue Jun 05 11:36:29 GMT-05:00 2007 --><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>SQLUnpacker (Geotools 2.3.x 2.3.2 API)</TITLE><META NAME="keywords" CONTENT="org.geotools.filter.SQLUnpacker class"><META NAME="keywords" CONTENT="unPackAND()"><META NAME="keywords" CONTENT="unPackOR()"><META NAME="keywords" CONTENT="getUnSupported()"><META NAME="keywords" CONTENT="getSupported()"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="SQLUnpacker (Geotools 2.3.x 2.3.2 API)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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/SQLUnpacker.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/filter/SQLEncoderPostgisGeos.html" title="class in org.geotools.filter"><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="SQLUnpacker.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 | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.geotools.filter</FONT><BR>Class SQLUnpacker</H2><PRE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>SQLUnpacker</B></PRE><HR><B>Deprecated.</B> <I>please use PostPreProcessFilterSplittingVisitor</I><P><DL><DT>public class <B>SQLUnpacker</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL><P>Determines which parts of a Filter can be turned into valid SQL statements. Given a filter it constructs two filters, one of the supported parts of the filter passed in, one of the unsupported. If one of the constructed filters is null (ie the whole filter is supported or unsupported), it is the clients responsibility to deal with that. The SQLUnpacker should be tightly coordinated with the SQLEncoder. The SQLEncoder passes its Capabilities (ie which filters it can encode and which it can't) to the Unpacker, and the Unpacker returns a supported filter, which should be passed to the Encoder as the Encoder Capabilities claimed to fully support everything in the supported filter. The unsupported filter should be used after the SQL statement is executed, testing each feature in the result set with the contains method. <p> This Unpacker can likely be easily used with any Encoder that has a FilterCapabilities of the actions it can perform. May want to rename it FilterUnpacker, as it is likely generic enough, but for now this name should be fine, to emphasize that the SQLEncoder needs to be closely linked to it to work properly. </p><P><P><DL><DT><B>Author:</B></DT> <DD>Chris Holmes, TOPP</DD><DT><B>Module:</B></DT><DD><CODE><B>module/main</B></CODE> (<A HREF="http://maven.geotools.fr/repository/org/geotools/gt2-main/"><CODE>gt2-main.jar</CODE></A>) (<A HREF="http://maven.geotools.fr/reports/main/index.html">Maven report</A>) (<A HREF="http://svn.geotools.org/geotools/tags/2.3.2/module/main/src/org/geotools/filter/SQLUnpacker.java">SVN head</A>)</DD><DT><B>'TODO:'</B></DT> <DD>REVISIT: The getSupported getUnsupported is clunky and dangerous, as clients could be using this and do an unpack, get the unsupported filter, and then do another unpack, and want to get the first supported filter, and would get the second instead. This is likely in a getFeatures when the unpacker is held by the class. So for now clients should construct an unpacker whenever they want to use it. This is obviously less than ideal. So this should be revisited. One way is fir the unpack methods to return FilterPairs, for the clients to deal with themselves. I'm not sure that this is the best semantic, and it exposes an inner class that really has no other use, so it could be nice to do it a better way. Another option is to have static methods SQLUnpacker.getSupported(Filter, splitType, capabilities), or something to that effect. Or non static, but pass the filter in each time. If anyone is looking at this class and has suggestions email the list, as we should think this through more, but I've other pressing tasks.</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../org/geotools/filter/SQLUnpacker.html#SQLUnpacker(org.geotools.filter.FilterCapabilities)">SQLUnpacker</A></B>(<A HREF="../../../org/geotools/filter/FilterCapabilities.html" title="class in org.geotools.filter">FilterCapabilities</A> capabilities)</CODE><BR> <B>Deprecated.</B> Constructor with FilterCapabilities from the Encoder used in conjunction with this Unpacker.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/filter/SQLUnpacker.html#getSupported()">getSupported</A></B>()</CODE><BR> <B>Deprecated.</B> After an unPack has been called, returns the resulting Filter of the supported parts of the unPacked filter. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/filter/SQLUnpacker.html#getUnSupported()">getUnSupported</A></B>()</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -