public class JdbcRepository<T,ID extends Serializable> extends Object implements EntityRepository<T,ID>
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
JdbcRepository(Class<T> entityClass,
org.springframework.jdbc.core.JdbcTemplate template) |
Modifier and Type | Method and Description |
---|---|
long |
count() |
long |
count(Object queryMethod) |
void |
delete(ID id) |
void |
delete(Iterable<? extends T> entities) |
void |
delete(T entity) |
long |
deleteAll() |
long |
deleteAll(Object queryMethod) |
<R,X> R |
execute(TemplateCallback<R,X> callback) |
boolean |
exists(ID id) |
boolean |
exists(T entity) |
List<T> |
findAll() |
List<T> |
findAll(Object queryMethod) |
org.springframework.data.domain.Page<T> |
findAll(Object queryMethod,
org.springframework.data.domain.Pageable pageable) |
List<T> |
findAll(Object queryMethod,
org.springframework.data.domain.Sort sort) |
org.springframework.data.domain.Page<T> |
findAll(org.springframework.data.domain.Pageable pageable) |
List<T> |
findAll(org.springframework.data.domain.Sort sort) |
T |
findOne(ID id) |
T |
findOne(T entity) |
<S extends T> |
save(Iterable<S> entities) |
<S extends T> |
save(S entity) |
void |
setDialect(com.mysema.query.sql.SQLTemplates dialect) |
public void setDialect(com.mysema.query.sql.SQLTemplates dialect)
public boolean exists(T entity)
exists
in interface EntityRepository<T,ID extends Serializable>
public boolean exists(ID id)
exists
in interface EntityRepository<T,ID extends Serializable>
public T findOne(T entity)
findOne
in interface EntityRepository<T,ID extends Serializable>
public T findOne(ID id)
findOne
in interface EntityRepository<T,ID extends Serializable>
public <S extends T> S save(S entity)
save
in interface EntityRepository<T,ID extends Serializable>
public <S extends T> Iterable<S> save(Iterable<S> entities)
save
in interface EntityRepository<T,ID extends Serializable>
public void delete(ID id)
delete
in interface EntityRepository<T,ID extends Serializable>
public void delete(T entity)
delete
in interface EntityRepository<T,ID extends Serializable>
public void delete(Iterable<? extends T> entities)
delete
in interface EntityRepository<T,ID extends Serializable>
public long deleteAll()
deleteAll
in interface EntityRepository<T,ID extends Serializable>
public long count()
count
in interface EntityRepository<T,ID extends Serializable>
public List<T> findAll()
findAll
in interface EntityRepository<T,ID extends Serializable>
public List<T> findAll(org.springframework.data.domain.Sort sort)
findAll
in interface EntityRepository<T,ID extends Serializable>
public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
findAll
in interface EntityRepository<T,ID extends Serializable>
public long deleteAll(Object queryMethod)
deleteAll
in interface EntityRepository<T,ID extends Serializable>
public long count(Object queryMethod)
count
in interface EntityRepository<T,ID extends Serializable>
public List<T> findAll(Object queryMethod)
findAll
in interface EntityRepository<T,ID extends Serializable>
public List<T> findAll(Object queryMethod, org.springframework.data.domain.Sort sort)
findAll
in interface EntityRepository<T,ID extends Serializable>
public org.springframework.data.domain.Page<T> findAll(Object queryMethod, org.springframework.data.domain.Pageable pageable)
findAll
in interface EntityRepository<T,ID extends Serializable>
public <R,X> R execute(TemplateCallback<R,X> callback)
execute
in interface EntityRepository<T,ID extends Serializable>
Copyright © 2010-2014 U2ware. All Rights Reserved.