Skip to content

Commit

Permalink
Update tests and mappers in legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
haynescd committed Feb 6, 2025
1 parent c962ccc commit b03fef5
Show file tree
Hide file tree
Showing 37 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private SqlSessionFactoryBean sqlSessionFactory(DataSource dataSource, Applicati
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(dataSource);
sessionFactory.setMapperLocations(
applicationContext.getResources("classpath:org/cbioportal/persistence/mybatis/*.xml")
applicationContext.getResources("classpath:org/cbioportal/legacy/persistence/mybatis/*.xml")
);
sessionFactory.setTypeHandlers(new SampleTypeTypeHandler());
return sessionFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// TODO
// - consider extending extends ResponseEntityExceptionHandler
// - check controllers for not catching exceptions themselves
@ControllerAdvice("org.cbioportal.web")
@ControllerAdvice("org.cbioportal.legacy.web")
public class GlobalExceptionHandler {

@ExceptionHandler(UnsupportedOperationException.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,20 @@
<otherwise>
<trim prefix="" prefixOverrides="AND">
<choose>
<when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@NO_GENE">
<when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.legacy.model.StructuralVariantSpecialValue@NO_GENE">
AND structural_variant.SITE1_ENTREZ_GENE_ID IS NULL
</when>
<when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@ANY_GENE" />
<when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.legacy.model.StructuralVariantSpecialValue@ANY_GENE" />
<otherwise>
AND structural_variant.SITE1_ENTREZ_GENE_ID = ${geneFilterQuery.getGene1Query().getEntrezId()}
</otherwise>
</choose>
<choose>
<when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@NO_GENE">
<when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.legacy.model.StructuralVariantSpecialValue@NO_GENE">
AND
structural_variant.SITE2_ENTREZ_GENE_ID IS NULL
</when>
<when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@ANY_GENE" />
<when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.legacy.model.StructuralVariantSpecialValue@ANY_GENE" />
<otherwise>
AND
structural_variant.SITE2_ENTREZ_GENE_ID = ${geneFilterQuery.getGene2Query().getEntrezId()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Properties;

@TestConfiguration
@MapperScan("org.cbioportal.persistence.mybatis")
@MapperScan("org.cbioportal.legacy.persistence.mybatis")
public class TestConfig {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.springframework.context.annotation.Import;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.io.IOException;

@TestConfiguration
@MapperScan("org.cbioportal.persistence.mybatisclickhouse")
@MapperScan("org.cbioportal.legacy.persistence.mybatisclickhouse")
public class MyBatisConfig {

@Bean
Expand Down

0 comments on commit b03fef5

Please sign in to comment.