APIdia Launch Partner
Top Inners Fields Constructors Methods
io.github.spannm.jackcess.impl

public abstract Class BaseEvalContext

extends Object
implements EvalContext
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.expr.EvalContext, io.github.spannm.jackcess.expr.LocaleContext
Known Direct Subclasses
io.github.spannm.jackcess.impl.ColEvalContext, io.github.spannm.jackcess.impl.RowEvalContext
Imports
io.github.spannm.jackcess.DataType, .JackcessException, .JackcessRuntimeException, io.github.spannm.jackcess.expr.EvalContext, .EvalException, .Expression, .Identifier, .LocaleContext, .NumericConfig, .TemporalConfig, .Value, io.github.spannm.jackcess.impl.expr.Expressionator, .ValueSupport, java.io.IOException, java.math.BigDecimal, java.text.DecimalFormat, java.time.LocalDateTime, .ZoneId, java.time.format.DateTimeFormatter, java.util.Collection, .EnumMap, .Locale, .Map, javax.script.Bindings

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final DBEvalContext
private Expression
private static final Map<DataType, Value.Type>
TYPE_MAP

map of all non-string data types

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
public DateTimeFormatter
createDateFormatter(String formatStr)

Implements io.github.spannm.jackcess.expr.LocaleContext.createDateFormatter.

Returns an appropriately configured (i.e. locale) DateTimeFormatter for the given format.

public DecimalFormat
createDecimalFormat(String formatStr)

Implements io.github.spannm.jackcess.expr.LocaleContext.createDecimalFormat.

Returns an appropriately configured (i.e. DecimalFormatSymbols) DecimalFormat for the given format.

public Object
eval()

public Object
get(String key)

Implements io.github.spannm.jackcess.expr.EvalContext.get.

Returns the value of the current key from the currently configured Bindings.

public Bindings
getBindings()

Implements io.github.spannm.jackcess.expr.EvalContext.getBindings.

Returns the currently configured Bindings (from the EvalConfig).

protected DatabaseImpl
public Value
getIdentifierValue(Identifier identifier)

Implements io.github.spannm.jackcess.expr.EvalContext.getIdentifierValue.

Returns the value of the entity identified by the given identifier (for "calculated" and "row validator" expressions).

public Locale
getLocale()

Overrides default io.github.spannm.jackcess.expr.LocaleContext.getLocale.

Returns the currently configured Locale.

public NumericConfig
getNumericConfig()

Implements io.github.spannm.jackcess.expr.LocaleContext.getNumericConfig.

Returns the currently configured NumericConfig (from the EvalConfig).

public float
getRandom(Integer seed)

Implements io.github.spannm.jackcess.expr.EvalContext.getRandom.

Returns a random value for the given seed following the statefulness rules for the "Rnd" function.

public Value.Type
getResultType()

Implements io.github.spannm.jackcess.expr.EvalContext.getResultType.

Returns the expected type of the result value for the current expression evaluation (for "default value" and "calculated" expressions).

public TemporalConfig
getTemporalConfig()

Implements io.github.spannm.jackcess.expr.LocaleContext.getTemporalConfig.

Returns the currently configured TemporalConfig (from the EvalConfig).

public Value
getThisColumnValue()

Implements io.github.spannm.jackcess.expr.EvalContext.getThisColumnValue.

Returns the value of the "current" column (for "field validator" expressions).

public ZoneId
getZoneId()

Implements io.github.spannm.jackcess.expr.LocaleContext.getZoneId.

Returns the currently configured ZoneId.

public void
put(String key, Object value)

Implements io.github.spannm.jackcess.expr.EvalContext.put.

Sets the value of the given key to the given value in the currently configured Bindings.

pack-priv void
setExpr(Expressionator.Type exprType, String exprStr)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected Value
toValue(Object val, DataType dType)

public static Value.Type
protected abstract String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

dbCtxback to summary
private final DBEvalContext dbCtx
exprback to summary
private Expression expr
TYPE_MAPback to summary
private static final Map<DataType, Value.Type> TYPE_MAP

map of all non-string data types

Constructor Detail

BaseEvalContextback to summary
protected BaseEvalContext(DBEvalContext dbCtx)

