public class DBEvalContext extends Object implements Expressionator.ParseContext, EvalConfig
Constructor and Description |
---|
DBEvalContext(DatabaseImpl db) |
Modifier and Type | Method and Description |
---|---|
DateTimeFormatter |
createDateFormatter(String formatStr) |
DecimalFormat |
createDecimalFormat(String formatStr) |
Bindings |
getBindings() |
FunctionLookup |
getFunctionLookup() |
NumericConfig |
getNumericConfig() |
float |
getRandom(Integer seed) |
TemporalConfig |
getTemporalConfig() |
ZoneId |
getZoneId() |
void |
setBindings(Bindings bindings)
Allows for passing custom information into expression evaluation.
|
void |
setFunctionLookup(FunctionLookup lookup)
Sets the
Function provider to use during expression evaluation. |
void |
setNumericConfig(NumericConfig numeric)
Sets the NumericConfig for use when evaluating expressions.
|
void |
setTemporalConfig(TemporalConfig temporal)
Sets the TemporalConfig for use when evaluating expressions.
|
public DBEvalContext(DatabaseImpl db)
public TemporalConfig getTemporalConfig()
getTemporalConfig
in interface EvalConfig
getTemporalConfig
in interface LocaleContext
EvalConfig
)public void setTemporalConfig(TemporalConfig temporal)
EvalConfig
Database
instances from other locales.setTemporalConfig
in interface EvalConfig
public ZoneId getZoneId()
getZoneId
in interface LocaleContext
public NumericConfig getNumericConfig()
getNumericConfig
in interface EvalConfig
getNumericConfig
in interface LocaleContext
EvalConfig
)public void setNumericConfig(NumericConfig numeric)
EvalConfig
Database
instances from other locales.setNumericConfig
in interface EvalConfig
public FunctionLookup getFunctionLookup()
getFunctionLookup
in interface EvalConfig
getFunctionLookup
in interface Expressionator.ParseContext
public void setFunctionLookup(FunctionLookup lookup)
EvalConfig
Function
provider to use during expression evaluation.
The Functions supported by the default FunctionLookup are documented in
com.healthmarketscience.jackcess.expr
. Custom Functions can be
implemented and provided to the expression evaluation engine by installing
a custom FunctionLookup instance (which would presumably wrap and
delegate to the default FunctionLookup instance for any default
implementations).setFunctionLookup
in interface EvalConfig
public Bindings getBindings()
getBindings
in interface EvalConfig
public void setBindings(Bindings bindings)
EvalConfig
setBindings
in interface EvalConfig
public DateTimeFormatter createDateFormatter(String formatStr)
createDateFormatter
in interface LocaleContext
public DecimalFormat createDecimalFormat(String formatStr)
createDecimalFormat
in interface LocaleContext
public float getRandom(Integer seed)
Copyright © 2005–2024 OpenHMS. All rights reserved.