@Test public void testEquals() throws Exception { LdapServerProperties properties1 = configuration.getLdapServerProperties(); LdapServerProperties properties2 = configuration.getLdapServerProperties(); assertTrue("Properties object is same", properties1 != properties2); assertTrue("Objects are not equal", properties1.equals(properties2)); assertTrue("Hash codes are not equal", properties1.hashCode() == properties2.hashCode()); properties2.setSecondaryUrl("5.6.7.8:389"); assertFalse("Objects are equal", properties1.equals(properties2)); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; LdapServerProperties that = (LdapServerProperties) obj; if (primaryUrl != null ? !primaryUrl.equals(that.primaryUrl) : that.primaryUrl != null) return false; if (secondaryUrl != null ? !secondaryUrl.equals(that.secondaryUrl) : that.secondaryUrl != null) return false; if (useSsl!=that.useSsl) return false; if (anonymousBind!=that.anonymousBind) return false; if (managerDn != null ? !managerDn.equals(that.managerDn) : that.managerDn != null) return false; if (managerPassword != null ? !managerPassword.equals(that.managerPassword) : that.managerPassword != null) return false; if (baseDN != null ? !baseDN.equals(that.baseDN) : that.baseDN != null) return false; if (userBase != null ? !userBase.equals(that.userBase) : that.userBase != null) return false; if (userObjectClass != null ? !userObjectClass.equals(that.userObjectClass) : that.userObjectClass != null) return false; if (usernameAttribute != null ? !usernameAttribute.equals(that.usernameAttribute) : that.usernameAttribute != null) return false; if (forceUsernameToLowercase != that.forceUsernameToLowercase) return false; if (groupBase != null ? !groupBase.equals(that.groupBase) : that.groupBase != null) return false; if (groupObjectClass != null ? !groupObjectClass.equals(that.groupObjectClass) : that.groupObjectClass != null) return false; if (groupMembershipAttr != null ? !groupMembershipAttr.equals( that.groupMembershipAttr) : that.groupMembershipAttr != null) return false; if (groupNamingAttr != null ? !groupNamingAttr.equals(that.groupNamingAttr) : that.groupNamingAttr != null) return false; if (adminGroupMappingRules != null ? !adminGroupMappingRules.equals( that.adminGroupMappingRules) : that.adminGroupMappingRules != null) return false; if (groupSearchFilter != null ? !groupSearchFilter.equals( that.groupSearchFilter) : that.groupSearchFilter != null) return false; if (dnAttribute != null ? !dnAttribute.equals( that.dnAttribute) : that.dnAttribute != null) return false; if (syncGroupMemberReplacePattern != null ? !syncGroupMemberReplacePattern.equals( that.syncGroupMemberReplacePattern) : that.syncGroupMemberReplacePattern != null) return false; if (syncUserMemberReplacePattern != null ? !syncUserMemberReplacePattern.equals( that.syncUserMemberReplacePattern) : that.syncUserMemberReplacePattern != null) return false; if (syncUserMemberFilter != null ? !syncUserMemberFilter.equals( that.syncUserMemberFilter) : that.syncUserMemberFilter != null) return false; if (syncGroupMemberFilter != null ? !syncGroupMemberFilter.equals( that.syncGroupMemberFilter) : that.syncGroupMemberFilter != null) return false; if (referralMethod != null ? !referralMethod.equals(that.referralMethod) : that.referralMethod != null) return false; if (groupMappingEnabled != that.isGroupMappingEnabled()) return false; if (paginationEnabled != that.isPaginationEnabled()) return false; if (userSearchFilter != null ? !userSearchFilter.equals(that.userSearchFilter) : that.userSearchFilter != null) return false; if (alternateUserSearchFilter != null ? !alternateUserSearchFilter.equals(that.alternateUserSearchFilter) : that.alternateUserSearchFilter != null) return false; if (adminGroupMappingMemberAttr != null ? !adminGroupMappingMemberAttr.equals(that.adminGroupMappingMemberAttr) : that.adminGroupMappingMemberAttr != null) return false; return true; }
LdapServerProperties { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; LdapServerProperties that = (LdapServerProperties) obj; if (primaryUrl != null ? !primaryUrl.equals(that.primaryUrl) : that.primaryUrl != null) return false; if (secondaryUrl != null ? !secondaryUrl.equals(that.secondaryUrl) : that.secondaryUrl != null) return false; if (useSsl!=that.useSsl) return false; if (anonymousBind!=that.anonymousBind) return false; if (managerDn != null ? !managerDn.equals(that.managerDn) : that.managerDn != null) return false; if (managerPassword != null ? !managerPassword.equals(that.managerPassword) : that.managerPassword != null) return false; if (baseDN != null ? !baseDN.equals(that.baseDN) : that.baseDN != null) return false; if (userBase != null ? !userBase.equals(that.userBase) : that.userBase != null) return false; if (userObjectClass != null ? !userObjectClass.equals(that.userObjectClass) : that.userObjectClass != null) return false; if (usernameAttribute != null ? !usernameAttribute.equals(that.usernameAttribute) : that.usernameAttribute != null) return false; if (forceUsernameToLowercase != that.forceUsernameToLowercase) return false; if (groupBase != null ? !groupBase.equals(that.groupBase) : that.groupBase != null) return false; if (groupObjectClass != null ? !groupObjectClass.equals(that.groupObjectClass) : that.groupObjectClass != null) return false; if (groupMembershipAttr != null ? !groupMembershipAttr.equals( that.groupMembershipAttr) : that.groupMembershipAttr != null) return false; if (groupNamingAttr != null ? !groupNamingAttr.equals(that.groupNamingAttr) : that.groupNamingAttr != null) return false; if (adminGroupMappingRules != null ? !adminGroupMappingRules.equals( that.adminGroupMappingRules) : that.adminGroupMappingRules != null) return false; if (groupSearchFilter != null ? !groupSearchFilter.equals( that.groupSearchFilter) : that.groupSearchFilter != null) return false; if (dnAttribute != null ? !dnAttribute.equals( that.dnAttribute) : that.dnAttribute != null) return false; if (syncGroupMemberReplacePattern != null ? !syncGroupMemberReplacePattern.equals( that.syncGroupMemberReplacePattern) : that.syncGroupMemberReplacePattern != null) return false; if (syncUserMemberReplacePattern != null ? !syncUserMemberReplacePattern.equals( that.syncUserMemberReplacePattern) : that.syncUserMemberReplacePattern != null) return false; if (syncUserMemberFilter != null ? !syncUserMemberFilter.equals( that.syncUserMemberFilter) : that.syncUserMemberFilter != null) return false; if (syncGroupMemberFilter != null ? !syncGroupMemberFilter.equals( that.syncGroupMemberFilter) : that.syncGroupMemberFilter != null) return false; if (referralMethod != null ? !referralMethod.equals(that.referralMethod) : that.referralMethod != null) return false; if (groupMappingEnabled != that.isGroupMappingEnabled()) return false; if (paginationEnabled != that.isPaginationEnabled()) return false; if (userSearchFilter != null ? !userSearchFilter.equals(that.userSearchFilter) : that.userSearchFilter != null) return false; if (alternateUserSearchFilter != null ? !alternateUserSearchFilter.equals(that.alternateUserSearchFilter) : that.alternateUserSearchFilter != null) return false; if (adminGroupMappingMemberAttr != null ? !adminGroupMappingMemberAttr.equals(that.adminGroupMappingMemberAttr) : that.adminGroupMappingMemberAttr != null) return false; return true; } }
LdapServerProperties { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; LdapServerProperties that = (LdapServerProperties) obj; if (primaryUrl != null ? !primaryUrl.equals(that.primaryUrl) : that.primaryUrl != null) return false; if (secondaryUrl != null ? !secondaryUrl.equals(that.secondaryUrl) : that.secondaryUrl != null) return false; if (useSsl!=that.useSsl) return false; if (anonymousBind!=that.anonymousBind) return false; if (managerDn != null ? !managerDn.equals(that.managerDn) : that.managerDn != null) return false; if (managerPassword != null ? !managerPassword.equals(that.managerPassword) : that.managerPassword != null) return false; if (baseDN != null ? !baseDN.equals(that.baseDN) : that.baseDN != null) return false; if (userBase != null ? !userBase.equals(that.userBase) : that.userBase != null) return false; if (userObjectClass != null ? !userObjectClass.equals(that.userObjectClass) : that.userObjectClass != null) return false; if (usernameAttribute != null ? !usernameAttribute.equals(that.usernameAttribute) : that.usernameAttribute != null) return false; if (forceUsernameToLowercase != that.forceUsernameToLowercase) return false; if (groupBase != null ? !groupBase.equals(that.groupBase) : that.groupBase != null) return false; if (groupObjectClass != null ? !groupObjectClass.equals(that.groupObjectClass) : that.groupObjectClass != null) return false; if (groupMembershipAttr != null ? !groupMembershipAttr.equals( that.groupMembershipAttr) : that.groupMembershipAttr != null) return false; if (groupNamingAttr != null ? !groupNamingAttr.equals(that.groupNamingAttr) : that.groupNamingAttr != null) return false; if (adminGroupMappingRules != null ? !adminGroupMappingRules.equals( that.adminGroupMappingRules) : that.adminGroupMappingRules != null) return false; if (groupSearchFilter != null ? !groupSearchFilter.equals( that.groupSearchFilter) : that.groupSearchFilter != null) return false; if (dnAttribute != null ? !dnAttribute.equals( that.dnAttribute) : that.dnAttribute != null) return false; if (syncGroupMemberReplacePattern != null ? !syncGroupMemberReplacePattern.equals( that.syncGroupMemberReplacePattern) : that.syncGroupMemberReplacePattern != null) return false; if (syncUserMemberReplacePattern != null ? !syncUserMemberReplacePattern.equals( that.syncUserMemberReplacePattern) : that.syncUserMemberReplacePattern != null) return false; if (syncUserMemberFilter != null ? !syncUserMemberFilter.equals( that.syncUserMemberFilter) : that.syncUserMemberFilter != null) return false; if (syncGroupMemberFilter != null ? !syncGroupMemberFilter.equals( that.syncGroupMemberFilter) : that.syncGroupMemberFilter != null) return false; if (referralMethod != null ? !referralMethod.equals(that.referralMethod) : that.referralMethod != null) return false; if (groupMappingEnabled != that.isGroupMappingEnabled()) return false; if (paginationEnabled != that.isPaginationEnabled()) return false; if (userSearchFilter != null ? !userSearchFilter.equals(that.userSearchFilter) : that.userSearchFilter != null) return false; if (alternateUserSearchFilter != null ? !alternateUserSearchFilter.equals(that.alternateUserSearchFilter) : that.alternateUserSearchFilter != null) return false; if (adminGroupMappingMemberAttr != null ? !adminGroupMappingMemberAttr.equals(that.adminGroupMappingMemberAttr) : that.adminGroupMappingMemberAttr != null) return false; return true; }  }
LdapServerProperties { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; LdapServerProperties that = (LdapServerProperties) obj; if (primaryUrl != null ? !primaryUrl.equals(that.primaryUrl) : that.primaryUrl != null) return false; if (secondaryUrl != null ? !secondaryUrl.equals(that.secondaryUrl) : that.secondaryUrl != null) return false; if (useSsl!=that.useSsl) return false; if (anonymousBind!=that.anonymousBind) return false; if (managerDn != null ? !managerDn.equals(that.managerDn) : that.managerDn != null) return false; if (managerPassword != null ? !managerPassword.equals(that.managerPassword) : that.managerPassword != null) return false; if (baseDN != null ? !baseDN.equals(that.baseDN) : that.baseDN != null) return false; if (userBase != null ? !userBase.equals(that.userBase) : that.userBase != null) return false; if (userObjectClass != null ? !userObjectClass.equals(that.userObjectClass) : that.userObjectClass != null) return false; if (usernameAttribute != null ? !usernameAttribute.equals(that.usernameAttribute) : that.usernameAttribute != null) return false; if (forceUsernameToLowercase != that.forceUsernameToLowercase) return false; if (groupBase != null ? !groupBase.equals(that.groupBase) : that.groupBase != null) return false; if (groupObjectClass != null ? !groupObjectClass.equals(that.groupObjectClass) : that.groupObjectClass != null) return false; if (groupMembershipAttr != null ? !groupMembershipAttr.equals( that.groupMembershipAttr) : that.groupMembershipAttr != null) return false; if (groupNamingAttr != null ? !groupNamingAttr.equals(that.groupNamingAttr) : that.groupNamingAttr != null) return false; if (adminGroupMappingRules != null ? !adminGroupMappingRules.equals( that.adminGroupMappingRules) : that.adminGroupMappingRules != null) return false; if (groupSearchFilter != null ? !groupSearchFilter.equals( that.groupSearchFilter) : that.groupSearchFilter != null) return false; if (dnAttribute != null ? !dnAttribute.equals( that.dnAttribute) : that.dnAttribute != null) return false; if (syncGroupMemberReplacePattern != null ? !syncGroupMemberReplacePattern.equals( that.syncGroupMemberReplacePattern) : that.syncGroupMemberReplacePattern != null) return false; if (syncUserMemberReplacePattern != null ? !syncUserMemberReplacePattern.equals( that.syncUserMemberReplacePattern) : that.syncUserMemberReplacePattern != null) return false; if (syncUserMemberFilter != null ? !syncUserMemberFilter.equals( that.syncUserMemberFilter) : that.syncUserMemberFilter != null) return false; if (syncGroupMemberFilter != null ? !syncGroupMemberFilter.equals( that.syncGroupMemberFilter) : that.syncGroupMemberFilter != null) return false; if (referralMethod != null ? !referralMethod.equals(that.referralMethod) : that.referralMethod != null) return false; if (groupMappingEnabled != that.isGroupMappingEnabled()) return false; if (paginationEnabled != that.isPaginationEnabled()) return false; if (userSearchFilter != null ? !userSearchFilter.equals(that.userSearchFilter) : that.userSearchFilter != null) return false; if (alternateUserSearchFilter != null ? !alternateUserSearchFilter.equals(that.alternateUserSearchFilter) : that.alternateUserSearchFilter != null) return false; if (adminGroupMappingMemberAttr != null ? !adminGroupMappingMemberAttr.equals(that.adminGroupMappingMemberAttr) : that.adminGroupMappingMemberAttr != null) return false; return true; }  List<String> getLdapUrls(); String getPrimaryUrl(); void setPrimaryUrl(String primaryUrl); String getSecondaryUrl(); void setSecondaryUrl(String secondaryUrl); boolean isUseSsl(); void setUseSsl(boolean useSsl); boolean isAnonymousBind(); void setAnonymousBind(boolean anonymousBind); String getManagerDn(); void setManagerDn(String managerDn); String getManagerPassword(); void setManagerPassword(String managerPassword); String getBaseDN(); void setBaseDN(String baseDN); String getUserSearchBase(); void setUserSearchBase(String userSearchBase); String getUserSearchFilter(boolean useAlternateUserSearchFilter); String getUsernameAttribute(); void setUsernameAttribute(String usernameAttribute); void setForceUsernameToLowercase(boolean forceUsernameToLowercase); boolean isForceUsernameToLowercase(); String getGroupBase(); void setGroupBase(String groupBase); String getGroupObjectClass(); void setGroupObjectClass(String groupObjectClass); String getGroupMembershipAttr(); void setGroupMembershipAttr(String groupMembershipAttr); String getGroupNamingAttr(); void setGroupNamingAttr(String groupNamingAttr); String getAdminGroupMappingRules(); void setAdminGroupMappingRules(String adminGroupMappingRules); String getGroupSearchFilter(); void setGroupSearchFilter(String groupSearchFilter); void setUserSearchFilter(String userSearchFilter); void setAlternateUserSearchFilter(String alternateUserSearchFilter); boolean isGroupMappingEnabled(); void setGroupMappingEnabled(boolean groupMappingEnabled); void setUserBase(String userBase); void setUserObjectClass(String userObjectClass); String getUserBase(); String getUserObjectClass(); String getDnAttribute(); void setDnAttribute(String dnAttribute); void setReferralMethod(String referralMethod); String getReferralMethod(); boolean isPaginationEnabled(); void setPaginationEnabled(boolean paginationEnabled); String getSyncGroupMemberReplacePattern(); void setSyncGroupMemberReplacePattern(String syncGroupMemberReplacePattern); String getSyncUserMemberReplacePattern(); void setSyncUserMemberReplacePattern(String syncUserMemberReplacePattern); String getSyncUserMemberFilter(); void setSyncUserMemberFilter(String syncUserMemberFilter); String getSyncGroupMemberFilter(); void setSyncGroupMemberFilter(String syncGroupMemberFilter); String getAdminGroupMappingMemberAttr(); void setAdminGroupMappingMemberAttr(String adminGroupMappingMemberAttr); @Override boolean equals(Object obj); @Override int hashCode(); }
LdapServerProperties { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; LdapServerProperties that = (LdapServerProperties) obj; if (primaryUrl != null ? !primaryUrl.equals(that.primaryUrl) : that.primaryUrl != null) return false; if (secondaryUrl != null ? !secondaryUrl.equals(that.secondaryUrl) : that.secondaryUrl != null) return false; if (useSsl!=that.useSsl) return false; if (anonymousBind!=that.anonymousBind) return false; if (managerDn != null ? !managerDn.equals(that.managerDn) : that.managerDn != null) return false; if (managerPassword != null ? !managerPassword.equals(that.managerPassword) : that.managerPassword != null) return false; if (baseDN != null ? !baseDN.equals(that.baseDN) : that.baseDN != null) return false; if (userBase != null ? !userBase.equals(that.userBase) : that.userBase != null) return false; if (userObjectClass != null ? !userObjectClass.equals(that.userObjectClass) : that.userObjectClass != null) return false; if (usernameAttribute != null ? !usernameAttribute.equals(that.usernameAttribute) : that.usernameAttribute != null) return false; if (forceUsernameToLowercase != that.forceUsernameToLowercase) return false; if (groupBase != null ? !groupBase.equals(that.groupBase) : that.groupBase != null) return false; if (groupObjectClass != null ? !groupObjectClass.equals(that.groupObjectClass) : that.groupObjectClass != null) return false; if (groupMembershipAttr != null ? !groupMembershipAttr.equals( that.groupMembershipAttr) : that.groupMembershipAttr != null) return false; if (groupNamingAttr != null ? !groupNamingAttr.equals(that.groupNamingAttr) : that.groupNamingAttr != null) return false; if (adminGroupMappingRules != null ? !adminGroupMappingRules.equals( that.adminGroupMappingRules) : that.adminGroupMappingRules != null) return false; if (groupSearchFilter != null ? !groupSearchFilter.equals( that.groupSearchFilter) : that.groupSearchFilter != null) return false; if (dnAttribute != null ? !dnAttribute.equals( that.dnAttribute) : that.dnAttribute != null) return false; if (syncGroupMemberReplacePattern != null ? !syncGroupMemberReplacePattern.equals( that.syncGroupMemberReplacePattern) : that.syncGroupMemberReplacePattern != null) return false; if (syncUserMemberReplacePattern != null ? !syncUserMemberReplacePattern.equals( that.syncUserMemberReplacePattern) : that.syncUserMemberReplacePattern != null) return false; if (syncUserMemberFilter != null ? !syncUserMemberFilter.equals( that.syncUserMemberFilter) : that.syncUserMemberFilter != null) return false; if (syncGroupMemberFilter != null ? !syncGroupMemberFilter.equals( that.syncGroupMemberFilter) : that.syncGroupMemberFilter != null) return false; if (referralMethod != null ? !referralMethod.equals(that.referralMethod) : that.referralMethod != null) return false; if (groupMappingEnabled != that.isGroupMappingEnabled()) return false; if (paginationEnabled != that.isPaginationEnabled()) return false; if (userSearchFilter != null ? !userSearchFilter.equals(that.userSearchFilter) : that.userSearchFilter != null) return false; if (alternateUserSearchFilter != null ? !alternateUserSearchFilter.equals(that.alternateUserSearchFilter) : that.alternateUserSearchFilter != null) return false; if (adminGroupMappingMemberAttr != null ? !adminGroupMappingMemberAttr.equals(that.adminGroupMappingMemberAttr) : that.adminGroupMappingMemberAttr != null) return false; return true; }  List<String> getLdapUrls(); String getPrimaryUrl(); void setPrimaryUrl(String primaryUrl); String getSecondaryUrl(); void setSecondaryUrl(String secondaryUrl); boolean isUseSsl(); void setUseSsl(boolean useSsl); boolean isAnonymousBind(); void setAnonymousBind(boolean anonymousBind); String getManagerDn(); void setManagerDn(String managerDn); String getManagerPassword(); void setManagerPassword(String managerPassword); String getBaseDN(); void setBaseDN(String baseDN); String getUserSearchBase(); void setUserSearchBase(String userSearchBase); String getUserSearchFilter(boolean useAlternateUserSearchFilter); String getUsernameAttribute(); void setUsernameAttribute(String usernameAttribute); void setForceUsernameToLowercase(boolean forceUsernameToLowercase); boolean isForceUsernameToLowercase(); String getGroupBase(); void setGroupBase(String groupBase); String getGroupObjectClass(); void setGroupObjectClass(String groupObjectClass); String getGroupMembershipAttr(); void setGroupMembershipAttr(String groupMembershipAttr); String getGroupNamingAttr(); void setGroupNamingAttr(String groupNamingAttr); String getAdminGroupMappingRules(); void setAdminGroupMappingRules(String adminGroupMappingRules); String getGroupSearchFilter(); void setGroupSearchFilter(String groupSearchFilter); void setUserSearchFilter(String userSearchFilter); void setAlternateUserSearchFilter(String alternateUserSearchFilter); boolean isGroupMappingEnabled(); void setGroupMappingEnabled(boolean groupMappingEnabled); void setUserBase(String userBase); void setUserObjectClass(String userObjectClass); String getUserBase(); String getUserObjectClass(); String getDnAttribute(); void setDnAttribute(String dnAttribute); void setReferralMethod(String referralMethod); String getReferralMethod(); boolean isPaginationEnabled(); void setPaginationEnabled(boolean paginationEnabled); String getSyncGroupMemberReplacePattern(); void setSyncGroupMemberReplacePattern(String syncGroupMemberReplacePattern); String getSyncUserMemberReplacePattern(); void setSyncUserMemberReplacePattern(String syncUserMemberReplacePattern); String getSyncUserMemberFilter(); void setSyncUserMemberFilter(String syncUserMemberFilter); String getSyncGroupMemberFilter(); void setSyncGroupMemberFilter(String syncGroupMemberFilter); String getAdminGroupMappingMemberAttr(); void setAdminGroupMappingMemberAttr(String adminGroupMappingMemberAttr); @Override boolean equals(Object obj); @Override int hashCode();  }