Example usage for org.springframework.data.repository CrudRepository interface-usage

List of usage examples for org.springframework.data.repository CrudRepository interface-usage

Introduction

In this page you can find the example usage for org.springframework.data.repository CrudRepository interface-usage.

Usage

From source file monkeys.BananaRepository.java

/**
 * MIT License
 *
 * @author abdiel
 */
public interface BananaRepository extends CrudRepository<Banana, Long> {

From source file tibano.entity.ParkingTransactionRepository.java

public interface ParkingTransactionRepository extends CrudRepository<ParkingTransaction, Long> {
    @Query("select pt from ParkingTransaction pt where pt.area.id = ?1 and pt.car.licensePlate = ?2 and pt.end is null")
    ParkingTransaction findOpenTransactionByAreaAndLicensePlate(Long areaId, String licensePlate);

    @Query("select count(pt) from ParkingTransaction pt where pt.area.id = ?1 and pt.end is null")
    Long getOpenTransactionByAreaCount(Long areaId);

From source file monkeys.MonkeyRepository.java

/**
 * Here's an excellent guide on how to deal with repositories,
 * how to extend them, how to tune the, and how to work with custom
 * queries on the repositories.
 * http://static.springsource.org/spring-data/commons/docs/current/reference/html/repositories.html
  */

From source file tibano.entity.CarRepository.java

public interface CarRepository extends CrudRepository<Car, Long> {

    Car findByLicensePlate(String licensePlate);

    @Query("select c.licensePlate from Car c where c.user.id = ?1")
    Set<String> findLicensePlateByUserId(Long userId);

From source file guru.springframework.repositories.LicenseRepository.java

@Repository
public interface LicenseRepository extends CrudRepository<License, Integer> {

}

From source file com.orange.clara.pivotaltrackermirror.repos.MirrorReferenceRepo.java

/**
 * Copyright (C) 2016 Orange
 * <p>
 * This software is distributed under the terms and conditions of the 'Apache-2.0'
 * license which can be found in the file 'LICENSE' in this package distribution
 * or at 'https://opensource.org/licenses/Apache-2.0'.

From source file info.losd.galen.scheduler.repository.TaskRepo.java

/**
 * The MIT License (MIT)
 * <p>
 * Copyright (c) 2015 Andrew Braithwaite
 * <p>
 * Permission is hereby granted, free of charge, to any person obtaining a copy

From source file com.nuevebit.miroculus.mrna.core.CorrelationDiscoveryRepository.java

/**
 *
 * @author emerino
 */
public interface CorrelationDiscoveryRepository extends CrudRepository<CorrelationDiscovery, Long> {

From source file com.nuevebit.miroculus.mrna.core.AuthorRepository.java

/**
 *
 * @author emerino
 */
public interface AuthorRepository extends CrudRepository<Author, Integer> {

From source file com.nuevebit.miroculus.mrna.core.DiseaseRepository.java

/**
 *
 * @author emerino
 */
public interface DiseaseRepository extends CrudRepository<Disease, Long> {