org.openfact.models.jpa.entities.JobReportEntity Maven / Gradle / Ivy
/*******************************************************************************
* Copyright 2016 Sistcoop, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.09.14 at 11:44:49 AM PET
//
package org.openfact.models.jpa.entities;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
@Entity
@Table(name = "JOB_REPORT")
@NamedQueries({
@NamedQuery(name = "getAllJobReportsByOrganization", query = "select j from JobReportEntity j where j.organizationId=:organizationId"),
@NamedQuery(name = "deleteJobReportsByOrganization", query = "delete from JobReportEntity j where j.organizationId=:organizationId")
})
public class JobReportEntity {
@Id
@Column(name = "ID")
@GeneratedValue(generator = "uuid2")
@GenericGenerator(name = "uuid2", strategy = "uuid2")
@Access(AccessType.PROPERTY)
private String id;
@Column(name = "JOB_NAME")
private String jobName;
@Column(name = "START_TIME")
private long startTime;
@Column(name = "END_TIME")
private long endTime;
@Column(name = "DURATION")
private long duration;
@Column(name = "ERROR_COUNT")
private long errorCount;
@Column(name = "READ_COUNT")
private long readCount;
@Column(name = "WRITE_COUNT")
private long writeCount;
@NotNull
@Column(name = "ORGANIZATION_ID")
private String organizationId;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getJobName() {
return jobName;
}
public void setJobName(String jobName) {
this.jobName = jobName;
}
public long getStartTime() {
return startTime;
}
public void setStartTime(long startTime) {
this.startTime = startTime;
}
public long getEndTime() {
return endTime;
}
public void setEndTime(long endTime) {
this.endTime = endTime;
}
public long getDuration() {
return duration;
}
public void setDuration(long duration) {
this.duration = duration;
}
public long getErrorCount() {
return errorCount;
}
public void setErrorCount(long errorCount) {
this.errorCount = errorCount;
}
public long getReadCount() {
return readCount;
}
public void setReadCount(long readCount) {
this.readCount = readCount;
}
public long getWriteCount() {
return writeCount;
}
public void setWriteCount(long writeCount) {
this.writeCount = writeCount;
}
public String getOrganizationId() {
return organizationId;
}
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null) return false;
if (!(o instanceof JobReportEntity)) return false;
JobReportEntity that = (JobReportEntity) o;
if (!getId().equals(that.getId())) return false;
return true;
}
@Override
public int hashCode() {
return getId().hashCode();
}
}