Spring LDAP

org.springframework.ldap.repository.support
Class SimpleLdapRepository<T>

java.lang.Object
  extended by org.springframework.ldap.repository.support.SimpleLdapRepository<T>
All Implemented Interfaces:
org.springframework.data.repository.CrudRepository<T,Name>, org.springframework.data.repository.Repository<T,Name>, LdapRepository<T>
Direct Known Subclasses:
QueryDslLdapRepository

public class SimpleLdapRepository<T>
extends Object
implements LdapRepository<T>

Base repository implementation for LDAP.

Since:
2.0
Author:
Mattias Hellborg Arthursson

Constructor Summary
SimpleLdapRepository(LdapOperations ldapOperations, ObjectDirectoryMapper odm, Class<T> clazz)
           
 
Method Summary
 long count()
           
 void delete(Iterable<? extends T> entities)
           
 void delete(Name name)
           
 void delete(T entity)
           
 void deleteAll()
           
 boolean exists(Name name)
           
 List<T> findAll()
           
 List<T> findAll(Iterable<Name> names)
           
 List<T> findAll(LdapQuery ldapQuery)
          Find all entries matching the specified query.
 T findOne(LdapQuery ldapQuery)
          Find one entry matching the specified query.
 T findOne(Name name)
           
protected  Class<T> getClazz()
           
protected  LdapOperations getLdapOperations()
           
<S extends T>
Iterable<S>
save(Iterable<S> entities)
           
<S extends T>
S
save(S entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLdapRepository

public SimpleLdapRepository(LdapOperations ldapOperations,
                            ObjectDirectoryMapper odm,
                            Class<T> clazz)
Method Detail

getLdapOperations

protected LdapOperations getLdapOperations()

getClazz

protected Class<T> getClazz()

count

public long count()
Specified by:
count in interface org.springframework.data.repository.CrudRepository<T,Name>

save

public <S extends T> S save(S entity)
Specified by:
save in interface org.springframework.data.repository.CrudRepository<T,Name>

save

public <S extends T> Iterable<S> save(Iterable<S> entities)
Specified by:
save in interface org.springframework.data.repository.CrudRepository<T,Name>

findOne

public T findOne(Name name)
Specified by:
findOne in interface org.springframework.data.repository.CrudRepository<T,Name>

findAll

public List<T> findAll(LdapQuery ldapQuery)
Description copied from interface: LdapRepository
Find all entries matching the specified query.

Specified by:
findAll in interface LdapRepository<T>
Parameters:
ldapQuery - the query specification.
Returns:
the entries matching the query.

findOne

public T findOne(LdapQuery ldapQuery)
Description copied from interface: LdapRepository
Find one entry matching the specified query.

Specified by:
findOne in interface LdapRepository<T>
Parameters:
ldapQuery - the query specification.
Returns:
the found entry or null if no matching entry was found.

exists

public boolean exists(Name name)
Specified by:
exists in interface org.springframework.data.repository.CrudRepository<T,Name>

findAll

public List<T> findAll()
Specified by:
findAll in interface org.springframework.data.repository.CrudRepository<T,Name>

findAll

public List<T> findAll(Iterable<Name> names)
Specified by:
findAll in interface org.springframework.data.repository.CrudRepository<T,Name>

delete

public void delete(Name name)
Specified by:
delete in interface org.springframework.data.repository.CrudRepository<T,Name>

delete

public void delete(T entity)
Specified by:
delete in interface org.springframework.data.repository.CrudRepository<T,Name>

delete

public void delete(Iterable<? extends T> entities)
Specified by:
delete in interface org.springframework.data.repository.CrudRepository<T,Name>

deleteAll

public void deleteAll()
Specified by:
deleteAll in interface org.springframework.data.repository.CrudRepository<T,Name>

Spring LDAP