Revision 4208745a
Added by Ben Clark over 15 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/occurrence/Specimen.java | ||
---|---|---|
22 | 22 |
|
23 | 23 |
import org.apache.log4j.Logger; |
24 | 24 |
import org.hibernate.envers.Audited; |
25 |
import org.springframework.beans.factory.annotation.Configurable; |
|
26 |
|
|
27 |
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy; |
|
28 |
import eu.etaxonomy.cdm.strategy.cache.common.IdentifiableEntityDefaultCacheStrategy; |
|
25 | 29 |
|
26 | 30 |
/** |
27 | 31 |
* A specimen is regarded as derived from an field observation, |
... | ... | |
38 | 42 |
@XmlRootElement(name = "Specimen") |
39 | 43 |
@Entity |
40 | 44 |
@Audited |
41 |
public class Specimen extends DerivedUnitBase implements Cloneable { |
|
45 |
@Configurable |
|
46 |
public class Specimen extends DerivedUnitBase<IIdentifiableEntityCacheStrategy<Specimen>> implements Cloneable { |
|
42 | 47 |
private static final Logger logger = Logger.getLogger(Specimen.class); |
43 | 48 |
|
44 | 49 |
@XmlElement(name = "Preservation") |
... | ... | |
60 | 65 |
*/ |
61 | 66 |
protected Specimen() { |
62 | 67 |
super(); |
68 |
this.cacheStrategy = new IdentifiableEntityDefaultCacheStrategy<Specimen>(); |
|
63 | 69 |
} |
64 | 70 |
|
65 | 71 |
public PreservationMethod getPreservation(){ |
Also available in: Unified diff
Lots of changes, but primarily:
Enabled the marshalling / unmarshalling of LSIDAuthority
Renamed the User table to UserAccount to avoid problems on SQLServer
Major refactoring of CacheStrategyGenerators so that the generic framework extends across all IIdentifiableEntities, allowing (but not requiring) the use of @Configurable and aop to inject custom cache strategy generators at runtime