package uk.ac.ebi.spot.goci.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import java.util.Collection;

/**
 * Created by Laurent on 15/05/15.
 */
@Entity
public class Location {

    @Id
    @GeneratedValue
    private Long id;

    private String chromosomeName;

    private Long chromosomePosition;

    @ManyToOne
    private Region region;

    // JPA no-args constructor
    public Location() {}

    public Location( String chromosomeName,
                     Long chromosomePosition,
                     Region region) {
        this.chromosomeName = chromosomeName;
        this.chromosomePosition = chromosomePosition;
        this.region = region;

    }

    public Long getId() {
        return id;
    }

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

    public String getChromosomeName() {
        return chromosomeName;
    }

    public void setChromosomeName(String chromosomeName) {
        this.chromosomeName = chromosomeName;
    }

    public Long getChromosomePosition() {
        return chromosomePosition;
    }

    public void setChromosomePosition(Long chromosomePosition) {
        this.chromosomePosition = chromosomePosition;
    }

    public Region getRegion() {
        return region;
    }

    public void setRegion(Region region) {
        this.region = region;
    }


    @Override
    public String toString() {
        return "Location{" +
                "id=" + id +
                ", chromosomeName='" + chromosomeName + '\'' +
                ", chromosomePosition='" + chromosomePosition + '\'' +
                '}';
    }

}

@@ -516,18 +516,20 @@
 private 
-Lo
+Stri
 ng chrom
@@ -709,18 +709,20 @@
         
-Lo
+Stri
 ng chrom
@@ -1223,26 +1223,28 @@
 %0A    public 
-Lo
+Stri
 ng getChromo
@@ -1340,18 +1340,20 @@
 osition(
-Lo
+Stri
 ng chrom

Set chromosome position as a string rather than long