root/trunk/cdmlib/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/ReferencedMediaBase.java

Revision 12706, 2.1 kB (checked in by a.mueller, 9 months ago)

change name of ReferencedMedia? to ReferencedMediaBase? (#2381)

  • Property svn:keywords set to Id
Line 
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
10package eu.etaxonomy.cdm.model.media;
11
12
13import javax.persistence.Entity;
14import javax.persistence.FetchType;
15import javax.persistence.ManyToOne;
16import javax.xml.bind.annotation.XmlAccessType;
17import javax.xml.bind.annotation.XmlAccessorType;
18import javax.xml.bind.annotation.XmlElement;
19import javax.xml.bind.annotation.XmlIDREF;
20import javax.xml.bind.annotation.XmlRootElement;
21import javax.xml.bind.annotation.XmlSchemaType;
22import javax.xml.bind.annotation.XmlType;
23
24import org.apache.log4j.Logger;
25import org.hibernate.annotations.Cascade;
26import org.hibernate.annotations.CascadeType;
27import org.hibernate.envers.Audited;
28
29import eu.etaxonomy.cdm.model.common.IReferencedEntity;
30import eu.etaxonomy.cdm.model.reference.Reference;
31
32/**
33 * @author m.doering
34 * @version 1.0
35 * @created 08-Nov-2007 13:06:48
36 */
37@XmlAccessorType(XmlAccessType.FIELD)
38@XmlType(name = "ReferencedMedia", propOrder = {
39    "citationMicroReference",
40    "citation"
41})
42@XmlRootElement(name = "ReferencedMedia")
43@Entity
44@Audited
45public abstract class ReferencedMediaBase extends Media implements IReferencedEntity {
46        private static final long serialVersionUID = 4118655992311004088L;
47        static Logger logger = Logger.getLogger(ReferencedMediaBase.class);
48       
49        @XmlElement(name = "CitationMicroReference")
50        private String citationMicroReference;
51       
52        @XmlElement(name = "Citation")
53        @XmlIDREF
54        @XmlSchemaType(name = "IDREF")
55        @ManyToOne(fetch = FetchType.LAZY)
56        @Cascade(CascadeType.SAVE_UPDATE)
57        private Reference<?> citation;
58
59        public Reference<?> getCitation(){
60                return this.citation;
61        }
62       
63        public void setCitation(Reference<?> citation){
64                this.citation = citation;
65        }
66
67        public String getCitationMicroReference(){
68                return this.citationMicroReference;
69        }
70       
71        public void setCitationMicroReference(String citationMicroReference){
72                this.citationMicroReference = citationMicroReference;
73        }
74
75}
Note: See TracBrowser for help on using the browser.