public static class QueryableDatatypeSyncer.DBSafeInternalQDTAdaptor extends Object
DBOperators can reference the same QDT that own the operator instance, such
as:
QueryableDatatype.setLiteralValue{this.operator = new DBEqualsOperator(this)}.
Cycles are handled by tracking source QDTs observed and returning the
previously mapped target QDT when re-observed.
Must be used only once for a given read or write of a field.
| Constructor and Description |
|---|
QueryableDatatypeSyncer.DBSafeInternalQDTAdaptor(Class<? extends QueryableDatatype<?>> targetQdtType,
SafeOneWaySimpleTypeAdaptor typeAdaptor)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
DBExpression |
convert(DBExpression source)
Creates a brand new QDT of the configured target type, based on converted
values from the given QDT.
|
protected void |
setTargetQDTFromSourceQDT(QueryableDatatype<?> targetQdt,
QueryableDatatype<?> sourceQdt)
Updates the target QDT with converted values from the source QDT.
|
public QueryableDatatypeSyncer.DBSafeInternalQDTAdaptor(Class<? extends QueryableDatatype<?>> targetQdtType, SafeOneWaySimpleTypeAdaptor typeAdaptor)
targetQdtType - targetQdtTypetypeAdaptor - typeAdaptorpublic DBExpression convert(DBExpression source)
If source is null, returns null.
source - the QDT to convert to the target type, may be null
Support DBvolution at Patreon
source was nullprotected void setTargetQDTFromSourceQDT(QueryableDatatype<?> targetQdt, QueryableDatatype<?> sourceQdt)
targetQdt - the QDT to update (must not be null)sourceQdt - the QDT with values to convert and copy to the target
(must not be null)Copyright © 2018. All Rights Reserved.