001// -------------------------------------------------------------------------------- 002// Copyright 2002-2026 Echo Three, LLC 003// 004// Licensed under the Apache License, Version 2.0 (the "License"); 005// you may not use this file except in compliance with the License. 006// You may obtain a copy of the License at 007// 008// http://www.apache.org/licenses/LICENSE-2.0 009// 010// Unless required by applicable law or agreed to in writing, software 011// distributed under the License is distributed on an "AS IS" BASIS, 012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013// See the License for the specific language governing permissions and 014// limitations under the License. 015// -------------------------------------------------------------------------------- 016 017package com.echothree.util.common.transfer; 018 019import com.echothree.model.control.comment.common.transfer.CommentListWrapper; 020import com.echothree.model.control.core.common.transfer.EntityAliasTransfer; 021import com.echothree.model.control.core.common.transfer.EntityAttributeGroupTransfer; 022import com.echothree.model.control.core.common.transfer.EntityInstanceTransfer; 023import com.echothree.model.control.core.common.transfer.LinkTypeTransfer; 024import com.echothree.model.control.rating.common.transfer.RatingListWrapper; 025import com.echothree.model.control.tag.common.transfer.TagScopeTransfer; 026import com.echothree.model.control.workeffort.common.transfer.WorkEffortTransfer; 027import java.io.Serializable; 028 029public class BaseTransfer 030 implements Serializable { 031 032 private EntityInstanceTransfer entityInstance; 033 private MapWrapper<EntityAliasTransfer> entityAliases; 034 private MapWrapper<EntityAttributeGroupTransfer> entityAttributeGroups; 035 private MapWrapper<TagScopeTransfer> tagScopes; 036 private MapWrapper<LinkTypeTransfer> sourceLinkTypes; 037 private MapWrapper<LinkTypeTransfer> targetLinkTypes; 038 private MapWrapper<CommentListWrapper> comments; 039 private MapWrapper<RatingListWrapper> ratings; 040 private MapWrapper<WorkEffortTransfer> ownedWorkEfforts; 041 042 public EntityInstanceTransfer getEntityInstance() { 043 return entityInstance; 044 } 045 046 public void setEntityInstance(EntityInstanceTransfer entityInstance) { 047 this.entityInstance = entityInstance; 048 } 049 050 public MapWrapper<EntityAliasTransfer> getEntityAliases() { 051 return entityAliases; 052 } 053 054 public void setEntityAliases(MapWrapper<EntityAliasTransfer> entityAliases) { 055 this.entityAliases = entityAliases; 056 } 057 058 public MapWrapper<EntityAttributeGroupTransfer> getEntityAttributeGroups() { 059 return entityAttributeGroups; 060 } 061 062 public void setEntityAttributeGroups(MapWrapper<EntityAttributeGroupTransfer> entityAttributeGroups) { 063 this.entityAttributeGroups = entityAttributeGroups; 064 } 065 066 public MapWrapper<TagScopeTransfer> getTagScopes() { 067 return tagScopes; 068 } 069 070 public void setTagScopes(MapWrapper<TagScopeTransfer> tagScopes) { 071 this.tagScopes = tagScopes; 072 } 073 074 public MapWrapper<LinkTypeTransfer> getSourceLinkTypes() { 075 return sourceLinkTypes; 076 } 077 078 public void setSourceLinkTypes(MapWrapper<LinkTypeTransfer> sourceLinkTypes) { 079 this.sourceLinkTypes = sourceLinkTypes; 080 } 081 082 public MapWrapper<LinkTypeTransfer> getTargetLinkTypes() { 083 return targetLinkTypes; 084 } 085 086 public void setTargetLinkTypes(MapWrapper<LinkTypeTransfer> targetLinkTypes) { 087 this.targetLinkTypes = targetLinkTypes; 088 } 089 090 public MapWrapper<CommentListWrapper> getComments() { 091 return comments; 092 } 093 094 public void setComments(MapWrapper<CommentListWrapper> comments) { 095 this.comments = comments; 096 } 097 098 public void addComments(String commentTypeName, CommentListWrapper wrappedComments) { 099 if(comments == null) { 100 comments = new MapWrapper<>(); 101 } 102 103 comments.put(commentTypeName, wrappedComments); 104 } 105 106 public MapWrapper<RatingListWrapper> getRatings() { 107 return ratings; 108 } 109 110 public void setRatings(MapWrapper<RatingListWrapper> ratings) { 111 this.ratings = ratings; 112 } 113 114 public void addRatings(String ratingTypeName, RatingListWrapper wrappedRatings) { 115 if(ratings == null) { 116 ratings = new MapWrapper<>(); 117 } 118 119 ratings.put(ratingTypeName, wrappedRatings); 120 } 121 122 public MapWrapper<WorkEffortTransfer> getOwnedWorkEfforts() { 123 return ownedWorkEfforts; 124 } 125 126 public void setOwnedWorkEfforts(MapWrapper<WorkEffortTransfer> ownedWorkEfforts) { 127 this.ownedWorkEfforts = ownedWorkEfforts; 128 } 129 130 public void addOwnedWorkEffort(String workEffortTypeName, WorkEffortTransfer ownedWorkEffort) { 131 if(ownedWorkEfforts == null) { 132 ownedWorkEfforts = new MapWrapper<>(1); 133 } 134 135 ownedWorkEfforts.put(workEffortTypeName, ownedWorkEffort); 136 } 137 138}