Package 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 (to, 11 sep 2008) $
-
Method Summary
Modifier and TypeMethodDescriptionGet a short description of the function or operatorgetName()
Get the name of the function or the symbol of the operatorboolean
If this converter is a built-in function.boolean
If this converter is a built-in operator.toExpression
(T node) Convert the object to an expression.toRestriction
(T node) Convert the object to a restriction.
-
Method Details
-
isFunction
boolean isFunction()If this converter is a built-in function. Built-in functions are automatically put in the enumeration return byJep.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
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
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
-