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.StrictReferenceBaseDefaultCacheStrategy;
|
26
|
|
27
|
/**
|
28
|
* This class represents a database used as an information source. A database is
|
29
|
* a structured collection of records or data.
|
30
|
* <P>
|
31
|
* This class corresponds, according to the TDWG ontology, partially to the
|
32
|
* publication type term (from PublicationTypeTerm): "ComputerProgram".
|
33
|
*
|
34
|
* @author m.doering
|
35
|
* @version 1.0
|
36
|
* @created 08-Nov-2007 13:06:19
|
37
|
*/
|
38
|
@XmlAccessorType(XmlAccessType.FIELD)
|
39
|
@XmlType(name = "Database")
|
40
|
@XmlRootElement(name = "Database")
|
41
|
@Entity
|
42
|
@Indexed(index = "eu.etaxonomy.cdm.model.reference.ReferenceBase")
|
43
|
@Audited
|
44
|
@Configurable
|
45
|
public class Database extends PublicationBase<IReferenceBaseCacheStrategy<Database>> implements Cloneable {
|
46
|
|
47
|
/**
|
48
|
*
|
49
|
*/
|
50
|
private static final long serialVersionUID = -7077612779393752878L;
|
51
|
private static final Logger logger = Logger.getLogger(Database.class);
|
52
|
|
53
|
protected Database() {
|
54
|
this.cacheStrategy = new StrictReferenceBaseDefaultCacheStrategy<Database>();
|
55
|
}
|
56
|
|
57
|
/**
|
58
|
* Creates a new empty database instance.
|
59
|
*/
|
60
|
public static Database NewInstance(){
|
61
|
return new Database();
|
62
|
}
|
63
|
|
64
|
|
65
|
|
66
|
//*********** CLONE **********************************/
|
67
|
|
68
|
/**
|
69
|
* Clones <i>this</i> database instance. This is a shortcut that enables to
|
70
|
* create a new instance that differs only slightly from <i>this</i>
|
71
|
* database instance by modifying only some of the attributes.<BR>
|
72
|
* This method overrides the clone method from {@link StrictReferenceBase StrictReferenceBase}.
|
73
|
*
|
74
|
* @see StrictReferenceBase#clone()
|
75
|
* @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
|
76
|
* @see java.lang.Object#clone()
|
77
|
*/
|
78
|
@Override
|
79
|
public Database clone(){
|
80
|
Database result = (Database)super.clone();
|
81
|
//no changes to: -
|
82
|
return result;
|
83
|
}
|
84
|
|
85
|
}
|