Project

General

Profile

« Previous | Next » 

Revision 9f53671d

Added by Cherian Mathew about 9 years ago

EditConceptRelationshipComposite : updated composite for new and edit functionality
IdAndUuid -> IdAndUuidName : new identity object with name
NewTaxonBaseComposite, StatusComposite, NewTaxonBasePresenter, IConceptRelationshipComponentListener, INewTaxonBaseComponentListener : changed IdUuid to IdUuidName
ConceptRelationshipPresenter, ConceptRelationshipPresenterTest(.xml) : added update and delete methods for relationships
CdmQueryFactory : updated relationship query to include classification

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/util/CdmQueryFactory.java
105 105
    	return generateQueryDelegate(SELECT_QUERY, COUNT_QUERY, CONTAINS_QUERY);
106 106
    }
107 107

  
108
    public static QueryDelegate generateTaxonRelatedToQuery() throws SQLException {
109
        String FROM_QUERY = " FROM TaxonRelationship tr inner join TaxonBase tb on tr.relatedto_id = tb.id";
110
        String SELECT_QUERY= "SELECT tr.id, tr.uuid, tb.titleCache" + FROM_QUERY;
108
    public static QueryDelegate generateTaxonRelatedToQuery(String reluuid_id,
109
            String reltype_id,
110
            String to_id,
111
            String touuid_id,
112
            String toname_id) throws SQLException {
113
        String FROM_QUERY = "     FROM TaxonRelationship tr " +
114
                "INNER JOIN TaxonBase tb on tr.relatedto_id = tb.id " +
115
                "INNER JOIN TaxonNode tn on tb.id = tn.taxon_id ";
116
        String SELECT_QUERY= "SELECT tr.id as " + ID +
117
                ", tr.uuid as " + reluuid_id +
118
                ", tr.type_id as " + reltype_id +
119
                ", tr.relatedto_id as " + to_id +
120
                ", tb.uuid as " + touuid_id +
121
                ", tb.titleCache as " + toname_id +
122
                FROM_QUERY;
111 123
        String COUNT_QUERY = "SELECT count(*) " + FROM_QUERY;
112 124
        String CONTAINS_QUERY = "SELECT * FROM TaxonRelationship tr where tr.relatedfrom_id = ?";
113 125

  

Also available in: Unified diff