use of jakarta.resource.cci.MappedRecord in project eclipselink by eclipse-ee4j.
the class OracleNoSQLPlatform method createInputRecord.
/**
* Allow the platform to create the appropriate type of record for the interaction.
* Convert the nested local mapped record to a flat global keyed record.
*/
@Override
public jakarta.resource.cci.Record createInputRecord(EISInteraction interaction, EISAccessor accessor) {
if (interaction instanceof XMLInteraction) {
return super.createInputRecord(interaction, accessor);
}
if (interaction instanceof MappedInteraction) {
MappedRecord input = (MappedRecord) interaction.createInputRecord(accessor);
// Create the key from the objects id.
ClassDescriptor descriptor = interaction.getQuery().getDescriptor();
if (descriptor == null) {
if (getRecordConverter() != null) {
return getRecordConverter().converterToAdapterRecord(input);
}
return input;
}
Object key = createMajorKey(descriptor, new EISMappedRecord(input, accessor), interaction, accessor);
OracleNoSQLRecord record = new OracleNoSQLRecord();
record.put(key, input);
if (getRecordConverter() != null) {
return getRecordConverter().converterToAdapterRecord(record);
}
return record;
} else {
return super.createInputRecord(interaction, accessor);
}
}
Aggregations