Commit 1535b255 authored by Matija Obreza's avatar Matija Obreza
Browse files

Use new table names

parent 60b94b7c
......@@ -27,7 +27,7 @@ import javax.persistence.Table;
* AllAccnames generated by hbm2java
*/
@Entity
@Table(name = "all_accnames")
@Table(name = "accnames")
public class AllAccnames implements java.io.Serializable {
/**
......
......@@ -27,7 +27,7 @@ import javax.persistence.Table;
* AllAcqBreeding generated by hbm2java
*/
@Entity
@Table(name = "all_acq_breeding")
@Table(name = "acq_breeding")
public class AllAcqBreeding implements java.io.Serializable {
/**
......
......@@ -27,7 +27,7 @@ import javax.persistence.Table;
* AllAcqCollect generated by hbm2java
*/
@Entity
@Table(name = "all_acq_collect")
@Table(name = "acq_collect")
public class AllAcqCollect implements java.io.Serializable {
/**
......
......@@ -27,7 +27,7 @@ import javax.persistence.Table;
* AllAcqExchange generated by hbm2java
*/
@Entity
@Table(name = "all_acq_exchange")
@Table(name = "acq_exchange")
public class AllAcqExchange implements java.io.Serializable {
/**
......
......@@ -24,7 +24,7 @@ import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "all_environment")
@Table(name = "environment")
public class AllEnvironment implements java.io.Serializable {
/**
......
......@@ -36,7 +36,7 @@ import org.hibernate.search.annotations.Store;
@Entity
// Add index on genus, genus+species
@Table(name = "all_taxonomy", uniqueConstraints = { @UniqueConstraint(columnNames = { "Taxon_Name" }) })
@Table(name = "taxonomy", uniqueConstraints = { @UniqueConstraint(columnNames = { "Taxon_Name" }) })
@Indexed
public class Taxonomy implements java.io.Serializable {
......
......@@ -101,13 +101,13 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
StringBuffer sb = new StringBuffer();
sb.append(" from accession a ");
if (jsonTree.has("crop") || jsonTree.has("genus") || jsonTree.has("taxon")) {
sb.append(" inner join all_taxonomy t on t.Taxon_Code=a.Taxon_Code ");
sb.append(" inner join taxonomy t on t.Taxon_Code=a.Taxon_Code ");
if (jsonTree.has("crop")) {
sb.append(" inner join croptaxonomy ct on ct.taxonomyId=t.Taxon_Code inner join crop on crop.id=ct.cropId ");
}
}
if (jsonTree.has("lat") || jsonTree.has("lon") || jsonTree.has("alt")) {
sb.append(" inner join all_environment env on env.ALIS_Id=a.id ");
sb.append(" inner join environment env on env.ALIS_Id=a.id ");
}
if (jsonTree.has("organization")) {
sb.append(" inner join faoinstitute fao on fao.id=a.instituteId inner join organizationinstitute oi on oi.instituteId=fao.id inner join organization org on org.id=oi.organizationId ");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment