org.talend.esb.sam.server.ui
Class CriteriaAdapter

java.lang.Object
  extended by org.talend.esb.sam.server.ui.CriteriaAdapter
All Implemented Interfaces:
org.springframework.jdbc.core.namedparam.SqlParameterSource, QueryFilter

public class CriteriaAdapter
extends Object
implements org.springframework.jdbc.core.namedparam.SqlParameterSource, QueryFilter

Adapter that implements SqlParameterSource to be used to map HTTP URL parameters to the SQL parameters.

Author:
zubairov

Field Summary
 
Fields inherited from interface org.springframework.jdbc.core.namedparam.SqlParameterSource
TYPE_UNKNOWN
 
Constructor Summary
CriteriaAdapter(long offset, long limit, Map<String,String[]> params)
          Instantiates a new criteria adapter.
 
Method Summary
 int getSqlType(String paramName)
           
 String getTypeName(String paramName)
           
 Object getValue(String paramName)
           
 String getWhereClause()
          This method should return where clause according to filtering conditions.
 boolean hasValue(String paramName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CriteriaAdapter

public CriteriaAdapter(long offset,
                       long limit,
                       Map<String,String[]> params)
Instantiates a new criteria adapter.

Parameters:
offset - the offset
limit - the limit
params - the CriteriaAdapter params
Method Detail

hasValue

public boolean hasValue(String paramName)
Specified by:
hasValue in interface org.springframework.jdbc.core.namedparam.SqlParameterSource

getValue

public Object getValue(String paramName)
                throws IllegalArgumentException
Specified by:
getValue in interface org.springframework.jdbc.core.namedparam.SqlParameterSource
Throws:
IllegalArgumentException

getSqlType

public int getSqlType(String paramName)
Specified by:
getSqlType in interface org.springframework.jdbc.core.namedparam.SqlParameterSource

getTypeName

public String getTypeName(String paramName)
Specified by:
getTypeName in interface org.springframework.jdbc.core.namedparam.SqlParameterSource

getWhereClause

public String getWhereClause()
Description copied from interface: QueryFilter
This method should return where clause according to filtering conditions.

Specified by:
getWhereClause in interface QueryFilter
Returns:
the where clause


Copyright © 2011-2012 Talend Inc.. All Rights Reserved.