Clover icon

sunshower-sdk

  1. Project Clover database Wed Apr 4 2018 21:39:43 UTC
  2. Package io.sunshower.sdk.v1.model.core.element

File AbstractElement.java

 

Coverage histogram

../../../../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
2
3
1
42
29
3
1.5
0.67
3
1

Classes

Class Line # Actions
AbstractElement 16 2 3
1.0100%
 

Contributing tests

This file is covered by 3 tests. .

Source view

1    package io.sunshower.sdk.v1.model.core.element;
2   
3    import io.sunshower.common.Identifier;
4    import io.sunshower.common.rs.IdentifierConverter;
5    import io.sunshower.common.rs.TypeAttributeClassExtractor;
6    import lombok.Getter;
7    import lombok.Setter;
8    import org.eclipse.persistence.oxm.annotations.XmlClassExtractor;
9    import org.eclipse.persistence.oxm.annotations.XmlIDExtension;
10   
11    import javax.xml.bind.annotation.*;
12    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
13   
14    @XmlRootElement(name = "element")
15    @XmlClassExtractor(TypeAttributeClassExtractor.class)
 
16    public class AbstractElement<E extends PersistentElement<Identifier, E>> extends PersistentElement<Identifier, E> {
17   
18    @XmlID
19    @Getter
20    @Setter
21    @XmlIDExtension
22    @XmlAttribute(name = "id")
23    @XmlJavaTypeAdapter(IdentifierConverter.class)
24    private Identifier id;
25   
 
26  7 toggle public AbstractElement() {
27   
28    }
29   
 
30  2 toggle public AbstractElement(Class<E> type) {
31  2 this(type, Identifier.random());
32    }
33   
 
34  2 toggle public AbstractElement(Class<E> type, Identifier id) {
35  2 super(type, id);
36    }
37   
38   
39   
40   
41   
42    }