Commit 68f9c730 authored by Matija Obreza's avatar Matija Obreza

New USDA models 2020-06-13

mvn -X org.codehaus.mojo:exec-maven-plugin:java@openjpa-reveng

find src/main/java/org/gringlobal/model/ -type f -iname '*java' -exec bash -c 'F={}; X=`basename $F | sed "s/.java$//"`; echo $X; cat <<EOF >> src/main/java/org/gringlobal/persistence/${X}Repository.java
package org.gringlobal.persistence;

import org.gringlobal.model.$X;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

@Repository
public interface ${X}Repository extends JpaRepository<$X, Long>, QuerydslPredicateExecutor<$X> {

}
EOF
' \;
parent df9045ff
package org.gringlobal.model;
import java.util.*;
import javax.persistence.*;
/**
* Auto-generated by:
* org.apache.openjpa.jdbc.meta.ReverseMappingTool$AnnotatedCodeGenerator
*/
@Entity
@Table(name="taxonomy_cwr_crop")
public class TaxonomyCwrCrop {
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="created_by", nullable=false)
private Cooperator createdBy;
@Basic
@Column(name="created_date", nullable=false)
private Date createdDate;
@Basic
@Column(name="crop_name", columnDefinition="nvarchar", length=150)
private String cropName;
@Id
@Column(name="taxonomy_cwr_crop_id", columnDefinition="int identity")
private int id;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="modified_by")
private Cooperator modifiedBy;
@Basic
@Column(name="modified_date")
private Date modifiedDate;
@Basic
@Column(columnDefinition="nvarchar", length=2147483647)
private String note;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="owned_by", nullable=false)
private Cooperator ownedBy;
@Basic
@Column(name="owned_date", nullable=false)
private Date ownedDate;
public TaxonomyCwrCrop() {
}
public TaxonomyCwrCrop(int id) {
this.id = id;
}
public Cooperator getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Cooperator createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public String getCropName() {
return cropName;
}
public void setCropName(String cropName) {
this.cropName = cropName;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Cooperator getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(Cooperator modifiedBy) {
this.modifiedBy = modifiedBy;
}
public Date getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public Cooperator getOwnedBy() {
return ownedBy;
}
public void setOwnedBy(Cooperator ownedBy) {
this.ownedBy = ownedBy;
}
public Date getOwnedDate() {
return ownedDate;
}
public void setOwnedDate(Date ownedDate) {
this.ownedDate = ownedDate;
}
}
\ No newline at end of file
package org.gringlobal.model;
import java.util.*;
import javax.persistence.*;
/**
* Auto-generated by:
* org.apache.openjpa.jdbc.meta.ReverseMappingTool$AnnotatedCodeGenerator
*/
@Entity
@Table(name="taxonomy_cwr_map")
public class TaxonomyCwrMap {
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="citation_id")
private Citation citation;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="created_by", nullable=false)
private Cooperator createdBy;
@Basic
@Column(name="created_date", nullable=false)
private Date createdDate;
@Basic
@Column(name="crop_common_name", columnDefinition="nvarchar", length=100)
private String cropCommonName;
@Basic
@Column(name="genepool_code", columnDefinition="nvarchar", length=20)
private String genepoolCode;
@Id
@Column(name="taxonomy_cwr_map_id", columnDefinition="int identity")
private int id;
@Basic
@Column(name="is_crop", columnDefinition="nvarchar", nullable=false, length=1)
private String isCrop;
@Basic
@Column(name="is_graftstock", columnDefinition="nvarchar", nullable=false, length=1)
private String isGraftstock;
@Basic
@Column(name="is_potential", columnDefinition="nvarchar", nullable=false, length=1)
private String isPotential;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="modified_by")
private Cooperator modifiedBy;
@Basic
@Column(name="modified_date")
private Date modifiedDate;
@Basic
@Column(columnDefinition="nvarchar", length=2147483647)
private String note;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="owned_by", nullable=false)
private Cooperator ownedBy;
@Basic
@Column(name="owned_date", nullable=false)
private Date ownedDate;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="taxonomy_cwr_crop_id", nullable=false)
private TaxonomyCwrCrop taxonomyCwrCrop;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="taxonomy_species_id", nullable=false)
private TaxonomySpecies taxonomySpecies;
public TaxonomyCwrMap() {
}
public TaxonomyCwrMap(int id) {
this.id = id;
}
public Citation getCitation() {
return citation;
}
public void setCitation(Citation citation) {
this.citation = citation;
}
public Cooperator getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Cooperator createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public String getCropCommonName() {
return cropCommonName;
}
public void setCropCommonName(String cropCommonName) {
this.cropCommonName = cropCommonName;
}
public String getGenepoolCode() {
return genepoolCode;
}
public void setGenepoolCode(String genepoolCode) {
this.genepoolCode = genepoolCode;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getIsCrop() {
return isCrop;
}
public void setIsCrop(String isCrop) {
this.isCrop = isCrop;
}
public String getIsGraftstock() {
return isGraftstock;
}
public void setIsGraftstock(String isGraftstock) {
this.isGraftstock = isGraftstock;
}
public String getIsPotential() {
return isPotential;
}
public void setIsPotential(String isPotential) {
this.isPotential = isPotential;
}
public Cooperator getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(Cooperator modifiedBy) {
this.modifiedBy = modifiedBy;
}
public Date getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public Cooperator getOwnedBy() {
return ownedBy;
}
public void setOwnedBy(Cooperator ownedBy) {
this.ownedBy = ownedBy;
}
public Date getOwnedDate() {
return ownedDate;
}
public void setOwnedDate(Date ownedDate) {
this.ownedDate = ownedDate;
}
public TaxonomyCwrCrop getTaxonomyCwrCrop() {
return taxonomyCwrCrop;
}
public void setTaxonomyCwrCrop(TaxonomyCwrCrop taxonomyCwrCrop) {
this.taxonomyCwrCrop = taxonomyCwrCrop;
}
public TaxonomySpecies getTaxonomySpecies() {
return taxonomySpecies;
}
public void setTaxonomySpecies(TaxonomySpecies taxonomySpecies) {
this.taxonomySpecies = taxonomySpecies;
}
}
\ No newline at end of file
package org.gringlobal.model;
import java.util.*;
import javax.persistence.*;
/**
* Auto-generated by:
* org.apache.openjpa.jdbc.meta.ReverseMappingTool$AnnotatedCodeGenerator
*/
@Entity
@Table(name="taxonomy_cwr_trait")
public class TaxonomyCwrTrait {
@Basic
@Column(name="breeding_type_code", columnDefinition="nvarchar", length=20)
private String breedingTypeCode;
@Basic
@Column(name="breeding_usage_note", columnDefinition="nvarchar", length=1000)
private String breedingUsageNote;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="citation_id")
private Citation citation;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="created_by", nullable=false)
private Cooperator createdBy;
@Basic
@Column(name="created_date", nullable=false)
private Date createdDate;
@Id
@Column(name="taxonomy_cwr_trait_id", columnDefinition="int identity")
private int id;
@Basic
@Column(name="is_potential", columnDefinition="nvarchar", nullable=false, length=1)
private String isPotential;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="modified_by")
private Cooperator modifiedBy;
@Basic
@Column(name="modified_date")
private Date modifiedDate;
@Basic
@Column(columnDefinition="nvarchar", length=2147483647)
private String note;
@Basic
@Column(name="ontology_trait_identifier", columnDefinition="nvarchar", length=20)
private String ontologyTraitIdentifier;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="owned_by", nullable=false)
private Cooperator ownedBy;
@Basic
@Column(name="owned_date", nullable=false)
private Date ownedDate;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="taxonomy_cwr_map_id", nullable=false)
private TaxonomyCwrMap taxonomyCwrMap;
@Basic
@Column(name="trait_class_code", columnDefinition="nvarchar", length=20)
private String traitClassCode;
public TaxonomyCwrTrait() {
}
public TaxonomyCwrTrait(int id) {
this.id = id;
}
public String getBreedingTypeCode() {
return breedingTypeCode;
}
public void setBreedingTypeCode(String breedingTypeCode) {
this.breedingTypeCode = breedingTypeCode;
}
public String getBreedingUsageNote() {
return breedingUsageNote;
}
public void setBreedingUsageNote(String breedingUsageNote) {
this.breedingUsageNote = breedingUsageNote;
}
public Citation getCitation() {
return citation;
}
public void setCitation(Citation citation) {
this.citation = citation;
}
public Cooperator getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Cooperator createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getIsPotential() {
return isPotential;
}
public void setIsPotential(String isPotential) {
this.isPotential = isPotential;
}
public Cooperator getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(Cooperator modifiedBy) {
this.modifiedBy = modifiedBy;
}
public Date getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public String getOntologyTraitIdentifier() {
return ontologyTraitIdentifier;
}
public void setOntologyTraitIdentifier(String ontologyTraitIdentifier) {
this.ontologyTraitIdentifier = ontologyTraitIdentifier;
}
public Cooperator getOwnedBy() {
return ownedBy;
}
public void setOwnedBy(Cooperator ownedBy) {
this.ownedBy = ownedBy;
}
public Date getOwnedDate() {
return ownedDate;
}
public void setOwnedDate(Date ownedDate) {
this.ownedDate = ownedDate;
}
public TaxonomyCwrMap getTaxonomyCwrMap() {
return taxonomyCwrMap;
}
public void setTaxonomyCwrMap(TaxonomyCwrMap taxonomyCwrMap) {
this.taxonomyCwrMap = taxonomyCwrMap;
}
public String getTraitClassCode() {
return traitClassCode;
}
public void setTraitClassCode(String traitClassCode) {
this.traitClassCode = traitClassCode;
}
}
\ No newline at end of file
package org.gringlobal.model;
import java.util.*;
import javax.persistence.*;
/**
* Auto-generated by:
* org.apache.openjpa.jdbc.meta.ReverseMappingTool$AnnotatedCodeGenerator
*/
@Entity
@Table(name="taxonomy_regulation")
public class TaxonomyRegulation {
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="created_by", nullable=false)
private Cooperator createdBy;
@Basic
@Column(name="created_date", nullable=false)
private Date createdDate;
@Basic
@Column(columnDefinition="nvarchar", length=80)
private String description;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="geography_id", nullable=false)
private Geography geography;
@Id
@Column(name="taxonomy_regulation_id", columnDefinition="int identity")
private int id;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="modified_by")
private Cooperator modifiedBy;
@Basic
@Column(name="modified_date")
private Date modifiedDate;
@Basic
@Column(columnDefinition="nvarchar", length=2147483647)
private String note;
@ManyToOne(fetch=FetchType.LAZY, cascade = { })
@JoinColumn(name="owned_by", nullable=false)
private Cooperator ownedBy;
@Basic
@Column(name="owned_date", nullable=false)
private Date ownedDate;
@Basic
@Column(name="regulation_level_code", columnDefinition="nvarchar", length=20)
private String regulationLevelCode;
@Basic
@Column(name="regulation_type_code", columnDefinition="nvarchar", nullable=false, length=20)
private String regulationTypeCode;
@Basic
@Column(name="url_1", columnDefinition="nvarchar", length=250)
private String url1;
@Basic
@Column(name="url_2", columnDefinition="nvarchar", length=250)
private String url2;
public TaxonomyRegulation() {
}
public TaxonomyRegulation(int id) {
this.id = id;
}
public Cooperator getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Cooperator createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Geography getGeography() {
return geography;
}
public void setGeography(Geography geography) {
this.geography = geography;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Cooperator getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(Cooperator modifiedBy) {
this.modifiedBy = modifiedBy;
}
public Date getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public Cooperator getOwnedBy() {
return ownedBy;
}
public void setOwnedBy(Cooperator ownedBy) {
this.ownedBy = ownedBy;
}
public Date getOwnedDate() {
return ownedDate;
}
public void setOwnedDate(Date ownedDate) {
this.ownedDate = ownedDate;