@Test public void testLoadProperties() { HashMap<String, Object> p = new HashMap<String, Object>(); p.put("__HSearch_id", domainGroupId); p.put("__HSearch_Score", searchScore); p.put("followersCount", followersCount); p.put("name", name); p.put("shortName", shortName); p.put("description", description); p.put("dateAdded", dateAdded); p.put("updatesCount", updatesCount); p.put("avatarId", avatarId); p.put("isPublic", isPublic); p.put("personCreatedByAccountId", createdby.getAccountId()); p.put("personCreatedByDisplayName", createdby.getDisplayName()); p.put("streamId", streamId); p.put("compositeStreamId", compositeStreamId); p.put("commentable", commentable); p.put("streamPostable", streamPostable); p.put("stickyActivityId", 9L); DomainGroupModelView sut = new DomainGroupModelView(); sut.loadProperties(p); assertAll(sut); assertEquals(domainGroupId, sut.getEntityId()); assertEquals(searchScore, sut.getSearchIndexScore(), 0); assertEquals((Long) 9L, sut.getStickyActivityId()); assertNull(sut.getStickyActivity()); }
@Override public void loadProperties(final Map<String, Object> properties) { super.loadProperties(properties); if (properties.containsKey("dateAdded")) { setDateAdded((Date) properties.get("dateAdded")); } if (properties.containsKey("avatarId")) { setAvatarId((String) properties.get("avatarId")); } if (properties.containsKey("avatarCropSize")) { setAvatarCropSize((Integer) properties.get("avatarCropSize")); } if (properties.containsKey("avatarCropX")) { setAvatarCropX((Integer) properties.get("avatarCropX")); } if (properties.containsKey("avatarCropY")) { setAvatarCropY((Integer) properties.get("avatarCropY")); } if (properties.containsKey("followersCount")) { setFollowersCount((Integer) properties.get("followersCount")); } if (properties.containsKey("updatesCount")) { setUpdatesCount((Integer) properties.get("updatesCount")); } if (properties.containsKey("name")) { setName((String) properties.get("name")); } if (properties.containsKey("description")) { setDescription((String) properties.get("description")); } if (properties.containsKey("shortName")) { setShortName(((String) properties.get("shortName"))); } if (properties.containsKey("isPublic")) { setIsPublic((Boolean) properties.get("isPublic")); } if (properties.containsKey("personCreatedByAccountId")) { setPersonCreatedByAccountId((String) properties.get("personCreatedByAccountId")); } if (properties.containsKey("personCreatedByDisplayName")) { setPersonCreatedByDisplayName((String) properties.get("personCreatedByDisplayName")); } if (properties.containsKey("personCreatedById")) { personCreatedById = (Long) properties.get("personCreatedById"); } if (properties.containsKey("streamId")) { setStreamId((Long) properties.get("streamId")); } if (properties.containsKey("commentable")) { setCommentable((Boolean) properties.get("commentable")); } if (properties.containsKey("streamPostable")) { setStreamPostable((Boolean) properties.get("streamPostable")); } if (properties.containsKey("isPending")) { setStreamPostable((Boolean) properties.get("isPending")); } if (properties.containsKey("bannerId")) { setBannerId((String) properties.get("bannerId")); } if (properties.containsKey("overview")) { setOverview((String) properties.get("overview")); } if (properties.containsKey("url")) { setUrl((String) properties.get("url")); } if (properties.containsKey("stickyActivityId")) { setStickyActivityId((Long) properties.get("stickyActivityId")); } if (properties.containsKey("personCreatedByCompanyName")) { setPersonCreatedByCompanyName((String) properties.get("personCreatedByCompanyName")); } }
DomainGroupModelView extends ModelView implements Followable, ActivityRestrictionEntity, Bannerable,
        AvatarEntity, Identifiable, StreamDTO { @Override public void loadProperties(final Map<String, Object> properties) { super.loadProperties(properties); if (properties.containsKey("dateAdded")) { setDateAdded((Date) properties.get("dateAdded")); } if (properties.containsKey("avatarId")) { setAvatarId((String) properties.get("avatarId")); } if (properties.containsKey("avatarCropSize")) { setAvatarCropSize((Integer) properties.get("avatarCropSize")); } if (properties.containsKey("avatarCropX")) { setAvatarCropX((Integer) properties.get("avatarCropX")); } if (properties.containsKey("avatarCropY")) { setAvatarCropY((Integer) properties.get("avatarCropY")); } if (properties.containsKey("followersCount")) { setFollowersCount((Integer) properties.get("followersCount")); } if (properties.containsKey("updatesCount")) { setUpdatesCount((Integer) properties.get("updatesCount")); } if (properties.containsKey("name")) { setName((String) properties.get("name")); } if (properties.containsKey("description")) { setDescription((String) properties.get("description")); } if (properties.containsKey("shortName")) { setShortName(((String) properties.get("shortName"))); } if (properties.containsKey("isPublic")) { setIsPublic((Boolean) properties.get("isPublic")); } if (properties.containsKey("personCreatedByAccountId")) { setPersonCreatedByAccountId((String) properties.get("personCreatedByAccountId")); } if (properties.containsKey("personCreatedByDisplayName")) { setPersonCreatedByDisplayName((String) properties.get("personCreatedByDisplayName")); } if (properties.containsKey("personCreatedById")) { personCreatedById = (Long) properties.get("personCreatedById"); } if (properties.containsKey("streamId")) { setStreamId((Long) properties.get("streamId")); } if (properties.containsKey("commentable")) { setCommentable((Boolean) properties.get("commentable")); } if (properties.containsKey("streamPostable")) { setStreamPostable((Boolean) properties.get("streamPostable")); } if (properties.containsKey("isPending")) { setStreamPostable((Boolean) properties.get("isPending")); } if (properties.containsKey("bannerId")) { setBannerId((String) properties.get("bannerId")); } if (properties.containsKey("overview")) { setOverview((String) properties.get("overview")); } if (properties.containsKey("url")) { setUrl((String) properties.get("url")); } if (properties.containsKey("stickyActivityId")) { setStickyActivityId((Long) properties.get("stickyActivityId")); } if (properties.containsKey("personCreatedByCompanyName")) { setPersonCreatedByCompanyName((String) properties.get("personCreatedByCompanyName")); } } }
