Projekt

Obecné

Profil

Stáhnout (782 Bajtů) Statistiky
| Větev: | Revize:
1
package vldc.aswi.dao;
2

    
3
import org.springframework.data.repository.CrudRepository;
4
import org.springframework.stereotype.Repository;
5
import vldc.aswi.domain.Assembly;
6

    
7
import java.util.List;
8

    
9
/**
10
 * Repository for domain Assembly.
11
 */
12
@Repository
13
public interface AssemblyRepository extends CrudRepository<Assembly, Long> {
14

    
15
    /**
16
     * Find Assembly by its ID.
17
     * @param Id - Assembly Id.
18
     * @return Assembly if ID is present in database.
19
     */
20
    Assembly getById(Long Id);
21

    
22

    
23
    /**
24
     * Find record with highest order.
25
     * @return Assembly with highest order.
26
     */
27
    Assembly findFirst1ByOrderByAssemblyOrder();
28

    
29
    /**
30
     * Find assemblies order by order
31
     * @return ordered assemblies
32
     */
33
    List<Assembly> getByOrderByAssemblyOrderAsc();
34
}
(1-1/7)