@Test public void setNullPrimaryEmailShouldNotCreateSetWithNullEntry() { final SocialPerson person = new SocialPerson(); assertNull(person.getEmails()); person.setPrimaryEmail(null); assertNotNull(person.getEmails()); assertThat(person.getEmails(), empty()); }
public void setPrimaryEmail(String primaryEmail) { this.primaryEmail = primaryEmail; Builder<String> emailsBuilder = ImmutableSet.<String>builder(); if (getEmails() != null) emailsBuilder.addAll(getEmails()); if (primaryEmail != null) emailsBuilder.add(primaryEmail); final Set<String> newEmails = emailsBuilder.build(); if (!newEmails.equals(getEmails())) { setEmails( newEmails ); } }
SocialPerson extends Person { public void setPrimaryEmail(String primaryEmail) { this.primaryEmail = primaryEmail; Builder<String> emailsBuilder = ImmutableSet.<String>builder(); if (getEmails() != null) emailsBuilder.addAll(getEmails()); if (primaryEmail != null) emailsBuilder.add(primaryEmail); final Set<String> newEmails = emailsBuilder.build(); if (!newEmails.equals(getEmails())) { setEmails( newEmails ); } } }
SocialPerson extends Person { public void setPrimaryEmail(String primaryEmail) { this.primaryEmail = primaryEmail; Builder<String> emailsBuilder = ImmutableSet.<String>builder(); if (getEmails() != null) emailsBuilder.addAll(getEmails()); if (primaryEmail != null) emailsBuilder.add(primaryEmail); final Set<String> newEmails = emailsBuilder.build(); if (!newEmails.equals(getEmails())) { setEmails( newEmails ); } } SocialPerson();  SocialPerson(String id, String slug, String firstName,
			String lastName);  SocialPerson(String id, String slug, String firstName,
			String lastName, Gender gender); }
SocialPerson extends Person { public void setPrimaryEmail(String primaryEmail) { this.primaryEmail = primaryEmail; Builder<String> emailsBuilder = ImmutableSet.<String>builder(); if (getEmails() != null) emailsBuilder.addAll(getEmails()); if (primaryEmail != null) emailsBuilder.add(primaryEmail); final Set<String> newEmails = emailsBuilder.build(); if (!newEmails.equals(getEmails())) { setEmails( newEmails ); } } SocialPerson();  SocialPerson(String id, String slug, String firstName,
			String lastName);  SocialPerson(String id, String slug, String firstName,
			String lastName, Gender gender); String getTwitterAccessToken(); void setTwitterAccessToken(String twitterAccessToken); String getTwitterAccessTokenSecret(); void setTwitterAccessTokenSecret(String twitterAccessTokenSecret); String getGooglePlusId(); void setGooglePlusId(String googlePlusId); String getGoogleAccessToken(); void setGoogleAccessToken(String googleAccessToken); String getGoogleUsername(); void setGoogleUsername(String googleUsername); String getPrimaryEmail(); void setPrimaryEmail(String primaryEmail); @Override void setEmails(Set<String> emails); String getPhotoId(); void setPhotoId(String photoId); Gender getGender(); void setGender(Gender gender); DateTime getBirthDate(); void setBirthDate(DateTime birthDate); String getLanguage(); void setLanguage(String language); CurrencyUnit getCurrency(); void setCurrency(CurrencyUnit currency); Long getFacebookId(); void setFacebookId(Long facebookId); String getFacebookUsername(); void setFacebookUsername(String facebookUsername); String getFacebookAccessToken(); void setFacebookAccessToken(String facebookAccessToken); Long getTwitterId(); void setTwitterId(Long twitterId); String getTwitterScreenName(); void setTwitterScreenName(String twitterScreenName); String getVirtualMail(); void setVirtualMail(String virtualMail); String getNickname(); void setNickname(String nickname); String getPrimaryShippingAddress(); void setPrimaryShippingAddress(String primaryShippingAddress); String getPrimaryBillingAddress(); void setPrimaryBillingAddress(String primaryBillingAddress); String getCustomerRole(); void setCustomerRole(String customerRole); String getMemberRole(); void setMemberRole(String memberRole); String getManagerRole(); void setManagerRole(String managerRole); String getTimezone(); void setTimezone(String timezone); String getReferrer(); void setReferrer(String referrer); String getReferrerType(); void setReferrerType(String referrerType); String getSignupSource(); void setSignupSource(String signupSource); SignupSourceType getSignupSourceType(); void setSignupSourceType(SignupSourceType signupSourceType); String getIpAddress(); void setIpAddress(String ipAddress); String getLastIpAddress(); void setLastIpAddress(String lastIpAddress); DateTime getCreationTime(); void setCreationTime(DateTime creationTime); DateTime getModificationTime(); void setModificationTime(DateTime modificationTime); DateTime getLastLoginTime(); void setLastLoginTime(DateTime lastLoginTime); DateTime getValidationTime(); void setValidationTime(DateTime validationTime); DateTime getActivationTime(); void setActivationTime(DateTime activationTime); DateTime getVerificationTime(); void setVerificationTime(DateTime verificationTime); AccountStatus getAccountStatus(); void setAccountStatus(AccountStatus accountStatus); DateTime getNewsletterSubscriptionTime(); void setNewsletterSubscriptionTime(DateTime newsletterSubscriptionTime); Boolean getNewsletterSubscriptionEnabled(); void setNewsletterSubscriptionEnabled(Boolean newsletterSubscriptionEnabled); Boolean getSocialSharingEnabled(); void setSocialSharingEnabled(Boolean socialSharingEnabled); Set<String> getValidMails(); void setValidMails(Set<String> validMails); PublicationStatus getPublicationStatus(); void setPublicationStatus(PublicationStatus publicationStatus); ArchivalStatus getArchivalStatus(); void setArchivalStatus(ArchivalStatus archivalStatus); String getFolder(); void setFolder(String folder); String getReligion(); void setReligion(String religion); String getPasswordResetCode(); void setPasswordResetCode(String passwordResetCode); DateTime getPasswordResetExpiryTime(); void setPasswordResetExpiryTime(DateTime passwordResetExpiryTime); BigDecimal getDebitBalance(); void setDebitBalance(BigDecimal debitBalance); CurrencyUnit getDebitCurrency(); void setDebitCurrency(CurrencyUnit debitCurrency); }
