GeneticAnnotation.java
/*
* Copyright 2019 Global Crop Diversity Trust
*
* 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.
*/
package org.gringlobal.model;
import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Auto-generated by:
* org.apache.openjpa.jdbc.meta.ReverseMappingTool$AnnotatedCodeGenerator
*/
@Entity
@Table(name = "genetic_annotation")
@JsonIdentityInfo(scope = GeneticAnnotation.class, generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
@Getter
@Setter
@NoArgsConstructor
public class GeneticAnnotation extends CooperatorOwnedModel {
private static final long serialVersionUID = -7840555493439868767L;
@Basic
@Column(name = "assay_method")
@Lob
private String assayMethod;
@Basic
@Column(name = "control_values")
@Lob
private String controlValues;
@ManyToOne(fetch = FetchType.LAZY, cascade = {})
@JoinColumn(name = "genetic_marker_id", nullable = false)
private GeneticMarker geneticMarker;
@Id
@JsonProperty
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "genetic_annotation_id", columnDefinition = "int")
private Long id;
@Basic
@Column(name = "max_gob_alleles")
private Integer maxGobAlleles;
@ManyToOne(fetch = FetchType.LAZY, cascade = {})
@JoinColumn(name = "method_id", nullable = false)
private Method method;
@Basic
@Column
@Lob
private String note;
@Basic
@Column(name = "observation_alleles_count")
private Integer observationAllelesCount;
@Basic
@Column(name = "scoring_method")
@Lob
private String scoringMethod;
@Basic
@Column(name = "size_alleles", length = 100)
private String sizeAlleles;
@Basic
@Column(name = "unusual_alleles", length = 100)
private String unusualAlleles;
public GeneticAnnotation(final Long id) {
this.id = id;
}
@Override
public boolean canEqual(Object other) {
return other instanceof GeneticAnnotation;
}
}