Esri Geoportal Server
1.0

com.esri.gpt.framework.sql
Class HttpExpressionBinder

java.lang.Object
  extended by com.esri.gpt.framework.sql.ExpressionBinder
      extended by com.esri.gpt.framework.sql.HttpExpressionBinder

public class HttpExpressionBinder
extends ExpressionBinder

Aids in the process of binding HTTP request parameters to SQL expressions.


Field Summary
static String PARAMETERTYPE_DOUBLE
          Parameter type: "Double"
static String PARAMETERTYPE_INTEGER
          Parameter type: "Integer"
static String PARAMETERTYPE_STRING
          Parameter type: "String"
 
Constructor Summary
HttpExpressionBinder(HttpServletRequest request)
          Constructor
 
Method Summary
 void parse(String parameter, String field, boolean forceUpper, boolean forceLike)
          Parses the HTTP resquest, binding a parameter value to an SQL field.
 void parse(String parameter, String field, String delimiter, boolean forceUpper, boolean forceLike)
          Parses the HTTP resquest, binding parameter values to an SQL field.
 void parse(String parameter, String field, String operator, String parameterType)
          Parses the HTTP resquest, binding a parameter value to an SQL field.
 void parse(String parameter, String field, String operator, String delimiter, String parameterType)
          Parses the HTTP resquest, binding parameter values to an SQL field.
 
Methods inherited from class com.esri.gpt.framework.sql.ExpressionBinder
addBinding, addBinding, addBindings, addBindings, addClause, applyBindings, getBindings, getExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETERTYPE_DOUBLE

public static final String PARAMETERTYPE_DOUBLE
Parameter type: "Double"

See Also:
Constant Field Values

PARAMETERTYPE_INTEGER

public static final String PARAMETERTYPE_INTEGER
Parameter type: "Integer"

See Also:
Constant Field Values

PARAMETERTYPE_STRING

public static final String PARAMETERTYPE_STRING
Parameter type: "String"

See Also:
Constant Field Values
Constructor Detail

HttpExpressionBinder

public HttpExpressionBinder(HttpServletRequest request)
Constructor

Parameters:
request - the HTTP servlet rquest
Method Detail

parse

public void parse(String parameter,
                  String field,
                  String operator,
                  String parameterType)
Parses the HTTP resquest, binding a parameter value to an SQL field.

Parameters:
parameter - the HTTP request parameter name
field - the SQL field name
operator - the SQL operator examples: =, !=, >, >=, <, <=, LIKE, ...
parameterType - the parameter type (HttpExpressionBinder.PARAMETERTYPE_*)

parse

public void parse(String parameter,
                  String field,
                  String operator,
                  String delimiter,
                  String parameterType)
Parses the HTTP resquest, binding parameter values to an SQL field.
This method considers multiple valuers per parameter name.
The values collection is connected by logical "OR" operators.

Parameters:
parameter - the HTTP request parameter name
field - the SQL field name
operator - the SQL operator examples: =, !=, >, >=, <, <=, LIKE, ...
delimiter - a delimiter to tokenize values (can be null)
parameterType - the parameter type (HttpExpressionBinder.PARAMETERTYPE_*)

parse

public void parse(String parameter,
                  String field,
                  boolean forceUpper,
                  boolean forceLike)
Parses the HTTP resquest, binding a parameter value to an SQL field.
This method is useful for VARCHAR type SQL fields.

Parameters:
parameter - the HTTP request parameter name
field - the SQL field name
forceUpper - force an upper case comparison
forceLike - for an SQL LIKE operator

parse

public void parse(String parameter,
                  String field,
                  String delimiter,
                  boolean forceUpper,
                  boolean forceLike)
Parses the HTTP resquest, binding parameter values to an SQL field.
This method considers multiple valuers per parameter name.
The values collection is connected by logical "OR" operators.
This method is useful for VARCHAR type SQL fields.

Parameters:
parameter - the HTTP request parameter name
field - the SQL field name
delimiter - a delimiter to tokenize values (can be null)
forceUpper - force an upper case comparison
forceLike - for an SQL LIKE operator

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.