|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.townleyenterprises.persistence.SQLFilterAdapter
This class is responsible for generating SQL given a filter and optional sort specification.
Constructor Summary | |
SQLFilterAdapter(Filter filter)
This version of the constructor takes the specified Filter instance and generates the SQL necessary to execute the query. |
|
SQLFilterAdapter(Filter filter,
java.util.HashMap tablemap)
This version of the constructor includes the filter along with a map of the classes to the appropriate table names. |
|
SQLFilterAdapter(Filter filter,
java.util.HashMap tablemap,
java.util.HashMap colmap)
This version of the constructor includes the filter and a map of the classes to the appropriate table names, but also includes a property to column name mapping for specific classes. |
Method Summary | |
java.lang.Object[] |
getQueryParameters()
This method provides access to the query parameters. |
java.lang.String |
toSQL(java.lang.Class klass,
SortSpecification[] sort)
|
java.lang.String |
toSQL(java.util.HashMap sortmap)
|
java.lang.String |
toSQL(SortSpecification[] sort)
This method allows for specifying sort specifications to the generated SQL. |
java.lang.String |
toSQL(java.lang.String what)
This method provides access to the SQL for this query |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SQLFilterAdapter(Filter filter)
filter
- the filter to be executedpublic SQLFilterAdapter(Filter filter, java.util.HashMap tablemap)
filter
- the filter to be executedtablemap
- the map of the table namespublic SQLFilterAdapter(Filter filter, java.util.HashMap tablemap, java.util.HashMap colmap)
filter
- the filter to be executedtablemap
- the map of the table namescolmap
- the map of the column names for each classMethod Detail |
public java.lang.String toSQL(java.lang.String what)
what
- the values to select
public java.lang.String toSQL(SortSpecification[] sort)
Note: using this version assumes that all of the properties in the sort specification are not mapped and that they are unique for all classes in the filter.
public java.lang.String toSQL(java.lang.Class klass, SortSpecification[] sort)
public java.lang.String toSQL(java.util.HashMap sortmap)
public java.lang.Object[] getQueryParameters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |