Blame view

src/main/java/fr/plil/sio/persistence/jdbc/RightServiceJdbc.java 1.11 KB
a800fde0   jcartign   First version, in...
1
2
3
4
5
6
  package fr.plil.sio.persistence.jdbc;
  
  import fr.plil.sio.persistence.api.Right;
  import fr.plil.sio.persistence.api.RightService;
  import org.springframework.stereotype.Service;
  
5418cb05   jcartign   Javadoc of API is...
7
8
  import java.util.List;
  
a800fde0   jcartign   First version, in...
9
  @Service
292aec6f   jcartign   First version bef...
10
  public class RightServiceJdbc implements RightService {
ef4eb263   rvangrev   Nouvelles modific...
11
      
a800fde0   jcartign   First version, in...
12
13
      @Override
      public Right create(String name) {
ef4eb263   rvangrev   Nouvelles modific...
14
15
16
17
18
19
          if(name==null){
              throw new IllegalArgumentException("name cannot be null");
          }
          else{
              return null;
          }
a800fde0   jcartign   First version, in...
20
21
22
23
      }
  
      @Override
      public Right create(String name, Right parent) {
ef4eb263   rvangrev   Nouvelles modific...
24
          return null;
a800fde0   jcartign   First version, in...
25
26
27
      }
  
      @Override
5418cb05   jcartign   Javadoc of API is...
28
      public boolean delete(Right right) {
ef4eb263   rvangrev   Nouvelles modific...
29
30
31
32
33
34
          if(right==null){
              throw new IllegalArgumentException("name cannot be null");
          }
          else{
              return true;
          }
a800fde0   jcartign   First version, in...
35
36
37
      }
  
      @Override
5418cb05   jcartign   Javadoc of API is...
38
      public List<Right> findByName(String name) {
292aec6f   jcartign   First version bef...
39
          throw new IllegalStateException("not implemented !");
5418cb05   jcartign   Javadoc of API is...
40
41
42
43
      }
  
      @Override
      public Right findOne(Long id) {
ef4eb263   rvangrev   Nouvelles modific...
44
45
46
47
48
49
          if(id==null){
              throw new IllegalArgumentException("name cannot be null");
          }
          else{
              return null;
          }
a800fde0   jcartign   First version, in...
50
51
      }
  }