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
.media
;
13 import javax
.persistence
.Entity
;
14 import javax
.persistence
.FetchType
;
15 import javax
.persistence
.ManyToOne
;
16 import javax
.xml
.bind
.annotation
.XmlAccessType
;
17 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
18 import javax
.xml
.bind
.annotation
.XmlElement
;
19 import javax
.xml
.bind
.annotation
.XmlIDREF
;
20 import javax
.xml
.bind
.annotation
.XmlRootElement
;
21 import javax
.xml
.bind
.annotation
.XmlSchemaType
;
22 import javax
.xml
.bind
.annotation
.XmlType
;
24 import org
.apache
.log4j
.Logger
;
25 import org
.hibernate
.annotations
.Cascade
;
26 import org
.hibernate
.annotations
.CascadeType
;
27 import org
.hibernate
.envers
.Audited
;
29 import eu
.etaxonomy
.cdm
.model
.common
.IReferencedEntity
;
30 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
35 * @created 08-Nov-2007 13:06:48
37 @XmlAccessorType(XmlAccessType
.FIELD
)
38 @XmlType(name
= "ReferencedMedia", propOrder
= {
39 "citationMicroReference",
42 @XmlRootElement(name
= "ReferencedMedia")
45 public abstract class ReferencedMedia
extends Media
implements IReferencedEntity
{
47 static Logger logger
= Logger
.getLogger(ReferencedMedia
.class);
49 @XmlElement(name
= "CitationMicroReference")
50 private String citationMicroReference
;
52 @XmlElement(name
= "Citation")
54 @XmlSchemaType(name
= "IDREF")
55 @ManyToOne(fetch
= FetchType
.LAZY
)
56 @Cascade(CascadeType
.SAVE_UPDATE
)
57 private ReferenceBase citation
;
59 public ReferenceBase
getCitation(){
63 public void setCitation(ReferenceBase citation
){
64 this.citation
= citation
;
67 public String
getCitationMicroReference(){
68 return this.citationMicroReference
;
71 public void setCitationMicroReference(String citationMicroReference
){
72 this.citationMicroReference
= citationMicroReference
;