Clover icon

sunshower-core

  1. Project Clover database Fri Apr 6 2018 03:27:42 UTC
  2. Package io.sunshower.service.revision.model

File Repository.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart4.png
46% of files have more coverage

Code metrics

0
5
5
1
42
33
5
1
1
5
1

Classes

Class Line # Actions
Repository 12 5 5
0.440%
 

Contributing tests

This file is covered by 1 test. .

Source view

1    package io.sunshower.service.revision.model;
2   
3    import io.sunshower.model.core.Schemata;
4    import io.sunshower.model.core.auth.ProtectedDistributableEntity;
5    import java.nio.file.Path;
6    import java.nio.file.Paths;
7    import javax.persistence.*;
8    import javax.validation.constraints.NotNull;
9   
10    @Entity
11    @Table(name = "GIT_REPOSITORY", schema = Schemata.SUNSHOWER)
 
12    public class Repository extends ProtectedDistributableEntity {
13   
14    @NotNull
15    @OneToOne(cascade = CascadeType.ALL)
16    @JoinColumn(name = "local_id")
17    private Local local;
18   
19    @OneToOne(cascade = CascadeType.ALL)
20    @JoinColumn(name = "remote_id")
21    private Remote remote;
22   
 
23  0 toggle public Path resolve(String p) {
24  0 return Paths.get(local.getFile().getPath(), p);
25    }
26   
 
27  1 toggle public Local getLocal() {
28  1 return local;
29    }
30   
 
31  1 toggle public void setLocal(Local local) {
32  1 this.local = local;
33    }
34   
 
35  0 toggle public Remote getRemote() {
36  0 return remote;
37    }
38   
 
39  0 toggle public void setRemote(Remote remote) {
40  0 this.remote = remote;
41    }
42    }