2.17.2: 2011-06-17

net.sf.basedb.util.jep.convert
Interface JepConversionFunction<T>

All Known Implementing Classes:
AbsConverter, AbstractJepConversionFunction, AddConverter, AndConverter, ASTConstantConverter, ASTFunNodeConverter, ASTVarNodeConverter, DivideConverter, EqualsConverter, ExpConverter, FloatConverter, GreaterConverter, GreaterEqualsConverter, IfConverter, IntegerConverter, LessConverter, LessEqualsConverter, LogarithmConverter, MultiplyConverter, NaturalLogarithmConverter, NotConverter, NotEqualsConverter, OrConverter, SquareRootConverter, StringConverter, SubtractConverter, UMinusConverter

public interface JepConversionFunction<T>

Convert a built-in JEP function or operation to a Query API Expression or Restriction. Custom function should implement JepExpressionFunction which supports automatic conversion.

Version:
2.4
Author:
nicklas
Last modified
$Date: 2008-09-11 22:08:14 +0200 (Thu, 11 Sep 2008) $

Method Summary
 String getDescription()
          Get a short description of the function or operator
 String getName()
          Get the name of the function or the symbol of the operator
 boolean isFunction()
          If this converter is a built-in function.
 boolean isOperator()
          If this converter is a built-in operator.
 Expression toExpression(T node)
          Convert the object to an expression.
 Restriction toRestriction(T node)
          Convert the object to a restriction.
 

Method Detail

isFunction

boolean isFunction()
If this converter is a built-in function. Built-in functions are automatically put in the enumeration return by Jep.getFunctions().

Returns:
TRUE if it is a function, FALSE otherwise

isOperator

boolean isOperator()
If this converter is a built-in operator.

Returns:
TRUE if it is an operator, FALSE otherwise

getName

String getName()
Get the name of the function or the symbol of the operator

Returns:
The name or symbol or null

getDescription

String getDescription()
Get a short description of the function or operator

Returns:
The description or null

toExpression

Expression toExpression(T node)
Convert the object to an expression.

Parameters:
node - The object to convert
Returns:
An expression or null
Throws:
UnsupportedOperationException - If this converter can't convert to expressions

toRestriction

Restriction toRestriction(T node)
Convert the object to a restriction.

Parameters:
node - The object to convert
Returns:
A restriction or null
Throws:
UnsupportedOperationException - If this converter can't convert to restrictions

2.17.2: 2011-06-17