Class VectorStoreRecordMapper<Record,​StorageModel>

  • Type Parameters:
    Record - the record type
    StorageModel - the storage model type

    public class VectorStoreRecordMapper<Record,​StorageModel>
    extends Object
    A mapper to convert between a record and a storage model.
    • Method Detail

      • getRecordToStorageModelMapper

        @Nullable
        public Function<Record,​StorageModel> getRecordToStorageModelMapper()
        Gets the function to convert a record to a storage model.
        Returns:
        the function to convert a record to a storage model
      • getStorageModelToRecordMapper

        public BiFunction<StorageModel,​GetRecordOptions,​Record> getStorageModelToRecordMapper()
        Gets the function to convert a storage model to a record.
        Returns:
        the function to convert a storage model to a record
      • mapRecordToStorageModel

        public StorageModel mapRecordToStorageModel​(Record record)
        Converts a record to a storage model.
        Parameters:
        record - the record to convert
        Returns:
        the storage model
      • mapStorageModelToRecord

        public Record mapStorageModelToRecord​(StorageModel storageModel,
                                              GetRecordOptions options)
        Converts a storage model to a record.
        Parameters:
        storageModel - the storage model to convert
        options - the options
        Returns:
        the record