generated from pagopa/template-payments-java-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e39f2d5
commit b7f1f51
Showing
5 changed files
with
42 additions
and
36 deletions.
There are no files selected for viewing
14 changes: 2 additions & 12 deletions
14
src/main/java/it/gov/pagopa/pu/organization/service/TaxonomyService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
package it.gov.pagopa.pu.organization.service; | ||
|
||
import it.gov.pagopa.pu.organization.model.DistinctOrganizationTypeDTO; | ||
import it.gov.pagopa.pu.organization.repository.TaxonomyRepository; | ||
import java.util.List; | ||
import org.springframework.data.domain.Sort; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class TaxonomyService { | ||
private TaxonomyRepository taxonomyRepository; | ||
public TaxonomyService(TaxonomyRepository taxonomyRepository){ | ||
this.taxonomyRepository = taxonomyRepository; | ||
} | ||
|
||
public List<DistinctOrganizationTypeDTO> getDistinctOrganizationType(Sort sort){ | ||
return taxonomyRepository.findDistinctOrganizationTypes(sort); | ||
} | ||
public interface TaxonomyService { | ||
List<DistinctOrganizationTypeDTO> getDistinctOrganizationType(Sort sort); | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/it/gov/pagopa/pu/organization/service/TaxonomyServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package it.gov.pagopa.pu.organization.service; | ||
|
||
import it.gov.pagopa.pu.organization.model.DistinctOrganizationTypeDTO; | ||
import it.gov.pagopa.pu.organization.repository.TaxonomyRepository; | ||
import java.util.List; | ||
import org.springframework.data.domain.Sort; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class TaxonomyServiceImpl implements TaxonomyService{ | ||
private TaxonomyRepository taxonomyRepository; | ||
public TaxonomyServiceImpl(TaxonomyRepository taxonomyRepository){ | ||
this.taxonomyRepository = taxonomyRepository; | ||
} | ||
|
||
public List<DistinctOrganizationTypeDTO> getDistinctOrganizationType(Sort sort){ | ||
return taxonomyRepository.findDistinctOrganizationTypes(sort); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters