Clover icon

sunshower-core

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

File Template.java

 

Coverage histogram

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

Code metrics

0
12
12
1
85
66
12
1
1
12
1

Classes

Class Line # Actions
Template 15 12 12
0.3333333433.3%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    package io.sunshower.service.orchestration.model;
2   
3    import io.sunshower.model.core.Schemata;
4    import io.sunshower.model.core.Version;
5    import io.sunshower.service.model.Link;
6    import io.sunshower.service.model.Linked;
7    import io.sunshower.service.model.PropertyAwareObject;
8    import io.sunshower.service.workspace.model.Workspace;
9    import javax.persistence.*;
10    import javax.validation.constraints.NotNull;
11    import javax.validation.constraints.Size;
12   
13    @Entity
14    @Table(name = "TEMPLATE", schema = Schemata.SUNSHOWER)
 
15    public class Template extends PropertyAwareObject<Template> implements Linked<Template, Template> {
16   
17    @Basic
18    @NotNull
19    @Column(name = "key", unique = true)
20    @Size(min = 3, max = 255)
21    private String key;
22   
23    @Basic
24    @Column(name = "description")
25    @Size(max = 255)
26    private String description;
27   
28    @OneToOne(cascade = CascadeType.ALL)
29    private Version version;
30   
31    @ManyToOne
32    @JoinColumn(name = "workspace_id")
33    private Workspace workspace;
34   
35    @OneToOne private TemplateLink link;
36   
 
37  3 toggle public Template() {
38  3 super(Template.class);
39    }
40   
 
41  0 toggle public Workspace getWorkspace() {
42  0 return workspace;
43    }
44   
 
45  4 toggle public void setWorkspace(Workspace workspace) {
46  4 this.workspace = workspace;
47    }
48   
 
49  0 toggle public String getKey() {
50  0 return key;
51    }
52   
 
53  3 toggle public void setKey(String key) {
54  3 this.key = key;
55    }
56   
 
57  0 toggle public String getDescription() {
58  0 return description;
59    }
60   
 
61  0 toggle public void setDescription(String description) {
62  0 this.description = description;
63    }
64   
 
65  0 toggle public Version getVersion() {
66  0 return version;
67    }
68   
 
69  0 toggle public void setVersion(Version version) {
70  0 this.version = version;
71    }
72   
 
73  0 toggle @Override
74    public String toString() {
75  0 return "Template{" + "key='" + key + '\'' + "description='" + description + '\'' + '}';
76    }
77   
 
78  0 toggle public Link<Template, Template> getLink() {
79  0 return link;
80    }
81   
 
82  1 toggle protected void setLink(TemplateLink link) {
83  1 this.link = link;
84    }
85    }