Project

General

Profile

Revision cbdcc8dd

IDcbdcc8dd0c55b6798de5d7f5a5717d329235cb24
Parent 56a54a09
Child 027f931b

Added by Andreas Müller 2 months ago

ref #9004, ref #6581 add isEmpty to OriginalSource and super classes

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/AnnotatableEntity.java
172 172
	     new EntityCollectionSetterAdapter<AnnotatableEntity, Annotation>(AnnotatableEntity.class, Annotation.class, "annotations").setCollection(this, annotations);
173 173
    }
174 174

  
175
//********************** CLONE *****************************************/
175
// **************** EMPTY ************************/
176 176

  
177
    @Override
178
    protected boolean isEmpty(){
179
       return super.isEmpty()
180
            && this.annotations.isEmpty()
181
            && this.markers.isEmpty()
182
           ;
183
    }
184

  
185
//********************** CLONE *****************************************/
177 186

  
178 187
	@Override
179 188
	public Object clone() throws CloneNotSupportedException{
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java
523 523
        return StringUtils.isNotBlank(str);
524 524
    }
525 525

  
526
// **************** EMPTY ************************/
526 527

  
528
    protected boolean isEmpty(){
529
       return true;
530
    }
527 531

  
528 532
//********************** CLONE *****************************************/
529 533

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/IdentifiableSource.java
110 110
// ****************** CONSTRUCTOR ********************************/
111 111

  
112 112
	//for hibernate only
113
	private IdentifiableSource() {
113
	protected IdentifiableSource() {
114 114
	}
115 115

  
116 116
	private IdentifiableSource(OriginalSourceType type) {
......
119 119

  
120 120
// ********************** GETTER /SETTER *****************************/
121 121

  
122
	@Override
123
    public boolean isEmpty(){
124
	    //nothing to do
125
	    return super.isEmpty();
126
	}
122 127

  
123 128
//*********************************** CLONE *********************************************************/
124 129

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/ReferencedEntityBase.java
107 107
		this.citation = citation;
108 108
	}
109 109

  
110
// **************** EMPTY ************************/
111

  
112
    @Override
113
    protected boolean isEmpty(){
114
       return super.isEmpty()
115
            && this.getCitation() == null
116
            && this.getCitationMicroReference() == null
117
            && isBlank(this.getOriginalNameString())
118
           ;
119
    }
120

  
110 121
//****************** CLONE ************************************************/
111 122

  
112 123
	@Override
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/VersionableEntity.java
117 117
	    return super.equals(obj);
118 118
	}
119 119

  
120
// **************** EMPTY ************************/
121

  
122
    protected boolean isEmpty(){
123
       return super.isEmpty()
124
               //nothing to do
125
           ;
126
    }
127

  
120 128
//********************** CLONE *****************************************/
121 129

  
122 130
	/**
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/DescriptionElementSource.java
164 164
		this.nameUsedInSource = nameUsedInSource;
165 165
	}
166 166

  
167
// **************** EMPTY ************************/
168

  
169
    @Override
170
    public boolean isEmpty(){
171
       return super.isEmpty()
172
            && this.nameUsedInSource != null
173
           ;
174
    }
167 175

  
168 176
//*********************************** CLONE *********************************************************/
169 177

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/OriginalSourceBase.java
231 231
		return result;
232 232
	}
233 233

  
234
// **************** EMPTY ************************/
235

  
236
	@Override
237
    public boolean isEmpty(){
238
	   return super.isEmpty()
239
	        && isBlank(this.getIdInSource())
240
	        && isBlank(this.getIdNamespace())
241
	        && this.links.isEmpty()
242
	        && this.cdmSource != null
243
	        && this.type == null
244
           ;
245
	}
234 246

  
235 247
//************************ toString ***************************************/
236 248
	@Override

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)