Project

General

Profile

Revision 6a7ff989

ID6a7ff989cb46dfdcb35792f5bae2a1cfdd7ec053
Parent 5fd4238e
Child 3e9af0ff

Added by Andreas Müller about 2 years ago

cleanup

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/hibernate/EnumUserType.java
118 118
            //EntityAuthority
119 119
            }else if (clazz.equals(AuthorityType.class)){
120 120
                return AuthorityType.getByKey(val);
121
              //ExternalLinkType
121
            //ExternalLinkType
122 122
            }else if (clazz.equals(ExternalLinkType.class)){
123 123
                return ExternalLinkType.getByKey(val);
124 124
            }else{
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/AnnotatableEntity.java
52 52
    @OneToMany(fetch=FetchType.LAZY, orphanRemoval=true)
53 53
	@Cascade({CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE})
54 54
	@Merge(MergeMode.ADD_CLONE)
55
	protected Set<Marker> markers = new HashSet<Marker>();
55
	protected Set<Marker> markers = new HashSet<>();
56 56

  
57 57
	@XmlElementWrapper(name = "Annotations", nillable = true)
58 58
	@XmlElement(name = "Annotation")
59 59
    @OneToMany(fetch=FetchType.LAZY, orphanRemoval=true)
60 60
    @Cascade({CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE})
61 61
	@Merge(MergeMode.ADD_CLONE)
62
	protected Set<Annotation> annotations = new HashSet<Annotation>();
62
	protected Set<Annotation> annotations = new HashSet<>();
63 63

  
64 64
	protected AnnotatableEntity() {
65 65
		super();
......
131 131
		AnnotatableEntity result = (AnnotatableEntity)super.clone();
132 132

  
133 133
		//Annotations
134
		result.annotations = new HashSet<Annotation>();
134
		result.annotations = new HashSet<>();
135 135
		for (Annotation annotation : getAnnotations()){
136 136
			Annotation newAnnotation = (Annotation)annotation.clone();
137 137
			result.addAnnotation(newAnnotation);
138 138
		}
139 139

  
140 140
		//Markers
141
		result.markers = new HashSet<Marker>();
141
		result.markers = new HashSet<>();
142 142
		for (Marker marker : getMarkers()){
143 143
			Marker newMarker = (Marker)marker.clone();
144 144
			result.addMarker(newMarker);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)