2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.model
.occurrence
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.hibernate
.envers
.Audited
;
15 import org
.hibernate
.search
.annotations
.Indexed
;
16 import org
.springframework
.beans
.factory
.annotation
.Configurable
;
18 import eu
.etaxonomy
.cdm
.strategy
.cache
.common
.IIdentifiableEntityCacheStrategy
;
19 import eu
.etaxonomy
.cdm
.strategy
.cache
.common
.IdentifiableEntityDefaultCacheStrategy
;
21 import javax
.persistence
.*;
22 import javax
.xml
.bind
.annotation
.XmlAccessType
;
23 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
24 import javax
.xml
.bind
.annotation
.XmlRootElement
;
29 @XmlAccessorType(XmlAccessType
.FIELD
)
30 @XmlRootElement(name
= "DerivedUnit")
32 @Indexed(index
= "eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase")
35 public class DerivedUnit
extends DerivedUnitBase
<IIdentifiableEntityCacheStrategy
<DerivedUnit
>> implements Cloneable
{
39 private static final long serialVersionUID
= 1L;
40 private static final Logger logger
= Logger
.getLogger(DerivedUnit
.class);
46 public static DerivedUnit
NewInstance(){
47 return new DerivedUnit();
53 protected DerivedUnit() {
55 this.cacheStrategy
= new IdentifiableEntityDefaultCacheStrategy
<DerivedUnit
>();
58 //*********** CLONE **********************************/
61 * Clones <i>this</i> observation. This is a shortcut that enables to
62 * create a new instance that differs only slightly from <i>this</i> observation
63 * by modifying only some of the attributes.<BR>
64 * This method overrides the clone method from {@link DerivedUnitBase DerivedUnitBase}.
66 * @see DerivedUnitBase#clone()
67 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
68 * @see java.lang.Object#clone()
71 public DerivedUnit
clone(){
73 DerivedUnit result
= (DerivedUnit
)super.clone();
76 } catch (CloneNotSupportedException e
) {
77 logger
.warn("Object does not implement cloneable");