<mapping>
<class-a >com.nirvana.PatientMedicationAdherence</class-a>
<class-b>com.nirvana.PatientAdherence</class-b>
<field>
<a>medicationAdherence</a>
<b>medicationAdherenceList</b>
<a-hint>com.nirvana.MedicationAdherence</a-hint>
<b-hint>com.nirvana.core.MedicationAdherence</b-hint>
</field>
</mapping>
In the example above, the type in the list is a base class or interface for the classes specified in the mapping (class-a and class-b).
@Mapper
public interface NirvanaMapper {
List<com.nirvana.core.MedicationAdherence> MedAdhereToCoreMedAdhereList(List<com.nirvana.MedicationAdherence> elements); List<PatientAdherence> patientMedicationAdherencesToPatientAdherences(List<PatientMedicationAdherence> patientMedicationAdherences);
PatientAdherence patientMedicationAdherenceToPatientAdherence(PatientMedicationAdherences patientMedicationAdherence);
}
Does this seem the correct mapper, or am I completely misunderstanding this?