@ServiceProvider public class SetFieldReplacerFactory extends Object implements FieldReplacer.Factory
FieldReplacer that provides an ability
to set value of one record's field to value of another field of same type.
field replacer should be in the following format:
"set:<recordFilter>:<target>:<source>", where recordFilter is a RecordOnlyFilter,
target is a name of target field and source name of a source field.
All records which are accepted by recordFilter and contain both target and
source fields of the same type are processed by this replacer.
It is an error to have record which is accepted by recordFilter and has only one of
specified fields or has both fields but of a different type.
example.qds and set all quotes' bid prices to ask price (make them equal).
DXEndpoint endpoint = ...
endpoint.connect("example.qds[fieldReplacer=set:Quote*:bidPrice:askPrice]");
FieldReplacer| Constructor and Description |
|---|
SetFieldReplacerFactory() |
| 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.Factoryfield replacer for specified data scheme
from specification.
NOTE: the only one factory can support specification.
createFieldReplacer in interface FieldReplacer.FactoryfieldReplacerSpec - specification of FieldReplacer. The specification should start with
"<factory_name>:" to detect should factory support the specification or not.dataScheme - current data schemefield replacer if this factory supports specification,
null otherwise.Copyright © 2002–2025 Devexperts LLC. All rights reserved.