SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002

com.solarmetric.kodo.impl.jdbc.query
Interface MethodListener

All Superinterfaces:
FilterListener

public interface MethodListener
extends FilterListener

Implementors of this interface are defining listeners which listen for ext:TAG on query filters to append to the generated where clause.

An example listener might be one for the SQL:    "upper (firstnamex) like 'argument'

Here would be a class to accomplish this which would listen for:
   firstname.ext:upperLike ("argument")


public class UpperLikeListener implements MethodListener
{
    public String getTag () {return "upperLike";}

    public String transform (String column, String argument)
    {
      return "UPPER (" + column + ") LIKE '" + argument + "'";
    }
}

Author:
Steve Kim

Method Summary
 String transform(String column, String argument)
          The primary method which transforms a given column and argument into SQL.
 
Methods inherited from interface com.solarmetric.kodo.query.FilterListener
getTag
 

Method Detail

transform

public String transform(String column,
                        String argument)
The primary method which transforms a given column and argument into SQL. Note this may be called multiple times per execution depending upon class hierarchy and table strucure
Parameters:
column - The SQL column name that correlates to the field being operated upon
argument - the argument passed into the filter
Returns:
SQL representing the listener's action

SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.