Class PersonDaoImpl
java.lang.Object
org.springframework.ldap.samples.plain.dao.PersonDaoImpl
- All Implemented Interfaces:
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()
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
findAll()
findByPrimaryKey
(String country, String company, String fullname) void
setLdapTemplate
(LdapTemplate ldapTemplate) void
-
Constructor Details
-
PersonDaoImpl
public PersonDaoImpl()
-
-
Method Details
-
create
-
update
-
delete
-
getAllPersonNames
- Specified by:
getAllPersonNames
in interfacePersonDao
-
findAll
-
findByPrimaryKey
- Specified by:
findByPrimaryKey
in interfacePersonDao
-
setLdapTemplate
-