Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.persistence.*;
- import java.util.Date;
- import java.util.Map;
- import java.util.UUID;
- import javax.persistence.Index;
- import javax.persistence.Id;
- import javax.persistence.Table;
- @Entity
- @Table(name="Action",
- indexes = {
- @Index(name="action_serverId_idx", columnList="serverId")
- })
- public class Action {
- @Id()
- private UUID id = UUID.randomUUID();
- private String userSession;
- private String referer;
- private String userAgent;
- private Date requestTime;
- private Integer actionType;
- private Map<Date, String> context;
- private int serverId;
- public Map<Date, String> getContext() {
- return context;
- }
- public void setContext(Map<Date, String> context) {
- this.context = context;
- }
- public Date getRequestTime() {
- return requestTime;
- }
- public void setRequestTime(Date requestTime) {
- this.requestTime = requestTime;
- }
- public UUID getId() {
- return id;
- }
- public void setId(UUID id) {
- this.id = id;
- }
- public String getUserSession() {
- return userSession;
- }
- public void setUserSession(String userSession) {
- this.userSession = userSession;
- }
- public String getReferer() {
- return referer;
- }
- public void setReferer(String referer) {
- this.referer = referer;
- }
- public String getUserAgent() {
- return userAgent;
- }
- public void setUserAgent(String userAgent) {
- this.userAgent = userAgent;
- }
- public Integer getActionType() {
- return actionType;
- }
- public void setActionType(Integer actionType) {
- this.actionType = actionType;
- }
- public int getServerId() {
- return serverId;
- }
- public void setServerId(int serverId) {
- this.serverId = serverId;
- }
- @Override
- public String toString() {
- return "Action{" +
- "id=" + id +
- ", userSession='" + userSession + '\'' +
- ", referer='" + referer + '\'' +
- ", userAgent='" + userAgent + '\'' +
- ", requestTime=" + requestTime +
- ", actionType=" + actionType +
- ", context=" + context +
- ", serverId=" + serverId +
- '}';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement