TaxonomyRegulation.java
/*
* Copyright 2026 Global Crop Diversity Trust
* Licensed under the Apache License, Version 2.0
* See LICENSE file in project root folder or http://www.apache.org/licenses/LICENSE-2.0
*/
package org.gringlobal.model;
import static org.gringlobal.model.community.CommunityCodeValues.CODE_VALUE_LENGTH;
import javax.persistence.*;
import org.gringlobal.custom.validation.javax.CodeValueField;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Auto-generated by:
* org.apache.openjpa.jdbc.meta.ReverseMappingTool$AnnotatedCodeGenerator
*/
@Entity
@Table(name = "taxonomy_regulation")
@Getter
@Setter
@NoArgsConstructor
public class TaxonomyRegulation extends CooperatorOwnedModel {
private static final long serialVersionUID = 7390770012443429655L;
/** Taxonomy Regulation ID. */
@Id
@JsonProperty
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "taxonomy_regulation_id", columnDefinition = "int")
private Long id;
/** Geography: Reference to the geography described by this taxonomy regulation. */
@ManyToOne(fetch = FetchType.LAZY, cascade = {})
@JoinColumn(name = "geography_id", nullable = false)
private Geography geography;
/** Regulation Type: A code qualifying the regulation category. Uses TAXONOMY_NOXIOUS_TYPE vocabulary. */
@Basic
@Column(name = "regulation_type_code", nullable = false, length = CODE_VALUE_LENGTH)
@CodeValueField("TAXONOMY_NOXIOUS_TYPE")
private String regulationTypeCode;
/** Description: Description of the regulation. */
@Basic
@Column(length = 80)
private String description;
/** Regulation Level: A code qualifying the regulation level. Uses TAXONOMY_NOXIOUS_LEVEL vocabulary. */
@Basic
@Column(name = "regulation_level_code", length = CODE_VALUE_LENGTH)
@CodeValueField("TAXONOMY_NOXIOUS_LEVEL")
private String regulationLevelCode;
/** URL 1: A URL attachment for the regulation record. */
@Basic
@Column(name = "url_1", length = 250)
private String url1;
/** URL 2: A second URL attachment for the regulation record. */
@Basic
@Column(name = "url_2", length = 250)
private String url2;
/** Note: Generic comments on the taxonomic regulation table. */
@Basic
@Lob
private String note;
public TaxonomyRegulation(Long id) {
this.id = id;
}
@Override
public boolean canEqual(Object other) {
return other instanceof TaxonomyRegulation;
}
}