Project

General

Profile

« Previous | Next » 

Revision 7e2465ad

Added by Katja Luther over 6 years ago

fix potential multiple representation exceptions in distribution editor, session dispose did not work

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditorInput.java
46 46

  
47 47
    private final ConversationHolder conversation;
48 48

  
49
    private List<TaxonBase> taxaToSave = new ArrayList();
50

  
49 51

  
50 52
    /**
51 53
     * Creates an editor input for the {@link ChecklistView} with the currently selected TaxonNode
......
130 132

  
131 133

  
132 134

  
133
    /* (non-Javadoc)
134
     * @see java.lang.Object#hashCode()
135
     */
136
    @Override
137
    public int hashCode() {
138
        final int prime = 31;
139
        int result = 1;
140
        result = prime * result + ((classification == null) ? 0 : classification.hashCode());
141
        result = prime * result + ((taxonNode == null) ? 0 : taxonNode.hashCode());
142
        return result;
143
    }
135
//    /* (non-Javadoc)
136
//     * @see java.lang.Object#hashCode()
137
//     */
138
//    @Override
139
//    public int hashCode() {
140
//        final int prime = 31;
141
//        int result = 1;
142
//        result = prime * result + ((classification == null) ? 0 : classification.hashCode());
143
//        result = prime * result + ((taxonNode == null) ? 0 : taxonNode.hashCode());
144
//        return result;
145
//    }
144 146

  
145 147
    /* (non-Javadoc)
146 148
     * @see java.lang.Object#equals(java.lang.Object)
......
184 186

  
185 187
    @Override
186 188
    public void merge() {
187
        CdmStore.getService(ITaxonService.class).merge(taxa, true);
189
        if (!getCdmEntitySession().isActive()){
190
            getCdmEntitySession().bind();
191
        }
192
        CdmStore.getService(ITaxonService.class).merge(taxaToSave, true);
188 193
    }
189 194

  
190 195
    /* (non-Javadoc)
......
254 259

  
255 260
	}
256 261

  
262

  
263
    /**
264
     * @param element
265
     */
266
    public void addTaxonToSave(Taxon element) {
267
        this.taxaToSave.add(element);
268

  
269
    }
270

  
257 271
//    @Override
258 272
//    public void dispose(){
259 273
//    	conversation.unbind();

Also available in: Unified diff