Clover icon

sunshower-core

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

File AbstractEvent.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart6.png
31% of files have more coverage

Code metrics

0
10
7
1
49
37
7
0.7
1.43
7
1

Classes

Class Line # Actions
AbstractEvent 10 10 7
0.529411852.9%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    package io.sunshower.model.core.event;
2   
3    import io.sunshower.common.Identifier;
4    import io.sunshower.persistence.core.DistributableEntity;
5    import javax.xml.bind.annotation.XmlAttribute;
6    import javax.xml.bind.annotation.XmlRootElement;
7   
8    /** Created by haswell on 2/19/17. */
9    @XmlRootElement(name = "event")
 
10    public class AbstractEvent extends DistributableEntity implements Event<String, String> {
11   
12    @XmlAttribute(name = "event-type")
13    private String type;
14   
15    @XmlAttribute private String category;
16   
 
17  2 toggle public AbstractEvent() {
18  2 super();
19    }
20   
 
21  2 toggle public AbstractEvent(String type, String category) {
22  2 this.type = type;
23  2 this.category = category;
24    }
25   
 
26  0 toggle public AbstractEvent(Identifier id, String type, String category) {
27  0 super(id);
28  0 this.type = type;
29  0 this.category = category;
30    }
31   
 
32  1 toggle @Override
33    public String getType() {
34  1 return type;
35    }
36   
 
37  0 toggle public void setType(String type) {
38  0 this.type = type;
39    }
40   
 
41  1 toggle @Override
42    public String getCategory() {
43  1 return category;
44    }
45   
 
46  0 toggle public void setCategory(String category) {
47  0 this.category = category;
48    }
49    }