1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.model.reference;
|
11
|
|
12
|
|
13
|
import javax.persistence.Entity;
|
14
|
import javax.xml.bind.annotation.XmlAccessType;
|
15
|
import javax.xml.bind.annotation.XmlAccessorType;
|
16
|
import javax.xml.bind.annotation.XmlRootElement;
|
17
|
import javax.xml.bind.annotation.XmlType;
|
18
|
|
19
|
import org.apache.log4j.Logger;
|
20
|
import org.hibernate.envers.Audited;
|
21
|
import org.hibernate.search.annotations.Indexed;
|
22
|
import org.springframework.beans.factory.annotation.Configurable;
|
23
|
|
24
|
import eu.etaxonomy.cdm.strategy.cache.reference.IReferenceBaseCacheStrategy;
|
25
|
import eu.etaxonomy.cdm.strategy.cache.reference.ReferenceBaseDefaultCacheStrategy;
|
26
|
|
27
|
/**
|
28
|
* This class represents personal communications. A personal communication is a
|
29
|
* non published document originally written for information exchange between
|
30
|
* private persons.
|
31
|
* <P>
|
32
|
* This class corresponds to: <ul>
|
33
|
* <li> the term "Communication" from PublicationTypeTerm according to the TDWG ontology
|
34
|
* </ul>
|
35
|
*
|
36
|
* @author m.doering
|
37
|
* @version 1.0
|
38
|
* @created 08-Nov-2007 13:06:43
|
39
|
*/
|
40
|
@XmlAccessorType(XmlAccessType.FIELD)
|
41
|
@XmlType(name = "PersonalCommunication")
|
42
|
@XmlRootElement(name = "PersonalCommunication")
|
43
|
@Entity
|
44
|
@Indexed(index = "eu.etaxonomy.cdm.model.reference.ReferenceBase")
|
45
|
@Audited
|
46
|
@Configurable
|
47
|
public class PersonalCommunication extends ReferenceBase<IReferenceBaseCacheStrategy<PersonalCommunication>> implements Cloneable {
|
48
|
private static final long serialVersionUID = -2527724602502055339L;
|
49
|
@SuppressWarnings("unused")
|
50
|
private static final Logger logger = Logger.getLogger(PersonalCommunication.class);
|
51
|
|
52
|
/**
|
53
|
* Creates a new empty personal communication instance.
|
54
|
*/
|
55
|
public static PersonalCommunication NewInstance(){
|
56
|
PersonalCommunication result = new PersonalCommunication();
|
57
|
return result;
|
58
|
}
|
59
|
|
60
|
protected PersonalCommunication() {
|
61
|
this.type = ReferenceType.PersonalCommunication;
|
62
|
this.cacheStrategy = new ReferenceBaseDefaultCacheStrategy<PersonalCommunication>();
|
63
|
}
|
64
|
|
65
|
|
66
|
|
67
|
/**
|
68
|
* Clones <i>this</i> personal communication instance. This is a shortcut that enables to
|
69
|
* create a new instance that differs only slightly from <i>this</i>
|
70
|
* personal communication instance by modifying only some of the attributes.<BR>
|
71
|
* This method overrides the clone method from {@link PublicationBase PublicationBase}.
|
72
|
*
|
73
|
* @see PublicationBase#clone()
|
74
|
* @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
|
75
|
* @see java.lang.Object#clone()
|
76
|
*/
|
77
|
@Override
|
78
|
public PersonalCommunication clone(){
|
79
|
PersonalCommunication result = (PersonalCommunication)super.clone();
|
80
|
//no changes to: -
|
81
|
return result;
|
82
|
}
|
83
|
}
|