DomainGroupModelView extends ModelView implements Followable, ActivityRestrictionEntity, Bannerable,
        AvatarEntity, Identifiable, StreamDTO { @Override public void loadProperties(final Map<String, Object> properties) { super.loadProperties(properties); if (properties.containsKey("dateAdded")) { setDateAdded((Date) properties.get("dateAdded")); } if (properties.containsKey("avatarId")) { setAvatarId((String) properties.get("avatarId")); } if (properties.containsKey("avatarCropSize")) { setAvatarCropSize((Integer) properties.get("avatarCropSize")); } if (properties.containsKey("avatarCropX")) { setAvatarCropX((Integer) properties.get("avatarCropX")); } if (properties.containsKey("avatarCropY")) { setAvatarCropY((Integer) properties.get("avatarCropY")); } if (properties.containsKey("followersCount")) { setFollowersCount((Integer) properties.get("followersCount")); } if (properties.containsKey("updatesCount")) { setUpdatesCount((Integer) properties.get("updatesCount")); } if (properties.containsKey("name")) { setName((String) properties.get("name")); } if (properties.containsKey("description")) { setDescription((String) properties.get("description")); } if (properties.containsKey("shortName")) { setShortName(((String) properties.get("shortName"))); } if (properties.containsKey("isPublic")) { setIsPublic((Boolean) properties.get("isPublic")); } if (properties.containsKey("personCreatedByAccountId")) { setPersonCreatedByAccountId((String) properties.get("personCreatedByAccountId")); } if (properties.containsKey("personCreatedByDisplayName")) { setPersonCreatedByDisplayName((String) properties.get("personCreatedByDisplayName")); } if (properties.containsKey("personCreatedById")) { personCreatedById = (Long) properties.get("personCreatedById"); } if (properties.containsKey("streamId")) { setStreamId((Long) properties.get("streamId")); } if (properties.containsKey("commentable")) { setCommentable((Boolean) properties.get("commentable")); } if (properties.containsKey("streamPostable")) { setStreamPostable((Boolean) properties.get("streamPostable")); } if (properties.containsKey("isPending")) { setStreamPostable((Boolean) properties.get("isPending")); } if (properties.containsKey("bannerId")) { setBannerId((String) properties.get("bannerId")); } if (properties.containsKey("overview")) { setOverview((String) properties.get("overview")); } if (properties.containsKey("url")) { setUrl((String) properties.get("url")); } if (properties.containsKey("stickyActivityId")) { setStickyActivityId((Long) properties.get("stickyActivityId")); } if (properties.containsKey("personCreatedByCompanyName")) { setPersonCreatedByCompanyName((String) properties.get("personCreatedByCompanyName")); } } DomainGroupModelView();  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Long inFollowerCount, final Date inDateAdded, final Long inStreamScopeId);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Long inFollowerCount, final Date inDateAdded, final Long inStreamScopeId, final Boolean inIsPublic);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Integer inFollowerCount, final Date inDateAdded, final Long inStreamScopeId);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Integer inFollowerCount, final Date inDateAdded, final Long inStreamScopeId, final Boolean inIsPublic); }
