/* * Copyright (c) 2010-2012 Grid Dynamics Consulting Services, Inc, All Rights Reserved * http://www.griddynamics.com * * This library is free software; you can redistribute it and/or modify it under the terms of * the Apache License; either * version 2.0 of the License, or any later version. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.griddynamics.jagger.dbapi.entity; import java.util.Date; import java.util.Set; import java.util.Collections; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; @Entity public class SessionData { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String sessionId; private Date startTime; private Date endTime; private Integer taskExecuted; private Integer taskFailed; private Integer activeKernels; @Column(length = 7000) private String comment; private transient String sessionName; private String errorMessage; @ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinTable(name = "SessionTagEntity") private Set<TagEntity> tags = Collections.emptySet(); public SessionData() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getSessionId() { return sessionId; } public void setSessionId(String sessionId) { this.sessionId = sessionId; } public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public Integer getTaskExecuted() { return taskExecuted; } public void setTaskExecuted(Integer taskExecuted) { this.taskExecuted = taskExecuted; } public Integer getTaskFailed() { return taskFailed; } public void setTaskFailed(Integer taskFailed) { this.taskFailed = taskFailed; } public Integer getActiveKernels() { return activeKernels; } public void setActiveKernels(Integer activeKernels) { this.activeKernels = activeKernels; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } public String getSessionName() { return sessionName; } public void setSessionName(String sessionName) { this.sessionName = sessionName; } public String getErrorMessage() { return errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public Set<TagEntity> getTags() { return tags; } public void setTags(Set<TagEntity> tags) { this.tags = tags; } }