Java Code Examples for org.springframework.data.rest.core.annotation.RestResource

The following examples show how to use org.springframework.data.rest.core.annotation.RestResource. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: galeb   Source File: EnvironmentRepository.java    License: Apache License 2.0 5 votes vote down vote up
@RestResource(exported = false)
@Query(value = "SELECT DISTINCT e FROM Environment as e " +
        "inner join e.virtualhosts as v " +
        "inner join v.virtualhostgroup as vp " +
        "inner join vp.rulesordered as ro " +
        "WHERE ro.id = :ruleorderedId")
Set<Environment> findAllByRuleOrderedId(@Param("ruleorderedId") long ruleorderedId);
 
Example 2
Source Project: galeb   Source File: EnvironmentRepository.java    License: Apache License 2.0 5 votes vote down vote up
@RestResource(exported = false)
@Query(value = "SELECT DISTINCT e FROM Environment as e " +
        "inner join e.virtualhosts as v " +
        "inner join v.virtualhostgroup as vp " +
        "WHERE vp.id = :vhgid")
@PreAuthorize("@perm.allowView(null , #this)")
List<Environment> findAllByVirtualhostgroupId(@Param("vhgid") long vhgid);
 
Example 3
Source Project: yugastore-java   Source File: ProductMetadataRepo.java    License: Apache License 2.0 4 votes vote down vote up
@Query("SELECT * FROM cronos.products limit ?0 offset ?1")
@RestResource(path = "products", rel = "products")
public List<ProductMetadata> getProducts(@Param("limit") int limit, @Param("offset") int offset);
 
Example 4
Source Project: yugastore-java   Source File: ProductRankingRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query("select * from cronos.product_rankings where asin=?0")
@RestResource(path = "product", rel = "product")
Optional<ProductRanking> findProductRankingById(String asin);
 
Example 5
Source Project: yugastore-java   Source File: ProductRankingRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query("SELECT * FROM cronos.product_rankings where category =?0 limit ?1 offset ?2")
@RestResource(path = "category", rel = "category")
public List<ProductRanking> getProductsByCategory(@Param("name") String category, @Param("limit") int limit, @Param("offset") int offset);
 
Example 6
Source Project: springdoc-openapi   Source File: CustomerRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
void deleteById(Long id);
 
Example 7
Source Project: springdoc-openapi   Source File: CustomerRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
void delete(Customer entity);
 
Example 8
@RestResource(rel = "by-service-type")
Page<Location> findByServiceType(@Param("type") String type, Pageable pageable);
 
Example 9
@RestResource(path = "vin", rel = "by-vin")
Page<Location> findByUnitInfoUnitVin(@Param("vin") String vin, Pageable pageable);
 
Example 10
@RestResource(rel = "by-location", description = @Description("Find by location, comma separated, e.g. 'lat,long', and distance, e.g. '50km'") )
ServiceLocation findFirstByLocationNear(@Param("location") Point location);
 
Example 11
Source Project: Spring   Source File: BookRepository.java    License: Apache License 2.0 4 votes vote down vote up
@RestResource(path = "title", rel = "title", exported = false)
List<Book> findByTitle(@Param("title") String title);
 
Example 12
@Override
@RestResource(exported = false)//true means the capability will be offered via REST
<S extends Product> S save(S entity);
 
Example 13
@RestResource(exported = true)
@Query("SELECT * FROM message m WHERE m.username = :username")
List<Message> messagesBy(@Param("username") String username);
 
Example 14
@RestResource(exported = true)
@Modifying
@Query("DELETE FROM message WHERE username = :username AND millis = :millis")   
void deleteMessageBy(@Param("username") String username, @Param("millis") String millis);
 
Example 15
@RestResource(exported = true)
@Query("SELECT * FROM message ORDER BY millis DESC LIMIT :n")
List<Message> newestMessages(@Param("n") int n);
 
Example 16
@Override
@RestResource(exported = false)
void delete(Message message);
 
Example 17
@RestResource(exported = true)
@Query("SELECT * FROM message m WHERE m.username = :username")
List<Message> messagesBy(@Param("username") String username);
 
Example 18
@RestResource(exported = true)
@Modifying
@Query("DELETE FROM message WHERE username = :username AND millis = :millis")   
void deleteMessageBy(@Param("username") String username, @Param("millis") String millis);
 
Example 19
@RestResource(exported = true)
@Query("SELECT * FROM message ORDER BY millis DESC LIMIT :n")
List<Message> newestMessages(@Param("n") int n);
 
Example 20
@Override
@RestResource(exported = false)
void delete(Message message);
 
Example 21
Source Project: spring-cloud-skipper   Source File: DeployerRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
Deployer save(Deployer deployer);
 
Example 22
Source Project: spring-cloud-skipper   Source File: DeployerRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
void deleteById(String s);
 
Example 23
Source Project: spring-cloud-skipper   Source File: DeployerRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
void delete(Deployer deployer);
 
Example 24
Source Project: spring-cloud-skipper   Source File: DeployerRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
void deleteAll();
 
Example 25
Source Project: spring-cloud-skipper   Source File: RepositoryRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
Repository save(Repository repository);
 
Example 26
Source Project: factory   Source File: ProductionOutputDao.java    License: MIT License 4 votes vote down vote up
@RestResource(path = "refNos", rel = "refNos")
List<ProductionOutputEntity> findByRefNoAndEndGreaterThanAndStartLessThan(String refNo, LocalDateTime from, LocalDateTime to);
 
Example 27
Source Project: spring-cloud-skipper   Source File: RepositoryRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
void delete(Repository deployer);
 
Example 28
Source Project: spring-cloud-skipper   Source File: RepositoryRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
void deleteAll();
 
Example 29
@Override
@RestResource(exported = false)//false restricts the capability from the REST API
void delete(String id);
 
Example 30
Source Project: spring-cloud-skipper   Source File: ReleaseRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@RestResource(exported = false)
Release save(Release release);