hopsworks-master/hopsworks-persistence/src/main/java/io/hops/hopsworks/persistence/entity/python/PythonEnvironment.java
/*
 * This file is part of Hopsworks
 * Copyright (C) 2020, Logical Clocks AB. All rights reserved
 *
 * Hopsworks is free software: you can redistribute it and/or modify it under the terms of
 * the GNU Affero General Public License as published by the Free Software Foundation,
 * either version 3 of the License, or (at your option) any later version.
 *
 * Hopsworks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License along with this program.
 * If not, see <https://www.gnu.org/licenses/>.
 */

package io.hops.hopsworks.persistence.entity.python;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;

@Entity
@XmlRootElement
@Table(name = "python_environment",
    catalog = "hopsworks",
    schema = "")
public class PythonEnvironment implements Serializable {

  private static final long serialVersionUID = 1L;

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Basic(optional = false)
  @Column(name = "id")
  private Integer id;

  @NotNull
  @Column(name = "project_id")
  private int projectId;

  @Size(max = 25)
  @NotNull
  @Column(name = "python_version")
  private String pythonVersion;

  @Column(name = "jupyter_conflicts")
  @Basic(optional = false)
  private Boolean jupyterConflicts = false;

  @Size(max = 12000)
  @Column(name = "conflicts")
  private String conflicts;

  public String getPythonVersion() {
    return pythonVersion;
  }

  public void setPythonVersion(String pythonVersion) {
    this.pythonVersion = pythonVersion;
  }

  public Boolean getJupyterConflicts() {
    return jupyterConflicts;
  }

  public void setJupyterConflicts(Boolean jupyterConflicts) {
    this.jupyterConflicts = jupyterConflicts;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getConflicts() {
    return conflicts;
  }

  public void setConflicts(String conflicts) {
    this.conflicts = conflicts;
  }

  public int getProjectId() {
    return projectId;
  }

  public void setProjectId(int projectId) {
    this.projectId = projectId;
  }
}
