1 package eu
.etaxonomy
.cdm
.model
.description
;
3 import java
.util
.HashSet
;
6 import javax
.persistence
.ManyToOne
;
7 import javax
.persistence
.MappedSuperclass
;
8 import javax
.persistence
.OneToMany
;
10 import org
.apache
.log4j
.Logger
;
11 import org
.hibernate
.annotations
.Cascade
;
12 import org
.hibernate
.annotations
.CascadeType
;
14 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
15 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
18 public abstract class DescriptionBase
extends IdentifiableEntity
{
19 static Logger logger
= Logger
.getLogger(DescriptionBase
.class);
20 private Set
<FeatureBase
> features
= new HashSet();
21 private ReferenceBase source
;
23 public String
generateTitle() {
24 // TODO Auto-generated method stub
31 @Cascade( { CascadeType
.SAVE_UPDATE
})
32 public ReferenceBase
getSource() {
38 public void setSource(ReferenceBase source
) {
45 @Cascade( { CascadeType
.SAVE_UPDATE
})
46 public Set
<FeatureBase
> getFeatures() {
52 protected void setFeatures(Set
<FeatureBase
> features
) {
53 this.features
= features
;
58 public void addFeature(FeatureBase feature
) {
59 this.features
.add(feature
);
64 public void removeFeature(FeatureBase feature
) {
65 this.features
.remove(feature
);