[QFJ-428] FieldMap.setField(int key, Field<?> field) should be public Created: 06/Apr/09 Updated: 16/Nov/18 Resolved: 06/Apr/10 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Metadata/Specs |
Affects Version/s: | 1.4.0 |
Fix Version/s: | 1.5.0 |
Type: | Improvement | Priority: | Default |
Reporter: | Paul-Henri Giraud | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Issue Links: |
|
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; 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()); } |