@ServiceProvider public class ValueFieldReplacerFactory extends Object implements FieldReplacer.Factory
FieldReplacer
that provides an ability
to set value of one record's field to a fixed value.
field replacer
should be in the following format:
"value:<recordFilter>:<target>:<value>"
, where recordFilter
is a RecordOnlyFilter
,
target
is a name of the target field and value
is the value to set.
All records which are accepted by recordFilter
and contain the target
field are processed by this replacer.
example.qds
and set all quotes' bid prices to 123.45.
DXEndpoint endpoint = ... endpoint.connect("example.qds[fieldReplacer=value:Quote*:bidPrice:123.45]");
FieldReplacer
Constructor and Description |
---|
ValueFieldReplacerFactory() |
Modifier and Type | Method and Description |
---|---|
FieldReplacer |
createFieldReplacer(String fieldReplacerSpec,
DataScheme dataScheme)
Creates
field replacer for specified data scheme
from specification. |
public FieldReplacer createFieldReplacer(String fieldReplacerSpec, DataScheme dataScheme)
FieldReplacer.Factory
field replacer
for specified data scheme
from specification.
NOTE: the only one factory can support specification.
createFieldReplacer
in interface FieldReplacer.Factory
fieldReplacerSpec
- specification of FieldReplacer
. The specification should start with
"<factory_name>:"
to detect should factory support the specification or not.dataScheme
- current data scheme
field replacer
if this factory supports specification,
null
otherwise.Copyright © 2002–2025 Devexperts LLC. All rights reserved.