Method Detail

collectIdentifiersback to summary
public void collectIdentifiers(Collection<Identifier> identifiers)
createDateFormatterback to summary
public DateTimeFormatter createDateFormatter(String formatStr)

Implements io.github.spannm.jackcess.expr.LocaleContext.createDateFormatter.

Doc from io.github.spannm.jackcess.expr.LocaleContext.createDateFormatter.

Returns an appropriately configured (i.e. locale) DateTimeFormatter for the given format.

Annotations
@Override
createDecimalFormatback to summary
public DecimalFormat createDecimalFormat(String formatStr)

Implements io.github.spannm.jackcess.expr.LocaleContext.createDecimalFormat.

Doc from io.github.spannm.jackcess.expr.LocaleContext.createDecimalFormat.

Returns an appropriately configured (i.e. DecimalFormatSymbols) DecimalFormat for the given format.

Annotations
@Override
evalback to summary
public Object eval() throws IOException
getback to summary
public Object get(String key)

Implements io.github.spannm.jackcess.expr.EvalContext.get.

Doc from io.github.spannm.jackcess.expr.EvalContext.get.

Returns the value of the current key from the currently configured Bindings.

Annotations
@Override
getBindingsback to summary
public Bindings getBindings()

Implements io.github.spannm.jackcess.expr.EvalContext.getBindings.

Doc from io.github.spannm.jackcess.expr.EvalContext.getBindings.

Returns the currently configured Bindings (from the EvalConfig).

Annotations
@Override
getDatabaseback to summary
protected DatabaseImpl getDatabase()
getIdentifierValueback to summary
public Value getIdentifierValue(Identifier identifier)

Implements io.github.spannm.jackcess.expr.EvalContext.getIdentifierValue.

Doc from io.github.spannm.jackcess.expr.EvalContext.getIdentifierValue.

Returns the value of the entity identified by the given identifier (for "calculated" and "row validator" expressions).

Annotations
@Override
getLocaleback to summary
public Locale getLocale()

Overrides default io.github.spannm.jackcess.expr.LocaleContext.getLocale.

Doc from io.github.spannm.jackcess.expr.LocaleContext.getLocale.

Returns the currently configured Locale.

Annotations
@Override
getNumericConfigback to summary
public NumericConfig getNumericConfig()

Implements io.github.spannm.jackcess.expr.LocaleContext.getNumericConfig.

Doc from io.github.spannm.jackcess.expr.LocaleContext.getNumericConfig.

Returns the currently configured NumericConfig (from the EvalConfig).

Annotations
@Override
getRandomback to summary
public float getRandom(Integer seed)

Implements io.github.spannm.jackcess.expr.EvalContext.getRandom.

Doc from io.github.spannm.jackcess.expr.EvalContext.getRandom.

Returns a random value for the given seed following the statefulness rules for the "Rnd" function.

Annotations
@Override
getResultTypeback to summary
public Value.Type getResultType()

Implements io.github.spannm.jackcess.expr.EvalContext.getResultType.

Doc from io.github.spannm.jackcess.expr.EvalContext.getResultType.

Returns the expected type of the result value for the current expression evaluation (for "default value" and "calculated" expressions).

Annotations
@Override
getTemporalConfigback to summary
public TemporalConfig getTemporalConfig()

Implements io.github.spannm.jackcess.expr.LocaleContext.getTemporalConfig.

Doc from io.github.spannm.jackcess.expr.LocaleContext.getTemporalConfig.

Returns the currently configured TemporalConfig (from the EvalConfig).

Annotations
@Override
getThisColumnValueback to summary
public Value getThisColumnValue()

Implements io.github.spannm.jackcess.expr.EvalContext.getThisColumnValue.

Doc from io.github.spannm.jackcess.expr.EvalContext.getThisColumnValue.

Returns the value of the "current" column (for "field validator" expressions).

Annotations
@Override
getZoneIdback to summary
public ZoneId getZoneId()

Implements io.github.spannm.jackcess.expr.LocaleContext.getZoneId.

Doc from io.github.spannm.jackcess.expr.LocaleContext.getZoneId.

Returns the currently configured ZoneId.

