Details
-
Type: Improvement
-
Status: Closed
-
Priority: Default
-
Resolution: Fixed
-
Affects Version/s: 1.4.0
-
Fix Version/s: 1.5.0
-
Component/s: Metadata/Specs
-
Labels:None
Description
Application that need to write data in FieldMap (Message, Groups) in a generic way need to have a public access to FieldMap.setField(int key, Field<?> field).
FieldMap dest;
final Field<?> field;
This will allow writing :
dest.setField(field.getField(), field);
Instead of:
if (field instanceof StringField)
{ dest.setField((StringField) field); }else if (field instanceof IntField)
{ dest.setField((IntField) field); }else if (field instanceof CharField)
{ dest.setField((CharField) field); }else if (field instanceof DecimalField)
{ dest.setField((DecimalField) field); }else if (field instanceof DoubleField)
{ dest.setField((DoubleField) field); }else if (field instanceof UtcDateOnlyField)
{ dest.setField((UtcDateOnlyField) field); }else if (field instanceof UtcTimeOnlyField)
{ dest.setField((UtcTimeOnlyField) field); }else if (field instanceof UtcTimeStampField)
{ dest.setField((UtcTimeStampField) field); }else if (field instanceof BooleanField)
{ dest.setField((BooleanField) field); }else
{ throw new RuntimeException("Unhandled field type: " + field.getClass()); }Attachments
Issue Links
- is related to
-
QFJ-962 FieldMap.setField(int key, Field<?> field) does not properly convert values
- Open