Clover icon

sunshower-core

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

File Details.java

 

Coverage histogram

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

Code metrics

0
19
20
1
125
94
20
1.05
0.95
20
1

Classes

Class Line # Actions
Details 12 19 20
0.3589743735.9%
 

Contributing tests

This file is covered by 18 tests. .

Source view

1    package io.sunshower.model.core.auth;
2   
3    import io.sunshower.model.core.Schemata;
4    import io.sunshower.model.core.io.File;
5    import io.sunshower.persistence.core.DistributableEntity;
6    import java.util.Date;
7    import javax.persistence.*;
8    import javax.validation.constraints.Size;
9   
10    @Entity
11    @Table(name = "USER_DETAILS", schema = Schemata.SUNSHOWER)
 
12    public class Details extends DistributableEntity {
13   
14    @Basic
15    @Size(min = 3, max = 255)
16    private String firstname;
17   
18    @Basic
19    @Size(min = 3, max = 255)
20    private String lastname;
21   
22    @Temporal(TemporalType.TIMESTAMP)
23    @Column(name = "active_until")
24    private Date activeUntil;
25   
26    @Column(unique = true, name = "phone_number")
27    private String phoneNumber;
28   
29    @Basic
30    @Column(unique = true, name = "email_address")
31    private String emailAddress;
32   
33    @Temporal(TemporalType.TIMESTAMP)
34    private Date registered;
35   
36    @Column(name = "last_active")
37    @Temporal(TemporalType.TIMESTAMP)
38    private Date lastActive;
39   
40    @OneToOne(mappedBy = "details")
41    @JoinColumn(name = "user_id")
42    private User user;
43   
44    @OneToOne(cascade = CascadeType.ALL)
45    @JoinColumn(name = "root_id", insertable = false, updatable = false)
46    private File root;
47   
 
48  0 toggle public Details() {}
49   
 
50  18 toggle public Details(User user) {
51  18 this.user = user;
52    }
53   
 
54  0 toggle public File getRoot() {
55  0 return root;
56    }
57   
 
58  1 toggle public void setRoot(File root) {
59  1 this.root = root;
60    }
61   
 
62  0 toggle public Date getActiveUntil() {
63  0 return activeUntil;
64    }
65   
 
66  0 toggle public void setActiveUntil(Date activeUntil) {
67  0 this.activeUntil = activeUntil;
68    }
69   
 
70  0 toggle public String getPhoneNumber() {
71  0 return phoneNumber;
72    }
73   
 
74  0 toggle public void setPhoneNumber(String phoneNumber) {
75  0 this.phoneNumber = phoneNumber;
76    }
77   
 
78  0 toggle public User getUser() {
79  0 return user;
80    }
81   
 
82  0 toggle public void setUser(User user) {
83  0 this.user = user;
84    }
85   
 
86  1 toggle public Date getRegistered() {
87  1 return registered;
88    }
89   
 
90  1 toggle public void setRegistered(Date registered) {
91  1 this.registered = registered;
92    }
93   
 
94  0 toggle public Date getLastActive() {
95  0 return lastActive;
96    }
97   
 
98  0 toggle public void setLastActive(Date lastActive) {
99  0 this.lastActive = lastActive;
100    }
101   
 
102  0 toggle public String getFirstname() {
103  0 return firstname;
104    }
105   
 
106  1 toggle public void setFirstname(String firstname) {
107  1 this.firstname = firstname;
108    }
109   
 
110  0 toggle public String getLastname() {
111  0 return lastname;
112    }
113   
 
114  0 toggle public void setLastname(String lastname) {
115  0 this.lastname = lastname;
116    }
117   
 
118  1 toggle public String getEmailAddress() {
119  1 return emailAddress;
120    }
121   
 
122  11 toggle public void setEmailAddress(String emailAddress) {
123  11 this.emailAddress = emailAddress;
124    }
125    }