ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java
public DirContextOperations searchForSingleEntry(final String base,
			final String filter, final Object[] params) {

		return (DirContextOperations) executeReadOnly(new ContextExecutor() {
			public Object executeWithContext(DirContext ctx) throws NamingException {
				return searchForSingleEntryInternal(ctx, searchControls, base, filter,
						params);
			}
		});
	}
public DirContextOperations searchForSingleEntry(final String base,
			final String filter, final Object[] params) {

		return (DirContextOperations) executeReadOnly(new ContextExecutor() {
			public Object executeWithContext(DirContext ctx) throws NamingException {
				return searchForSingleEntryInternal(ctx, searchControls, base, filter,
						params);
			}
		});
	}
public DirContextOperations searchForSingleEntry ( final String base , final String filter , final Object [ ] params ) { return ( DirContextOperations ) executeReadOnly ( new ContextExecutor ( ) { public Object executeWithContext ( DirContext ctx ) throws NamingException { return searchForSingleEntryInternal ( ctx , searchControls , base , filter , params ) ; } } ) ; }
Performs a search, with the requirement that the search shall return a single
directory entry, and uses the supplied mapper to create the object from that entry.
<p>
Ignores <tt>PartialResultException</tt> if thrown, for compatibility with Active
Directory (see {@link LdapTemplate#setIgnorePartialResultException(boolean)}).

@param base the search base, relative to the base context supplied by the context
source.
@param filter the LDAP search filter
@param params parameters to be substituted in the search.

@return a DirContextOperations instance created from the matching entry.

@throws IncorrectResultSizeDataAccessException if no results are found or the
search returns more than one result.
Performs a search with the requirement that the search shall return a single directory entry and uses the supplied mapper to create the object from that entry . <p > Ignores <tt > PartialResultException< / tt > if thrown for compatibility with Active Directory ( see { @link LdapTemplate#setIgnorePartialResultException ( boolean ) } ) .