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; ...@@ -27,7 +27,7 @@ import javax.persistence.Table;
* AllAccnames generated by hbm2java * AllAccnames generated by hbm2java
*/ */
@Entity @Entity
@Table(name = "all_accnames") @Table(name = "accnames")
public class AllAccnames implements java.io.Serializable { public class AllAccnames implements java.io.Serializable {
/** /**
......
...@@ -27,7 +27,7 @@ import javax.persistence.Table; ...@@ -27,7 +27,7 @@ import javax.persistence.Table;
* AllAcqBreeding generated by hbm2java * AllAcqBreeding generated by hbm2java
*/ */
@Entity @Entity
@Table(name = "all_acq_breeding") @Table(name = "acq_breeding")
public class AllAcqBreeding implements java.io.Serializable { public class AllAcqBreeding implements java.io.Serializable {
/** /**
......
...@@ -27,7 +27,7 @@ import javax.persistence.Table; ...@@ -27,7 +27,7 @@ import javax.persistence.Table;
* AllAcqCollect generated by hbm2java * AllAcqCollect generated by hbm2java
*/ */
@Entity @Entity
@Table(name = "all_acq_collect") @Table(name = "acq_collect")
public class AllAcqCollect implements java.io.Serializable { public class AllAcqCollect implements java.io.Serializable {
/** /**
......
...@@ -27,7 +27,7 @@ import javax.persistence.Table; ...@@ -27,7 +27,7 @@ import javax.persistence.Table;
* AllAcqExchange generated by hbm2java * AllAcqExchange generated by hbm2java
*/ */
@Entity @Entity
@Table(name = "all_acq_exchange") @Table(name = "acq_exchange")
public class AllAcqExchange implements java.io.Serializable { public class AllAcqExchange implements java.io.Serializable {
/** /**
......
...@@ -24,7 +24,7 @@ import javax.persistence.Id; ...@@ -24,7 +24,7 @@ import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
@Entity @Entity
@Table(name = "all_environment") @Table(name = "environment")
public class AllEnvironment implements java.io.Serializable { public class AllEnvironment implements java.io.Serializable {
/** /**
......
...@@ -36,7 +36,7 @@ import org.hibernate.search.annotations.Store; ...@@ -36,7 +36,7 @@ import org.hibernate.search.annotations.Store;
@Entity @Entity
// Add index on genus, genus+species // Add index on genus, genus+species
@Table(name = "all_taxonomy", uniqueConstraints = { @UniqueConstraint(columnNames = { "Taxon_Name" }) }) @Table(name = "taxonomy", uniqueConstraints = { @UniqueConstraint(columnNames = { "Taxon_Name" }) })
@Indexed @Indexed
public class Taxonomy implements java.io.Serializable { public class Taxonomy implements java.io.Serializable {
......
...@@ -101,13 +101,13 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -101,13 +101,13 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
sb.append(" from accession a "); sb.append(" from accession a ");
if (jsonTree.has("crop") || jsonTree.has("genus") || jsonTree.has("taxon")) { 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")) { if (jsonTree.has("crop")) {
sb.append(" inner join croptaxonomy ct on ct.taxonomyId=t.Taxon_Code inner join crop on crop.id=ct.cropId "); 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")) { 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")) { 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 "); 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 ");
......
Supports Markdown
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