Class PersonDaoImpl

java.lang.Object
org.springframework.ldap.samples.plain.dao.PersonDaoImpl
All Implemented Interfaces:
PersonDao

public class PersonDaoImpl extends Object implements PersonDao
Default implementation of PersonDao. This implementation uses DirContextAdapter for managing attribute values. We use a ContextMapper to map from the found contexts to our domain objects. This is especially useful since we in this case have properties in our domain objects that depend on parts of the DN. We could have worked with Attributes and an AttributesMapper implementation instead, but working with Attributes is a bore and also, working with AttributesMapper objects (or, indeed Attributes) does not give us access to the distinguished name. However, we do use it in one method that only needs a single attribute: getAllPersonNames().