org.springframework.ldap.odm.core

## Interface OdmManager

- All Known Implementing Classes:
    OdmManagerImpl

  Deprecated.
  This functionality is automatically available in LdapTemplate as of version 2.0

      public interface OdmManager

  The OdmManager interface provides generic CRUD (create/read/update/delete) and searching operations against an LDAP directory.

  Each managed Java class must be appropriately annotated using `org.springframework.ldap.odm.annotations`.

  Author:
    Paul Harvey <paul.at.pauls-place.me.uk>, Mattias Hellborg Arthursson
  See Also:
    `Entry`, `Attribute`, `Id`, `Transient`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `create(Object entry)` Deprecated. Create the given entry in the LDAP directory.
    `void` | `delete(Object entry)` Deprecated. Delete an entry from the LDAP directory.
    `<T> List<T>` | `findAll(Class<T> clazz, Name base, SearchControls searchControls)` Deprecated. Find all entries in the LDAP directory of a given type.
    `<T> T` | `read(Class<T> clazz, Name dn)` Deprecated. Read a named entry from the LDAP directory.
    `<T> List<T>` | `search(Class<T> clazz, LdapQuery query)` Deprecated. Search for entries in the LDAP directory.
    `<T> List<T>` | `search(Class<T> clazz, Name base, String filter, SearchControls searchControls)` Deprecated. Search for entries in the LDAP directory.
    `void` | `update(Object entry)` Deprecated. Update the given entry in the LDAP directory.

- - ### Method Detail

    - #### read

          <T> T read(Class<T> clazz,
                     Name dn)

      Deprecated.
      Read a named entry from the LDAP directory.
      Type Parameters:
        `T` - The Java type to return
      Parameters:
        `clazz` - The Java type to return
        `dn` - The distinguished name of the entry to read from the LDAP directory.
      Returns:
        The entry as read from the directory
      Throws:
        `NamingException` - on error.

    - #### create

          void create(Object entry)

      Deprecated.
      Create the given entry in the LDAP directory.
      Parameters:
        `entry` - The entry to be create, it must not already exist in the directory.
      Throws:
        `NamingException` - on error.

    - #### update

          void update(Object entry)

      Deprecated.
      Update the given entry in the LDAP directory.
      Parameters:
        `entry` - The entry to update, it must already exist in the directory.
      Throws:
        `NamingException` - on error.

    - #### delete

          void delete(Object entry)

      Deprecated.
      Delete an entry from the LDAP directory.
      Parameters:
        `entry` - The entry to delete, it must already exist in the directory.
      Throws:
        `NamingException` - on error.

    - #### findAll

          <T> List<T> findAll(Class<T> clazz,
                              Name base,
                              SearchControls searchControls)

      Deprecated.
      Find all entries in the LDAP directory of a given type.
      Type Parameters:
        `T` - The Java type to return
      Parameters:
        `clazz` - The Java type to return
        `base` - The root of the sub-tree at which to begin the search.
        `searchControls` - The scope of the search.
      Returns:
        All entries that are of the type represented by the given Java class
      Throws:
        `NamingException` - on error.

    - #### search

          <T> List<T> search(Class<T> clazz,
                             Name base,
                             String filter,
                             SearchControls searchControls)

      Deprecated.
      Search for entries in the LDAP directory.

      Only those entries that both match the given search filter and are represented by the given Java class are returned

      Type Parameters:
        `T` - The Java type to return
      Parameters:
        `clazz` - The Java type to return
        `base` - The root of the sub-tree at which to begin the search.
        `filter` - An LDAP search filter.
        `searchControls` - The scope of the search.
      Returns:
        All matching entries.
      Throws:
        `NamingException` - on error.
      See Also:
        Sun's JNDI tutorial description of search filters., LDAP: String Representation of Search Filters RFC.

    - #### search

          <T> List<T> search(Class<T> clazz,
                             LdapQuery query)

      Deprecated.
      Search for entries in the LDAP directory.

      Only those entries that both match the query search filter and are represented by the given Java class are returned.

      Type Parameters:
        `T` - The Java type to return
      Parameters:
        `clazz` - The Java type to return
        `query` - the LDAP query specification
      Returns:
        All matching entries.
      Throws:
        `NamingException` - on error.
      See Also:
        `LdapQueryBuilder`