SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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

All Superinterfaces:
FilterListener

public interface LiteralListener
extends FilterListener

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

Literals are singular SQL expressions that evaluate by itself to true or false. For example a complete literal could be: (idx in (1,2,3)).

An example listener might be one for the SQL:
   "t0.idx in (1,2,3)"


Here would be a sample class to accomplish this which would listen for:
   lit:idIn ("1,2,3")

public class IdInListener implements LiteralListener
{
    public String getTag () {return "idIn";}

    public String embed (String argument)
    {
      return "t0.idx in (" + argument + ")";
    }
}


Method Summary
 String embed(String argument)
          The primary method which takes a single argument and transforms it into a single SQL block
 
Methods inherited from interface com.solarmetric.kodo.query.FilterListener
getTag
 

Method Detail

embed

public String embed(String argument)
The primary method which takes a single argument and transforms it into a single SQL block
Parameters:
argument - the argument passed into the filter
Returns:
SQL representing the listener's action

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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