cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Fri, 22 Jul 2022 16:31:07 +0000 (18:31 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Fri, 22 Jul 2022 21:51:09 +0000 (23:51 +0200)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/Credit.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/TimePeriod.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/OriginalSourceBase.java
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v529_532/SchemaUpdater_5290_5320.java

index 4a657a323867d0547de4b3275dc143a60c0da4f7..9172312bd205f456bc3c49e6e36c6630e4b14ce8 100644 (file)
@@ -6,7 +6,6 @@
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
-
 package eu.etaxonomy.cdm.model.common;
 
 import javax.persistence.Entity;
@@ -19,7 +18,8 @@ import javax.xml.bind.annotation.XmlIDREF;
 import javax.xml.bind.annotation.XmlSchemaType;
 import javax.xml.bind.annotation.XmlType;
 
-import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.annotations.Cascade;
 import org.hibernate.annotations.CascadeType;
 import org.hibernate.envers.Audited;
@@ -29,13 +29,13 @@ import eu.etaxonomy.cdm.model.agent.AgentBase;
 /**
  * @author a.mueller
  * @since 23.03.2009
- * @version 1.0
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "Credit")
 @Entity
 @Audited
-public class Credit extends LanguageStringBase implements Cloneable{
+public class Credit extends LanguageStringBase {
+
        private static final long serialVersionUID = 5763391127298427701L;
        @SuppressWarnings("unused")
        private static final Logger logger = LogManager.getLogger(Credit.class);
@@ -81,9 +81,6 @@ public class Credit extends LanguageStringBase implements Cloneable{
 
 //*********************** GETTER /SETTER *****************************/
 
-       /**
-        * @return the agent
-        */
        public AgentBase getAgent() {
                return agent;
        }
@@ -91,10 +88,6 @@ public class Credit extends LanguageStringBase implements Cloneable{
                this.agent = agent;
        }
 
-
-       /**
-        * @return the abbreviatedText
-        */
        public String getAbbreviatedText() {
                return abbreviatedText;
        }
@@ -117,6 +110,8 @@ public class Credit extends LanguageStringBase implements Cloneable{
                return result;
        }
 
+// ************************ STRING ****************************/
+
     @Override
     public String toString() {
         if (isNotBlank(this.abbreviatedText)){
index 77aa812a95f67268d84cbd6ec0d6c8dca817cd04..8254ab6688933704c0eb90b623feeb6137606c1e 100644 (file)
@@ -24,7 +24,8 @@ import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
 import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.annotations.Type;
 import org.hibernate.search.annotations.Analyze;
 import org.hibernate.search.annotations.Field;
index a35e9472537603956a3cab7babb392ecd29e8893..ca867ffe738fcd67d89a454a5c0fe3b941b7f417 100644 (file)
@@ -57,7 +57,6 @@ import eu.etaxonomy.cdm.strategy.merge.MergeMode;
  * @author m.doering
  * @since 08-Nov-2007 13:06:22
  */
-
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "OriginalSource", propOrder = {
     "type",
@@ -338,6 +337,7 @@ public abstract class OriginalSourceBase
      */
     public boolean equalsByShallowCompare(OriginalSourceBase other) {
 
+
         int thisCitationId = -1;
         int otherCitationId = -1;
         if(this.getCitation() != null) {
@@ -354,13 +354,12 @@ public abstract class OriginalSourceBase
             return false;
         }
 
-        OriginalSourceBase theOther = other;
-        if(!StringUtils.equals(this.getIdInSource(), theOther.getIdInSource())
-                || !CdmUtils.nullSafeEqual(this.getIdNamespace(), theOther.getIdNamespace())
-                || !CdmUtils.nullSafeEqual(this.getType(), theOther.getType())
-                || TimePeriod.equalsNullAndEmptySafe(accessed, theOther.getAccessed())
-                || !CdmUtils.nullSafeEqual(this.getCdmSource(), theOther.getCdmSource())
-                || !CdmUtils.nullSafeEqual(this.getLinks(), theOther.getLinks())) {
+        if(!StringUtils.equals(this.getIdInSource(), other.getIdInSource())
+                || !CdmUtils.nullSafeEqual(this.getIdNamespace(), other.getIdNamespace())
+                || !CdmUtils.nullSafeEqual(this.getType(), other.getType())
+                || TimePeriod.equalsNullAndEmptySafe(accessed, other.getAccessed())
+                || !CdmUtils.nullSafeEqual(this.getCdmSource(), other.getCdmSource())
+                || !CdmUtils.nullSafeEqual(this.getLinks(), other.getLinks())) {
             return false;
         }
 
index 42009813b142ba9ed376770aa830aa6ce25fc19e..c859bc4cf17f6089dd036634fdacdd73dc50d171 100644 (file)
@@ -70,18 +70,18 @@ public class SchemaUpdater_5290_5320 extends SchemaUpdaterBase {
                UUID uuidEnglish = Language.uuidEnglish;
                TermRepresentationUpdater.NewInverseInstance(stepList, stepName, uuidTerm, description, label, abbrev, uuidEnglish);
 
-           //#10057 add accessed columns
-        stepName = "Add accessed_start";
+           //#10057 add accessed columns to OriginalSourceBase
+        stepName = "Add accessed_start to OriginalSourceBase";
         tableName = "OriginalSourceBase";
         String newColumnName = "accessed_start";
         int size = 50;
         ColumnAdder.NewStringInstance(stepList, stepName, tableName, newColumnName, size, INCLUDE_AUDIT);
 
-        stepName = "Add accessed_end";
+        stepName = "Add accessed_end to OriginalSourceBase";
         newColumnName = "accessed_end";
         ColumnAdder.NewStringInstance(stepList, stepName, tableName, newColumnName, size, INCLUDE_AUDIT);
 
-        stepName = "Add accessed_freetext";
+        stepName = "Add accessed_freetext to OriginalSourceBase";
         newColumnName = "accessed_freetext";
         ColumnAdder.NewStringInstance(stepList, stepName, tableName, newColumnName, INCLUDE_AUDIT);