(no commit message)
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 6 Aug 2008 08:59:41 +0000 (08:59 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 6 Aug 2008 08:59:41 +0000 (08:59 +0000)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/PublicationBase.java

index 0957caaa8656bc396ee1f8985497e790063354e0..1235dea9944f7ba8ca4b997ccd1691da3eca9967 100644 (file)
@@ -10,6 +10,9 @@
 package eu.etaxonomy.cdm.model.reference;
 
 import org.apache.log4j.Logger;
+
+import eu.etaxonomy.cdm.strategy.cache.reference.PublicationBaseDefaultCacheStrategy;
+
 import javax.persistence.*;
 
 /**
@@ -27,6 +30,12 @@ public abstract class PublicationBase extends StrictReferenceBase {
        private String publisher;
        private String placePublished;
 
+       public PublicationBase(){
+               super();
+               this.cacheStrategy = PublicationBaseDefaultCacheStrategy.NewInstance();
+       }
+
+       
        /**
         * Returns the string representing the name of the publisher of <i>this</i>
         * publication. A publisher is mostly an institution or a private
@@ -64,6 +73,25 @@ public abstract class PublicationBase extends StrictReferenceBase {
                this.placePublished = placePublished;
        }
        
+       /**
+        * Generates, according to the {@link strategy.cache.reference.IReferenceBaseCacheStrategy cache strategy}
+        * assigned to <i>this</i> reference, a string that identifies <i>this</i>
+        * publication base and returns it. This string may be stored in the
+        * inherited {@link common.IdentifiableEntity#getTitleCache() titleCache} attribute.<BR>
+        * This method overrides the generic and inherited
+        * ReferenceBase#generateTitle() method.
+        *
+        * @return  the string identifying <i>this</i> conference proceedings
+        * @see         ReferenceBase#generateTitle()
+        * @see         common.IdentifiableEntity#getTitleCache()
+        * @see         common.IdentifiableEntity#generateTitle()
+        * @see         strategy.cache.common.IIdentifiableEntityCacheStrategy#getTitleCache()
+        */
+       @Override
+       public String generateTitle(){
+               return this.cacheStrategy.getTitleCache(this);
+       }
+       
 //*********** CLONE **********************************/