(no commit message)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / media / ReferencedMedia.java
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.media;
11
12
13 import eu.etaxonomy.cdm.model.common.IReferencedEntity;
14 import eu.etaxonomy.cdm.model.reference.ReferenceBase;
15 import org.apache.log4j.Logger;
16 import org.hibernate.annotations.Cascade;
17 import org.hibernate.annotations.CascadeType;
18 import javax.persistence.*;
19
20 /**
21 * @author m.doering
22 * @version 1.0
23 * @created 08-Nov-2007 13:06:48
24 */
25 @Entity
26 public abstract class ReferencedMedia extends Media implements IReferencedEntity {
27 static Logger logger = Logger.getLogger(ReferencedMedia.class);
28 private String citationMicroReference;
29 private ReferenceBase citation;
30
31 @ManyToOne
32 @Cascade({CascadeType.SAVE_UPDATE})
33 public ReferenceBase getCitation(){
34 return this.citation;
35 }
36 public void setCitation(ReferenceBase citation){
37 this.citation = citation;
38 }
39
40 public String getCitationMicroReference(){
41 return this.citationMicroReference;
42 }
43 public void setCitationMicroReference(String citationMicroReference){
44 this.citationMicroReference = citationMicroReference;
45 }
46
47 }