Class MtbDataMapper

  • All Implemented Interfaces:
    DataMapper<dev.pcvolkmer.mv64e.mtb.Mtb>

    public class MtbDataMapper
    extends java.lang.Object
    implements DataMapper<dev.pcvolkmer.mv64e.mtb.Mtb>
    Mapper class to load and map Mtb files from the database
    Since:
    0.1
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MtbDataMapper create​(javax.sql.DataSource dataSource)
      Create instance of the mapper class using default configuration
      static MtbDataMapper create​(javax.sql.DataSource dataSource, dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)
      Create an instance of the mapper class
      static MtbDataMapper create​(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
      Create instance of the mapper class using default configuration
      static MtbDataMapper create​(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)
      Create instance of the mapper class
      dev.pcvolkmer.mv64e.mtb.Mtb getByCaseId​(@Nullable java.lang.String caseId)
      Loads and maps a Mtb file using the case id
      dev.pcvolkmer.mv64e.mtb.Mtb getById​(int kpaId)
      Loads and maps a Mtb file using the root procedures database id
      dev.pcvolkmer.mv64e.mtb.Mtb getLatestByPatientIdAndTumorId​(@Nullable java.lang.String patientId, int tumorId)
      Loads and maps a Mtb file using the patient id and tumor id
      MtbDataMapper tumorCellContentMethod​(dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)
      Sets tumor cell content method to be used.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        @NullMarked
        public static MtbDataMapper create​(javax.sql.DataSource dataSource)
        Create instance of the mapper class using default configuration
        Parameters:
        dataSource - The datasource to be used
        Returns:
        The initialized mapper
      • create

        @NullMarked
        public static MtbDataMapper create​(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
        Create instance of the mapper class using default configuration
        Parameters:
        jdbcTemplate - The Spring JdbcTemplate to be used
        Returns:
        The initialized mapper
      • create

        @NullMarked
        public static MtbDataMapper create​(javax.sql.DataSource dataSource,
                                           dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)
        Create an instance of the mapper class
        Parameters:
        dataSource - The datasource to be used
        tumorCellContentMethod - Tumor cell count method
        Returns:
        The initialized mapper
      • create

        @NullMarked
        public static MtbDataMapper create​(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
                                           dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)
        Create instance of the mapper class
        Parameters:
        jdbcTemplate - The Spring JdbcTemplate to be used
        tumorCellContentMethod - Tumor cell count method
        Returns:
        The initialized mapper
      • tumorCellContentMethod

        @NullMarked
        public MtbDataMapper tumorCellContentMethod​(dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)
        Sets tumor cell content method to be used. If not set, HISTOLOGIC will be used.
        Parameters:
        tumorCellContentMethod - The tumor cell content method to be used
        Returns:
        Instance of MtbDataMapper with enabled filter.
      • getById

        @NullMarked
        public dev.pcvolkmer.mv64e.mtb.Mtb getById​(int kpaId)
        Loads and maps a Mtb file using the root procedures database id
        Specified by:
        getById in interface DataMapper<dev.pcvolkmer.mv64e.mtb.Mtb>
        Parameters:
        kpaId - The database id of the root procedure data set
        Returns:
        The loaded Mtb file
      • getByCaseId

        @NullMarked
        public dev.pcvolkmer.mv64e.mtb.Mtb getByCaseId​(@Nullable java.lang.String caseId)
        Loads and maps a Mtb file using the case id
        Parameters:
        caseId - The case id
        Returns:
        The loaded Mtb file
      • getLatestByPatientIdAndTumorId

        @NullMarked
        public dev.pcvolkmer.mv64e.mtb.Mtb getLatestByPatientIdAndTumorId​(@Nullable java.lang.String patientId,
                                                                          int tumorId)
        Loads and maps a Mtb file using the patient id and tumor id
        Parameters:
        patientId - The patients id (not database id)
        tumorId - The tumor identification
        Returns:
        The loaded Mtb file