|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.filter.SQLUnpacker
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.
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.
Constructor Summary | |
SQLUnpacker(FilterCapabilities capabilities)
Constructor with FilterCapabilities from the Encoder used in conjunction with this Unpacker. |
Method Summary | |
Filter |
getSupported()
After an unPack has been called, returns the resulting Filter of the supported parts of the unPacked filter. |
Filter |
getUnSupported()
After an unPack has been called, returns the resulting Filter of the unsupported parts of the unPacked filter. |
void |
unPackAND(Filter filter)
Performs the unpacking of a filter, for the cases when ANDs can be split and ORs can not. |
void |
unPackOR(Filter filter)
Performs the unpacking of a filter, for the cases when ORs can be split and ANDs can not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SQLUnpacker(FilterCapabilities capabilities)
capabilities
- what FilterTypes should be supported.Method Detail |
public void unPackAND(Filter filter)
filter
- to be unpacked, split on ANDspublic void unPackOR(Filter filter)
filter
- to be unpacked, split on ANDspublic Filter getUnSupported()
public Filter getSupported()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |