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.agent;
|
11
|
|
12
|
import javax.persistence.Embedded;
|
13
|
import javax.persistence.Entity;
|
14
|
import javax.persistence.Transient;
|
15
|
import javax.xml.bind.annotation.XmlAccessType;
|
16
|
import javax.xml.bind.annotation.XmlAccessorType;
|
17
|
import javax.xml.bind.annotation.XmlElement;
|
18
|
import javax.xml.bind.annotation.XmlTransient;
|
19
|
import javax.xml.bind.annotation.XmlType;
|
20
|
|
21
|
import org.hibernate.annotations.Index;
|
22
|
import org.hibernate.annotations.Table;
|
23
|
import org.hibernate.envers.Audited;
|
24
|
|
25
|
import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
|
26
|
import eu.etaxonomy.cdm.strategy.cache.agent.INomenclaturalAuthorCacheStrategy;
|
27
|
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
|
28
|
|
29
|
/**
|
30
|
* The upmost (abstract) class for agents such as persons, teams or institutions.
|
31
|
* An agent is a conscious entity which can take decisions, act and create
|
32
|
* according to its own knowledge and goals and which may be approached.
|
33
|
* Agents can be authors for nomenclatural or bibliographical references as well
|
34
|
* as creators of pictures or field collectors or administrators of collections.
|
35
|
*
|
36
|
* @author m.doering
|
37
|
* @version 1.0
|
38
|
* @created 08-Nov-2007 13:06:57
|
39
|
*/
|
40
|
@XmlAccessorType(XmlAccessType.FIELD)
|
41
|
@XmlType(name = "Agent", propOrder = {
|
42
|
"contact"
|
43
|
})
|
44
|
@Entity
|
45
|
@Audited
|
46
|
@Table(appliesTo="AgentBase", indexes = { @Index(name = "agentTitleCacheIndex", columnNames = { "titleCache" }) })
|
47
|
public abstract class AgentBase<S extends IIdentifiableEntityCacheStrategy> extends IdentifiableMediaEntity<S>{
|
48
|
|
49
|
/**
|
50
|
*
|
51
|
*/
|
52
|
private static final long serialVersionUID = 7732768617469448829L;
|
53
|
|
54
|
@XmlElement(name = "Contact")
|
55
|
@Embedded
|
56
|
private Contact contact;
|
57
|
|
58
|
/**
|
59
|
* Returns the {@link Contact contact} of <i>this</i> person.
|
60
|
* The contact contains several ways to approach <i>this</i> person.
|
61
|
*
|
62
|
* @see Contact
|
63
|
*/
|
64
|
public Contact getContact(){
|
65
|
return this.contact;
|
66
|
}
|
67
|
/**
|
68
|
* @see #getContact()
|
69
|
*/
|
70
|
public void setContact(Contact contact){
|
71
|
this.contact = contact;
|
72
|
}
|
73
|
}
|