Project

General

Profile

Revision f0559e00

IDf0559e00a87ec517b860678d7209f72c20b45679
Parent 30d532b8
Child 39d13a15

Added by Andreas Müller over 3 years ago

fix #6449 Add convenience method to set both caches as protected

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/IReference.java
9 9

  
10 10
package eu.etaxonomy.cdm.model.reference;
11 11

  
12
import java.beans.Transient;
12 13
import java.net.URI;
13 14

  
14 15
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
......
137 138
	 */
138 139
	public Object clone();
139 140

  
141
    /**
142
     * Sets both caches and protects them.
143
     * This is a convenience method to avoid
144
     * references with only one cache protected
145
     * leading to strange results in case the other
146
     * cache is used.
147
     *
148
     * https://dev.e-taxonomy.eu/redmine/issues/6449
149
     *
150
     * @see #setTitleCache(String)
151
     * @see #setTitleCache(String, boolean)
152
     * @see #setProtectedTitleCache(boolean)
153
     * @see #setAbbrevTitleCache(String)
154
     * @see #setAbbrevTitleCache(String, boolean)
155
     * @see #setProtectedAbbrevTitleCache(boolean)
156
     */
157
	@Transient
158
	@javax.persistence.Transient
159
    void setTitleCaches(String cache);
160

  
140 161
}
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Reference.java
368 368

  
369 369
//*************************** GETTER / SETTER ******************************************/
370 370

  
371

  
372

  
371 373
    // @Transient  - must not be transient, since this property needs to to be included in all serializations produced by the remote layer
372 374
    @Override
373 375
    public String getTitleCache(){
......
734 736

  
735 737
//****************************************************  /
736 738

  
739
	@Transient
740
	@Override
741
	public void setTitleCaches(String cache){
742
	    this.setAbbrevTitleCache(cache, true);
743
	    this.setTitleCache(cache, true);
744
	}
745

  
737 746

  
738 747
	/**
739 748
	 * Returns a formatted string containing the entire reference citation,

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)