SocialPerson extends Person { public void setPrimaryEmail(String primaryEmail) { this.primaryEmail = primaryEmail; Builder<String> emailsBuilder = ImmutableSet.<String>builder(); if (getEmails() != null) emailsBuilder.addAll(getEmails()); if (primaryEmail != null) emailsBuilder.add(primaryEmail); final Set<String> newEmails = emailsBuilder.build(); if (!newEmails.equals(getEmails())) { setEmails( newEmails ); } } SocialPerson();  SocialPerson(String id, String slug, String firstName,
			String lastName);  SocialPerson(String id, String slug, String firstName,
			String lastName, Gender gender); String getTwitterAccessToken(); void setTwitterAccessToken(String twitterAccessToken); String getTwitterAccessTokenSecret(); void setTwitterAccessTokenSecret(String twitterAccessTokenSecret); String getGooglePlusId(); void setGooglePlusId(String googlePlusId); String getGoogleAccessToken(); void setGoogleAccessToken(String googleAccessToken); String getGoogleUsername(); void setGoogleUsername(String googleUsername); String getPrimaryEmail(); void setPrimaryEmail(String primaryEmail); @Override void setEmails(Set<String> emails); String getPhotoId(); void setPhotoId(String photoId); Gender getGender(); void setGender(Gender gender); DateTime getBirthDate(); void setBirthDate(DateTime birthDate); String getLanguage(); void setLanguage(String language); CurrencyUnit getCurrency(); void setCurrency(CurrencyUnit currency); Long getFacebookId(); void setFacebookId(Long facebookId); String getFacebookUsername(); void setFacebookUsername(String facebookUsername); String getFacebookAccessToken(); void setFacebookAccessToken(String facebookAccessToken); Long getTwitterId(); void setTwitterId(Long twitterId); String getTwitterScreenName(); void setTwitterScreenName(String twitterScreenName); String getVirtualMail(); void setVirtualMail(String virtualMail); String getNickname(); void setNickname(String nickname); String getPrimaryShippingAddress(); void setPrimaryShippingAddress(String primaryShippingAddress); String getPrimaryBillingAddress(); void setPrimaryBillingAddress(String primaryBillingAddress); String getCustomerRole(); void setCustomerRole(String customerRole); String getMemberRole(); void setMemberRole(String memberRole); String getManagerRole(); void setManagerRole(String managerRole); String getTimezone(); void setTimezone(String timezone); String getReferrer(); void setReferrer(String referrer); String getReferrerType(); void setReferrerType(String referrerType); String getSignupSource(); void setSignupSource(String signupSource); SignupSourceType getSignupSourceType(); void setSignupSourceType(SignupSourceType signupSourceType); String getIpAddress(); void setIpAddress(String ipAddress); String getLastIpAddress(); void setLastIpAddress(String lastIpAddress); DateTime getCreationTime(); void setCreationTime(DateTime creationTime); DateTime getModificationTime(); void setModificationTime(DateTime modificationTime); DateTime getLastLoginTime(); void setLastLoginTime(DateTime lastLoginTime); DateTime getValidationTime(); void setValidationTime(DateTime validationTime); DateTime getActivationTime(); void setActivationTime(DateTime activationTime); DateTime getVerificationTime(); void setVerificationTime(DateTime verificationTime); AccountStatus getAccountStatus(); void setAccountStatus(AccountStatus accountStatus); DateTime getNewsletterSubscriptionTime(); void setNewsletterSubscriptionTime(DateTime newsletterSubscriptionTime); Boolean getNewsletterSubscriptionEnabled(); void setNewsletterSubscriptionEnabled(Boolean newsletterSubscriptionEnabled); Boolean getSocialSharingEnabled(); void setSocialSharingEnabled(Boolean socialSharingEnabled); Set<String> getValidMails(); void setValidMails(Set<String> validMails); PublicationStatus getPublicationStatus(); void setPublicationStatus(PublicationStatus publicationStatus); ArchivalStatus getArchivalStatus(); void setArchivalStatus(ArchivalStatus archivalStatus); String getFolder(); void setFolder(String folder); String getReligion(); void setReligion(String religion); String getPasswordResetCode(); void setPasswordResetCode(String passwordResetCode); DateTime getPasswordResetExpiryTime(); void setPasswordResetExpiryTime(DateTime passwordResetExpiryTime); BigDecimal getDebitBalance(); void setDebitBalance(BigDecimal debitBalance); CurrencyUnit getDebitCurrency(); void setDebitCurrency(CurrencyUnit debitCurrency); @LdapAttribute("publicationStatus")
	private PublicationStatus publicationStatus; }