1
2
3
4
5
6 package org.tailormap.api.repository;
7
8 import java.util.Optional;
9 import org.springframework.data.jpa.repository.JpaRepository;
10 import org.springframework.data.rest.core.annotation.RepositoryRestResource;
11 import org.springframework.security.access.prepost.PreAuthorize;
12 import org.tailormap.api.persistence.TMFeatureSource;
13 import org.tailormap.api.persistence.TMFeatureType;
14
15 @RepositoryRestResource(
16 path = "feature-types",
17 collectionResourceRel = "feature-types",
18 itemResourceRel = "feature-type")
19 public interface FeatureTypeRepository extends JpaRepository<TMFeatureType, Long> {
20
21
22
23
24
25
26
27
28
29 @PreAuthorize("permitAll()")
30 Optional<TMFeatureType> getTMFeatureTypeByNameAndFeatureSource(
31 String name, TMFeatureSource featureSource);
32 }