Open Kilda Java Documentation
UserActivityEntity.java
Go to the documentation of this file.
1 package org.openkilda.log.dao.entity;
2 
3 import java.io.Serializable;
4 import java.util.Date;
5 
6 import javax.persistence.Column;
7 import javax.persistence.Entity;
8 import javax.persistence.GeneratedValue;
9 import javax.persistence.GenerationType;
10 import javax.persistence.Id;
11 import javax.persistence.JoinColumn;
12 import javax.persistence.ManyToOne;
13 import javax.persistence.Table;
14 import javax.persistence.Temporal;
15 import javax.persistence.TemporalType;
16 
17 @Entity
18 @Table(name = "user_activity")
19 public class UserActivityEntity implements Serializable {
20 
21  private static final long serialVersionUID = 1L;
22 
23  @Id
24  @Column(name = "user_activity_id", nullable = false)
25  @GeneratedValue(strategy = GenerationType.IDENTITY)
26  private Long id;
27 
28  @Column(name = "version_number", nullable = false)
29  private Long userId;
30 
31  @ManyToOne
32  @JoinColumn(name = "actvity_id", nullable = false)
33  private ActivityTypeEntity activity;
34 
35  @Column(name = "object_id", nullable = true)
36  private String objectId;
37 
38  @Column(name = "client_ip", nullable = true)
39  private String clientIp;
40 
41  @Column(name = "activity_time")
42  @Temporal(TemporalType.TIMESTAMP)
43  private Date activityTime;
44 
45  public Long getId() {
46  return id;
47  }
48 
49  public void setId(final Long id) {
50  this.id = id;
51  }
52 
53  public Long getUserId() {
54  return userId;
55  }
56 
57  public void setUserId(final Long userId) {
58  this.userId = userId;
59  }
60 
62  return activity;
63  }
64 
65  public void setActivity(final ActivityTypeEntity activity) {
66  this.activity = activity;
67  }
68 
69  public String getObjectId() {
70  return objectId;
71  }
72 
73  public void setObjectId(final String objectId) {
74  this.objectId = objectId;
75  }
76 
77  public Date getActivityTime() {
78  return activityTime;
79  }
80 
81  public void setActivityTime(final Date activityTime) {
82  this.activityTime = activityTime;
83  }
84 
85  public String getClientIp() {
86  return clientIp;
87  }
88 
89  public void setClientIp(final String clientIp) {
90  this.clientIp = clientIp;
91  }
92 }
name
Definition: setup.py:24
id
Definition: nodes.py:55
void setActivity(final ActivityTypeEntity activity)