Annotations
@Override
putback to summary
public void put(String key, Object value)

Implements io.github.spannm.jackcess.expr.EvalContext.put.

Doc from io.github.spannm.jackcess.expr.EvalContext.put.

Sets the value of the given key to the given value in the currently configured Bindings.

Annotations
@Override
setExprback to summary
pack-priv void setExpr(Expressionator.Type exprType, String exprStr)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
toValueback to summary
protected Value toValue(Object val, DataType dType)
toValueTypeback to summary
public static Value.Type toValueType(DataType dType)
withErrorContextback to summary
protected abstract String withErrorContext(String msg)
io.github.spannm.jackcess.impl back to summary

private final Class BaseEvalContext.RawExpr

extends Object
implements Expression
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.expr.Expression

Field Summary

Modifier and TypeField and Description
private final String
private final Expressionator.Type

Constructor Summary

AccessConstructor and Description
private
RawExpr(Expressionator.Type exprType, String exprStr)

Method Summary

Modifier and TypeMethod and Description
public void
collectIdentifiers(Collection<Identifier> identifiers)

Implements io.github.spannm.jackcess.expr.Expression.collectIdentifiers.

Adds any Identifiers from this expression to the given collection.

public Object
eval(EvalContext ctx)

Implements io.github.spannm.jackcess.expr.Expression.eval.

Evaluates the expression and returns the result.

private Expression
public boolean
isConstant()

Implements io.github.spannm.jackcess.expr.Expression.isConstant.

Returns true if this is a constant expression.

public String
toCleanString(LocaleContext ctx)

Implements io.github.spannm.jackcess.expr.Expression.toCleanString.

Returns a parsed and re-formated version of the expression.

public String
toDebugString(LocaleContext ctx)

Implements io.github.spannm.jackcess.expr.Expression.toDebugString.

Returns a detailed string which indicates how the expression was interpreted by the expression evaluation engine.

public String
toRawString()

Implements io.github.spannm.jackcess.expr.Expression.toRawString.

Returns the original, unparsed expression string.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

exprStrback to summary
private final String exprStr
exprTypeback to summary
private final Expressionator.Type exprType

Constructor Detail

RawExprback to summary
private RawExpr(Expressionator.Type exprType, String exprStr)

Method Detail

collectIdentifiersback to summary
public void collectIdentifiers(Collection<Identifier> identifiers)

Implements io.github.spannm.jackcess.expr.Expression.collectIdentifiers.

Doc from io.github.spannm.jackcess.expr.Expression.collectIdentifiers.

Adds any Identifiers from this expression to the given collection.

Annotations
@Override
evalback to summary
public Object eval(EvalContext ctx)

Implements io.github.spannm.jackcess.expr.Expression.eval.

Doc from io.github.spannm.jackcess.expr.Expression.eval.

Evaluates the expression and returns the result.

Annotations
@Override
getExprback to summary
private Expression getExpr()
isConstantback to summary
public boolean isConstant()

Implements io.github.spannm.jackcess.expr.Expression.isConstant.

Doc from io.github.spannm.jackcess.expr.Expression.isConstant.

Returns true if this is a constant expression. A constant expression will always return the same result when invoked and has no side effect.

Annotations
@Override
toCleanStringback to summary
public String toCleanString(LocaleContext ctx)

Implements io.github.spannm.jackcess.expr.Expression.toCleanString.

Doc from io.github.spannm.jackcess.expr.Expression.toCleanString.

Returns a parsed and re-formated version of the expression. This may look slightly different than the original, raw string, although it should be an equivalent expression.

Annotations
@Override
toDebugStringback to summary
public String toDebugString(LocaleContext ctx)

Implements io.github.spannm.jackcess.expr.Expression.toDebugString.

Doc from io.github.spannm.jackcess.expr.Expression.toDebugString.

Returns a detailed string which indicates how the expression was interpreted by the expression evaluation engine.

Annotations
@Override
toRawStringback to summary
public String toRawString()

Implements io.github.spannm.jackcess.expr.Expression.toRawString.

Doc from io.github.spannm.jackcess.expr.Expression.toRawString.

Returns the original, unparsed expression string. This is the same as the value which will be returned by Object#toString.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override