DomainGroupModelView extends ModelView implements Followable, ActivityRestrictionEntity, Bannerable,
        AvatarEntity, Identifiable, StreamDTO { @Override public void loadProperties(final Map<String, Object> properties) { super.loadProperties(properties); if (properties.containsKey("dateAdded")) { setDateAdded((Date) properties.get("dateAdded")); } if (properties.containsKey("avatarId")) { setAvatarId((String) properties.get("avatarId")); } if (properties.containsKey("avatarCropSize")) { setAvatarCropSize((Integer) properties.get("avatarCropSize")); } if (properties.containsKey("avatarCropX")) { setAvatarCropX((Integer) properties.get("avatarCropX")); } if (properties.containsKey("avatarCropY")) { setAvatarCropY((Integer) properties.get("avatarCropY")); } if (properties.containsKey("followersCount")) { setFollowersCount((Integer) properties.get("followersCount")); } if (properties.containsKey("updatesCount")) { setUpdatesCount((Integer) properties.get("updatesCount")); } if (properties.containsKey("name")) { setName((String) properties.get("name")); } if (properties.containsKey("description")) { setDescription((String) properties.get("description")); } if (properties.containsKey("shortName")) { setShortName(((String) properties.get("shortName"))); } if (properties.containsKey("isPublic")) { setIsPublic((Boolean) properties.get("isPublic")); } if (properties.containsKey("personCreatedByAccountId")) { setPersonCreatedByAccountId((String) properties.get("personCreatedByAccountId")); } if (properties.containsKey("personCreatedByDisplayName")) { setPersonCreatedByDisplayName((String) properties.get("personCreatedByDisplayName")); } if (properties.containsKey("personCreatedById")) { personCreatedById = (Long) properties.get("personCreatedById"); } if (properties.containsKey("streamId")) { setStreamId((Long) properties.get("streamId")); } if (properties.containsKey("commentable")) { setCommentable((Boolean) properties.get("commentable")); } if (properties.containsKey("streamPostable")) { setStreamPostable((Boolean) properties.get("streamPostable")); } if (properties.containsKey("isPending")) { setStreamPostable((Boolean) properties.get("isPending")); } if (properties.containsKey("bannerId")) { setBannerId((String) properties.get("bannerId")); } if (properties.containsKey("overview")) { setOverview((String) properties.get("overview")); } if (properties.containsKey("url")) { setUrl((String) properties.get("url")); } if (properties.containsKey("stickyActivityId")) { setStickyActivityId((Long) properties.get("stickyActivityId")); } if (properties.containsKey("personCreatedByCompanyName")) { setPersonCreatedByCompanyName((String) properties.get("personCreatedByCompanyName")); } } DomainGroupModelView();  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Long inFollowerCount, final Date inDateAdded, final Long inStreamScopeId);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Long inFollowerCount, final Date inDateAdded, final Long inStreamScopeId, final Boolean inIsPublic);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Integer inFollowerCount, final Date inDateAdded, final Long inStreamScopeId);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Integer inFollowerCount, final Date inDateAdded, final Long inStreamScopeId, final Boolean inIsPublic); @Override void loadProperties(final Map<String, Object> properties); void setIsPublic(final Boolean inIsPublic); Boolean isPublic(); @Override String getAvatarId(); @Override void setAvatarId(final String inAvatarId); @Override int getFollowersCount(); void setFollowersCount(final int inFollowersCount); int getUpdatesCount(); void setUpdatesCount(final int inUpdatesCount); String getShortName(); void setShortName(final String inShortName); String getName(); void setName(final String inName); String getDescription(); void setDescription(final String inDescription); Date getDateAdded(); void setDateAdded(final Date inDateAdded); String getPersonCreatedByDisplayName(); void setPersonCreatedByDisplayName(final String inPersonCreatedByDisplayName); String getPersonCreatedByCompanyName(); void setPersonCreatedByCompanyName(final String inPersonCreatedByCompanyName); String getPersonCreatedByAccountId(); Long getPersonCreatedById(); void setPersonCreatedById(final Long inPersonCreatedById); void setPersonCreatedByAccountId(final String inPersonCreatedByAccountId); @Override void setEntityId(final long inEntityId); long getStreamId(); void setStreamId(final long inStreamId); void setCommentable(final boolean inCommentable); @Override boolean isCommentable(); @Override boolean isStreamPostable(); void setStreamPostable(final boolean inStreamPostable); @Override long getId(); @Override String getUniqueId(); boolean isPending(); void setPending(final boolean inIsPending); @Override Long getBannerEntityId(); @Override String getBannerId(); @Override void setBannerEntityId(final Long inBannerEntityId); @Override void setBannerId(final String inBannerId); List<PersonModelView> getCoordinators(); void setCoordinators(final List<PersonModelView> inCoordinators); String getOverview(); void setOverview(final String inOverview); Boolean isRestricted(); void setRestricted(final Boolean inRestricted); List<String> getCapabilities(); void setCapabilities(final List<String> inCapabilities); @Override Integer getAvatarCropSize(); @Override void setAvatarCropSize(final Integer inAvatarCropSize); @Override Integer getAvatarCropX(); @Override void setAvatarCropX(final Integer inAvatarCropX); @Override Integer getAvatarCropY(); @Override void setAvatarCropY(final Integer inAvatarCropY); @Override EntityType getEntityType(); @Override String getDisplayName(); @Override String getTitle(); @Override FollowerStatus getFollowerStatus(); @Override void setFollowerStatus(final FollowerStatus inFollowerStatus); Long getStreamScopeId(); void setStreamScopeId(final Long inStreamScopeId); @Override String getStreamUniqueKey(); @Override void setDisplayName(final String inDisplayName); String getUrl(); void setUrl(final String inUrl); Long getStickyActivityId(); void setStickyActivityId(final Long inStickyActivityId); ActivityDTO getStickyActivity(); void setStickyActivity(final ActivityDTO inStickyActivity); }
