* @deprecated shouldn't be relying on this, a configuration database upgrade script to apply the transformation would be better
*/
@Deprecated
private static ValueRequirement plat3044Translate(final ValueRequirement valueRequirement) {
if (valueRequirement.getTargetReference() instanceof ComputationTargetSpecification) {
final ComputationTargetSpecification spec = valueRequirement.getTargetReference().getSpecification();
if (spec.getType().equals(ComputationTargetType.PRIMITIVE)) {
final UniqueId uid = spec.getUniqueId();
if (ExternalSchemes.BLOOMBERG_TICKER.getName().equals(uid.getScheme())) {
return new ValueRequirement(valueRequirement.getValueName(), new ComputationTargetRequirement(spec.getType(), ExternalId.of(ExternalSchemes.BLOOMBERG_TICKER, uid.getValue())),
valueRequirement.getConstraints());
}
}
}
return valueRequirement;