Project

General

Profile

« Previous | Next » 

Revision d2db93fb

Added by Andreas Müller almost 13 years ago

add PolytomousKey cache strategy and cascading PolytomousKeyNode-> PolytomousKey

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/PolytomousKey.java
43 43
import eu.etaxonomy.cdm.model.location.NamedArea;
44 44
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
45 45
import eu.etaxonomy.cdm.model.taxon.Taxon;
46
import eu.etaxonomy.cdm.strategy.cache.description.PolytomousKeyDefaultCacheStrategy;
46 47
import eu.etaxonomy.cdm.strategy.generate.PolytomousKeyGenerator;
47 48

  
48 49
/**
......
71 72
@Entity
72 73
@Indexed(index = "eu.etaxonomy.cdm.model.media.FeatureTree")
73 74
@Audited
74
public class PolytomousKey extends IdentifiableEntity implements IIdentificationKey {
75
public class PolytomousKey extends IdentifiableEntity<PolytomousKeyDefaultCacheStrategy> implements IIdentificationKey {
75 76
	private static final long serialVersionUID = -3368243754557343942L;
76 77
	private static final Logger logger = Logger.getLogger(PolytomousKey.class);
77 78

  
......
117 118
	@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
118 119
	private PolytomousKeyNode root;
119 120

  
120
	// ******************************** STATIC METHODS
121
	// ********************************/
121
// ***************** STATIC METHODS ********************************/
122 122

  
123 123
	/**
124 124
	 * Creates a new empty identification multi-access key instance.
......
136 136
		return result;
137 137
	}
138 138

  
139
	// ************************** CONSTRUCTOR
140
	// *******************************************/
139
// ************************** CONSTRUCTOR ************************/
141 140

  
142 141
	/**
143 142
	 * Class constructor: creates a new empty multi-access key instance.
......
146 145
		super();
147 146
		root = PolytomousKeyNode.NewRootInstance();
148 147
		root.setKey(this);
148
		this.cacheStrategy = PolytomousKeyDefaultCacheStrategy.NewInstance();
149 149
	}
150 150

  
151 151
	// ************************ GETTER/ SETTER
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/PolytomousKeyNode.java
116 116
	@XmlIDREF
117 117
	@XmlSchemaType(name = "IDREF")
118 118
	@ManyToOne(fetch = FetchType.LAZY)
119
	@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
119 120
	private PolytomousKey key;
120 121

  
121 122
	@XmlElementWrapper(name = "Children")

Also available in: Unified diff