Class MtbDataMapper
- java.lang.Object
-
- dev.pcvolkmer.mv64e.datamapper.mapper.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 MtbDataMappercreate(javax.sql.DataSource dataSource)Create instance of the mapper class using default configurationstatic MtbDataMappercreate(javax.sql.DataSource dataSource, dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)Create an instance of the mapper classstatic MtbDataMappercreate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)Create instance of the mapper class using default configurationstatic MtbDataMappercreate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)Create instance of the mapper classdev.pcvolkmer.mv64e.mtb.MtbgetByCaseId(@Nullable java.lang.String caseId)Loads and maps a Mtb file using the case iddev.pcvolkmer.mv64e.mtb.MtbgetById(int kpaId)Loads and maps a Mtb file using the root procedures database iddev.pcvolkmer.mv64e.mtb.MtbgetLatestByPatientIdAndTumorId(@Nullable java.lang.String patientId, int tumorId)Loads and maps a Mtb file using the patient id and tumor idMtbDataMappertumorCellContentMethod(dev.pcvolkmer.mv64e.mtb.TumorCellContentMethodCodingCode tumorCellContentMethod)Sets tumor cell content method to be used.
-
-
-
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 usedtumorCellContentMethod- 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 usedtumorCellContentMethod- 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:
getByIdin interfaceDataMapper<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
-
-