DomainGroupModelView extends ModelView implements Followable, ActivityRestrictionEntity, Bannerable,
        AvatarEntity, Identifiable, StreamDTO { @Override public void loadProperties(final Map<String, Object> properties) { super.loadProperties(properties); if (properties.containsKey("dateAdded")) { setDateAdded((Date) properties.get("dateAdded")); } if (properties.containsKey("avatarId")) { setAvatarId((String) properties.get("avatarId")); } if (properties.containsKey("avatarCropSize")) { setAvatarCropSize((Integer) properties.get("avatarCropSize")); } if (properties.containsKey("avatarCropX")) { setAvatarCropX((Integer) properties.get("avatarCropX")); } if (properties.containsKey("avatarCropY")) { setAvatarCropY((Integer) properties.get("avatarCropY")); } if (properties.containsKey("followersCount")) { setFollowersCount((Integer) properties.get("followersCount")); } if (properties.containsKey("updatesCount")) { setUpdatesCount((Integer) properties.get("updatesCount")); } if (properties.containsKey("name")) { setName((String) properties.get("name")); } if (properties.containsKey("description")) { setDescription((String) properties.get("description")); } if (properties.containsKey("shortName")) { setShortName(((String) properties.get("shortName"))); } if (properties.containsKey("isPublic")) { setIsPublic((Boolean) properties.get("isPublic")); } if (properties.containsKey("personCreatedByAccountId")) { setPersonCreatedByAccountId((String) properties.get("personCreatedByAccountId")); } if (properties.containsKey("personCreatedByDisplayName")) { setPersonCreatedByDisplayName((String) properties.get("personCreatedByDisplayName")); } if (properties.containsKey("personCreatedById")) { personCreatedById = (Long) properties.get("personCreatedById"); } if (properties.containsKey("streamId")) { setStreamId((Long) properties.get("streamId")); } if (properties.containsKey("commentable")) { setCommentable((Boolean) properties.get("commentable")); } if (properties.containsKey("streamPostable")) { setStreamPostable((Boolean) properties.get("streamPostable")); } if (properties.containsKey("isPending")) { setStreamPostable((Boolean) properties.get("isPending")); } if (properties.containsKey("bannerId")) { setBannerId((String) properties.get("bannerId")); } if (properties.containsKey("overview")) { setOverview((String) properties.get("overview")); } if (properties.containsKey("url")) { setUrl((String) properties.get("url")); } if (properties.containsKey("stickyActivityId")) { setStickyActivityId((Long) properties.get("stickyActivityId")); } if (properties.containsKey("personCreatedByCompanyName")) { setPersonCreatedByCompanyName((String) properties.get("personCreatedByCompanyName")); } } DomainGroupModelView();  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Long inFollowerCount, final Date inDateAdded, final Long inStreamScopeId);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Long inFollowerCount, final Date inDateAdded, final Long inStreamScopeId, final Boolean inIsPublic);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Integer inFollowerCount, final Date inDateAdded, final Long inStreamScopeId);  DomainGroupModelView(final Long inId, final String inShortName, final String inName,
            final Integer inFollowerCount, final Date inDateAdded, final Long inStreamScopeId, final Boolean inIsPublic); @Override void loadProperties(final Map<String, Object> properties); void setIsPublic(final Boolean inIsPublic); Boolean isPublic(); @Override String getAvatarId(); @Override void setAvatarId(final String inAvatarId); @Override int getFollowersCount(); void setFollowersCount(final int inFollowersCount); int getUpdatesCount(); void setUpdatesCount(final int inUpdatesCount); String getShortName(); void setShortName(final String inShortName); String getName(); void setName(final String inName); String getDescription(); void setDescription(final String inDescription); Date getDateAdded(); void setDateAdded(final Date inDateAdded); String getPersonCreatedByDisplayName(); void setPersonCreatedByDisplayName(final String inPersonCreatedByDisplayName); String getPersonCreatedByCompanyName(); void setPersonCreatedByCompanyName(final String inPersonCreatedByCompanyName); String getPersonCreatedByAccountId(); Long getPersonCreatedById(); void setPersonCreatedById(final Long inPersonCreatedById); void setPersonCreatedByAccountId(final String inPersonCreatedByAccountId); @Override void setEntityId(final long inEntityId); long getStreamId(); void setStreamId(final long inStreamId); void setCommentable(final boolean inCommentable); @Override boolean isCommentable(); @Override boolean isStreamPostable(); void setStreamPostable(final boolean inStreamPostable); @Override long getId(); @Override String getUniqueId(); boolean isPending(); void setPending(final boolean inIsPending); @Override Long getBannerEntityId(); @Override String getBannerId(); @Override void setBannerEntityId(final Long inBannerEntityId); @Override void setBannerId(final String inBannerId); List<PersonModelView> getCoordinators(); void setCoordinators(final List<PersonModelView> inCoordinators); String getOverview(); void setOverview(final String inOverview); Boolean isRestricted(); void setRestricted(final Boolean inRestricted); List<String> getCapabilities(); void setCapabilities(final List<String> inCapabilities); @Override Integer getAvatarCropSize(); @Override void setAvatarCropSize(final Integer inAvatarCropSize); @Override Integer getAvatarCropX(); @Override void setAvatarCropX(final Integer inAvatarCropX); @Override Integer getAvatarCropY(); @Override void setAvatarCropY(final Integer inAvatarCropY); @Override EntityType getEntityType(); @Override String getDisplayName(); @Override String getTitle(); @Override FollowerStatus getFollowerStatus(); @Override void setFollowerStatus(final FollowerStatus inFollowerStatus); Long getStreamScopeId(); void setStreamScopeId(final Long inStreamScopeId); @Override String getStreamUniqueKey(); @Override void setDisplayName(final String inDisplayName); String getUrl(); void setUrl(final String inUrl); Long getStickyActivityId(); void setStickyActivityId(final Long inStickyActivityId); ActivityDTO getStickyActivity(); void setStickyActivity(final ActivityDTO inStickyActivity); static final String ID_KEY; static final String NAME_KEY; static final String SHORT_NAME_KEY; static final String URL_KEY; static final String COORDINATORS_KEY; static final String PRIVACY_KEY; static final String DESCRIPTION_KEY; static final String OVERVIEW_KEY; static final String KEYWORDS_KEY; static final String STREAM_POSTABLE_KEY; static final String STREAM_COMMENTABLE_KEY; static final String KEYWORD_MESSAGE; }