I have a program that recruits witness accounts of a crime scene from various subjects. Every kind of subject has its own Report class. For example:
public class EyeWitnessReport extends AbstractReport {
private String details;
private String relation;
private QuestioningResults questioningResults;
private Integer stressLevel;
private EnumSet<CrimeFacts> crimeFacts;
private Religion religion; //to see if swearing on the Bible is an issue
}
public class ExpertWitnessReport extends AbstractReport {
private Expertise fieldOfExpertise;
private boolean relatedToAccused;
private List<Conflict> conflicts;
}
The main function of my app takes all the reports and merges them together into one CrimeScene class that contains all the details of the crime scene (by priorities, etc)
public CrimeScene mergeReports(List<AbstractReport> sources){
//takes all the reports in sources and returns one CrimeScene with the most relevant fields
}
My question is, the CrimeScene class is basically made up of data from the reports, after certain logic. It has 70 possible fields (the fields of every type of report) although on average only around 10-20 are filled. Plus it has 2-3 fields of it's own (creationTime, reportingOfficer, etc...)
How should I go about implementing it?
Is it a better implementation to make CrimeScene a regular class (70 hardcoded fields, of which no more than 20 will be filled on average), or a dynamic class, using DynaBean, Map<String, Object>
or something of the sort?