Skip to content

Commit

Permalink
Release 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Viras- committed Jan 27, 2019
2 parents 61a5761 + 141495a commit f12b9f6
Show file tree
Hide file tree
Showing 50 changed files with 2,393 additions and 83 deletions.
713 changes: 713 additions & 0 deletions jacq-birt/seedorder.rptdesign

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jacq-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jacq</artifactId>
<groupId>org.jacq</groupId>
<version>0.7.0</version>
<version>0.8.0</version>
<relativePath>../jacq/pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public abstract class BaseDerivativeManager {
protected static final Logger LOGGER = Logger.getLogger(BaseDerivativeManager.class.getName());

// select list for fields
protected static final String SELECT_FIELDS = "SELECT `derivative_id`, `botanical_object_id`, `scientific_name`, `scientific_name_id`, `accession_number`, `label_annotation`, `organisation_description`, `organisation_id`, `place_number`, `derivative_count`, `type`, `separated`, `cultivar_name`, `imported_species_name`, `index_seminum`, `gathering_location`, `exhibition`, `working`";
protected static final String SELECT_FIELDS = "SELECT `derivative_id`, `botanical_object_id`, `scientific_name`, `scientific_name_id`, `accession_number`, `label_annotation`, `organisation_description`, `organisation_id`, `place_number`, `derivative_count`, `type`, `separated`, `cultivar_name`, `imported_species_name`, `index_seminum`, `gathering_location`, `exhibition`, `working`, `ipen_number`";

// select for counting
protected static final String SELECT_COUNT = "SELECT count(*) AS `row_count`";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 fhafner.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,6 +26,8 @@
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
Expand All @@ -38,7 +40,7 @@

/**
*
* @author fhafner
* @author wkoller
*/
@Entity
@Table(name = "tbl_derivative")
Expand All @@ -59,17 +61,19 @@ public class TblDerivative implements Serializable {
@Basic(optional = false)
@NotNull
@Column(name = "count")
private Long count;
private long count;
@Basic(optional = false)
@NotNull
@Column(name = "price")
private float price;
@ManyToMany(mappedBy = "tblDerivativeList", fetch = FetchType.LAZY)
private List<TblSeedOrder> tblSeedOrderList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "derivativeId", fetch = FetchType.LAZY, orphanRemoval = true)
private List<TblSeparation> tblSeparationList;
@OneToOne(cascade = CascadeType.ALL, mappedBy = "tblDerivative", fetch = FetchType.LAZY)
private TblVegetative tblVegetative;
private TblSeed tblSeed;
@OneToOne(cascade = CascadeType.ALL, mappedBy = "tblDerivative", fetch = FetchType.LAZY)
private TblSpecimen tblSpecimen;
private TblVegetative tblVegetative;
@JoinColumn(name = "botanical_object_id", referencedColumnName = "id")
@ManyToOne(optional = false, fetch = FetchType.LAZY)
private TblBotanicalObject botanicalObjectId;
Expand All @@ -96,7 +100,7 @@ public TblDerivative(Long derivativeId) {
this.derivativeId = derivativeId;
}

public TblDerivative(Long derivativeId, Long count, float price) {
public TblDerivative(Long derivativeId, long count, float price) {
this.derivativeId = derivativeId;
this.count = count;
this.price = price;
Expand All @@ -110,11 +114,11 @@ public void setDerivativeId(Long derivativeId) {
this.derivativeId = derivativeId;
}

public Long getCount() {
public long getCount() {
return count;
}

public void setCount(Long count) {
public void setCount(long count) {
this.count = count;
}

Expand All @@ -126,6 +130,15 @@ public void setPrice(float price) {
this.price = price;
}

@XmlTransient
public List<TblSeedOrder> getTblSeedOrderList() {
return tblSeedOrderList;
}

public void setTblSeedOrderList(List<TblSeedOrder> tblSeedOrderList) {
this.tblSeedOrderList = tblSeedOrderList;
}

@XmlTransient
public List<TblSeparation> getTblSeparationList() {
return tblSeparationList;
Expand All @@ -135,20 +148,20 @@ public void setTblSeparationList(List<TblSeparation> tblSeparationList) {
this.tblSeparationList = tblSeparationList;
}

public TblVegetative getTblVegetative() {
return tblVegetative;
public TblSeed getTblSeed() {
return tblSeed;
}

public void setTblVegetative(TblVegetative tblVegetative) {
this.tblVegetative = tblVegetative;
public void setTblSeed(TblSeed tblSeed) {
this.tblSeed = tblSeed;
}

public TblSpecimen getTblSpecimen() {
return tblSpecimen;
public TblVegetative getTblVegetative() {
return tblVegetative;
}

public void setTblSpecimen(TblSpecimen tblSpecimen) {
this.tblSpecimen = tblSpecimen;
public void setTblVegetative(TblVegetative tblVegetative) {
this.tblVegetative = tblVegetative;
}

public TblBotanicalObject getBotanicalObjectId() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 wkoller.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,7 +63,8 @@
, @NamedQuery(name = "TblLivingPlant.findByBgci", query = "SELECT t FROM TblLivingPlant t WHERE t.bgci = :bgci")
, @NamedQuery(name = "TblLivingPlant.findByReviewed", query = "SELECT t FROM TblLivingPlant t WHERE t.reviewed = :reviewed")
, @NamedQuery(name = "TblLivingPlant.findByHasImage", query = "SELECT t FROM TblLivingPlant t WHERE t.hasImage = :hasImage")
, @NamedQuery(name = "TblLivingPlant.findByHasPublicImage", query = "SELECT t FROM TblLivingPlant t WHERE t.hasPublicImage = :hasPublicImage")})
, @NamedQuery(name = "TblLivingPlant.findByHasPublicImage", query = "SELECT t FROM TblLivingPlant t WHERE t.hasPublicImage = :hasPublicImage")
, @NamedQuery(name = "TblLivingPlant.findBySeminumCount", query = "SELECT t FROM TblLivingPlant t WHERE t.seminumCount = :seminumCount")})
public class TblLivingPlant implements Serializable {

private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -128,6 +129,10 @@ public class TblLivingPlant implements Serializable {
@NotNull
@Column(name = "has_public_image")
private boolean hasPublicImage;
@Basic(optional = false)
@NotNull
@Column(name = "seminum_count")
private long seminumCount;
@JoinTable(name = "tbl_relevancy", joinColumns = {
@JoinColumn(name = "living_plant_id", referencedColumnName = "id")}, inverseJoinColumns = {
@JoinColumn(name = "relevancy_type_id", referencedColumnName = "id")})
Expand All @@ -139,17 +144,17 @@ public class TblLivingPlant implements Serializable {
private List<TblLivingPlantTreeRecordFilePage> tblLivingPlantTreeRecordFilePageList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "botanicalObjectId", fetch = FetchType.LAZY)
private List<FrmwrkaccessBotanicalObject> frmwrkaccessBotanicalObjectList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "livingPlantId", fetch = FetchType.LAZY, orphanRemoval = true)
@OneToMany(cascade = CascadeType.ALL, mappedBy = "livingPlantId", fetch = FetchType.LAZY)
private List<TblCertificate> tblCertificateList;
@JoinColumn(name = "id", referencedColumnName = "derivative_id", insertable = false, updatable = false)
@OneToOne(optional = false, fetch = FetchType.LAZY)
private TblDerivative tblDerivative;
@JoinColumn(name = "incoming_date_id", referencedColumnName = "id")
@ManyToOne(fetch = FetchType.LAZY)
private TblAcquisitionDate incomingDateId;
@JoinColumn(name = "cultivar_id", referencedColumnName = "cultivar_id")
@ManyToOne(fetch = FetchType.LAZY)
private TblCultivar cultivarId;
@JoinColumn(name = "id", referencedColumnName = "derivative_id", insertable = false, updatable = false)
@OneToOne(optional = false, fetch = FetchType.LAZY)
private TblDerivative tblDerivative;
@JoinColumn(name = "index_seminum_type_id", referencedColumnName = "id")
@ManyToOne(fetch = FetchType.LAZY)
private TblIndexSeminumType indexSeminumTypeId;
Expand All @@ -161,7 +166,7 @@ public TblLivingPlant(Long id) {
this.id = id;
}

public TblLivingPlant(Long id, long accessionNumber, boolean ipenLocked, String ipenType, boolean phytoControl, boolean indexSeminum, boolean bgci, boolean reviewed, boolean hasImage, boolean hasPublicImage) {
public TblLivingPlant(Long id, long accessionNumber, boolean ipenLocked, String ipenType, boolean phytoControl, boolean indexSeminum, boolean bgci, boolean reviewed, boolean hasImage, boolean hasPublicImage, long seminumCount) {
this.id = id;
this.accessionNumber = accessionNumber;
this.ipenLocked = ipenLocked;
Expand All @@ -172,6 +177,7 @@ public TblLivingPlant(Long id, long accessionNumber, boolean ipenLocked, String
this.reviewed = reviewed;
this.hasImage = hasImage;
this.hasPublicImage = hasPublicImage;
this.seminumCount = seminumCount;
}

public Long getId() {
Expand Down Expand Up @@ -302,6 +308,14 @@ public void setHasPublicImage(boolean hasPublicImage) {
this.hasPublicImage = hasPublicImage;
}

public long getSeminumCount() {
return seminumCount;
}

public void setSeminumCount(long seminumCount) {
this.seminumCount = seminumCount;
}

@XmlTransient
public List<TblRelevancyType> getTblRelevancyTypeList() {
return tblRelevancyTypeList;
Expand Down Expand Up @@ -347,14 +361,6 @@ public void setTblCertificateList(List<TblCertificate> tblCertificateList) {
this.tblCertificateList = tblCertificateList;
}

public TblDerivative getTblDerivative() {
return tblDerivative;
}

public void setTblDerivative(TblDerivative tblDerivative) {
this.tblDerivative = tblDerivative;
}

public TblAcquisitionDate getIncomingDateId() {
return incomingDateId;
}
Expand All @@ -371,6 +377,14 @@ public void setCultivarId(TblCultivar cultivarId) {
this.cultivarId = cultivarId;
}

public TblDerivative getTblDerivative() {
return tblDerivative;
}

public void setTblDerivative(TblDerivative tblDerivative) {
this.tblDerivative = tblDerivative;
}

public TblIndexSeminumType getIndexSeminumTypeId() {
return indexSeminumTypeId;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 wkoller.
* Copyright 2019 wkoller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,7 +52,13 @@
, @NamedQuery(name = "TblOrganisation.findByGreenhouse", query = "SELECT t FROM TblOrganisation t WHERE t.greenhouse = :greenhouse")
, @NamedQuery(name = "TblOrganisation.findByIpenCode", query = "SELECT t FROM TblOrganisation t WHERE t.ipenCode = :ipenCode")
, @NamedQuery(name = "TblOrganisation.findByIndexSeminumStart", query = "SELECT t FROM TblOrganisation t WHERE t.indexSeminumStart = :indexSeminumStart")
, @NamedQuery(name = "TblOrganisation.findByAccessionStart", query = "SELECT t FROM TblOrganisation t WHERE t.accessionStart = :accessionStart")})
, @NamedQuery(name = "TblOrganisation.findByAccessionStart", query = "SELECT t FROM TblOrganisation t WHERE t.accessionStart = :accessionStart")
, @NamedQuery(name = "TblOrganisation.findByAddress", query = "SELECT t FROM TblOrganisation t WHERE t.address = :address")
, @NamedQuery(name = "TblOrganisation.findByCity", query = "SELECT t FROM TblOrganisation t WHERE t.city = :city")
, @NamedQuery(name = "TblOrganisation.findByPostcode", query = "SELECT t FROM TblOrganisation t WHERE t.postcode = :postcode")
, @NamedQuery(name = "TblOrganisation.findByCountry", query = "SELECT t FROM TblOrganisation t WHERE t.country = :country")
, @NamedQuery(name = "TblOrganisation.findByPhone", query = "SELECT t FROM TblOrganisation t WHERE t.phone = :phone")
, @NamedQuery(name = "TblOrganisation.findByEmail", query = "SELECT t FROM TblOrganisation t WHERE t.email = :email")})
public class TblOrganisation implements Serializable {

private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -82,6 +88,30 @@ public class TblOrganisation implements Serializable {
@NotNull
@Column(name = "accession_start")
private boolean accessionStart;
@Size(max = 45)
@Column(name = "address")
private String address;
@Size(max = 45)
@Column(name = "city")
private String city;
@Size(max = 45)
@Column(name = "postcode")
private String postcode;
@Size(max = 45)
@Column(name = "country")
private String country;
// @Pattern(regexp="^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$", message="Invalid phone/fax format, should be as xxx-xxx-xxxx")//if the field contains phone or fax number consider using this annotation to enforce field validation
@Size(max = 45)
@Column(name = "phone")
private String phone;
// @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
@Size(max = 45)
@Column(name = "email")
private String email;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "senderOrganisationId", fetch = FetchType.LAZY)
private List<TblSeedOrder> tblSeedOrderList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "ordererOrganisationId", fetch = FetchType.LAZY)
private List<TblSeedOrder> tblSeedOrderList1;
@OneToMany(mappedBy = "parentOrganisationId", fetch = FetchType.LAZY)
private List<TblOrganisation> tblOrganisationList;
@JoinColumn(name = "parent_organisation_id", referencedColumnName = "id")
Expand Down Expand Up @@ -171,6 +201,72 @@ public void setAccessionStart(boolean accessionStart) {
this.accessionStart = accessionStart;
}

public String getAddress() {
return address;
}

public void setAddress(String address) {
this.address = address;
}

public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

public String getPostcode() {
return postcode;
}

public void setPostcode(String postcode) {
this.postcode = postcode;
}

public String getCountry() {
return country;
}

public void setCountry(String country) {
this.country = country;
}

public String getPhone() {
return phone;
}

public void setPhone(String phone) {
this.phone = phone;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

@XmlTransient
public List<TblSeedOrder> getTblSeedOrderList() {
return tblSeedOrderList;
}

public void setTblSeedOrderList(List<TblSeedOrder> tblSeedOrderList) {
this.tblSeedOrderList = tblSeedOrderList;
}

@XmlTransient
public List<TblSeedOrder> getTblSeedOrderList1() {
return tblSeedOrderList1;
}

public void setTblSeedOrderList1(List<TblSeedOrder> tblSeedOrderList1) {
this.tblSeedOrderList1 = tblSeedOrderList1;
}

@XmlTransient
public List<TblOrganisation> getTblOrganisationList() {
return tblOrganisationList;
Expand Down
Loading

0 comments on commit f12b9f6

Please sign in to comment.