E - Entity type.PK - Primary key type.public interface EntityRepository<E,PK extends Serializable> extends EntityPersistenceRepository<E,PK>, EntityCountRepository<E>
| Modifier and Type | Method and Description |
|---|---|
List<E> |
findAll()
Lookup all existing entities of entity class
<E>. |
List<E> |
findAll(int start,
int max)
Lookup a range of existing entities of entity class
<E> with support for pagination. |
List<E> |
findBy(E example,
int start,
int max,
javax.persistence.metamodel.SingularAttribute<E,?>... attributes)
Query by example - for a given object and a specific set of properties with support for pagination.
|
List<E> |
findBy(E example,
javax.persistence.metamodel.SingularAttribute<E,?>... attributes)
Query by example - for a given object and a specific set of properties.
|
E |
findBy(PK primaryKey)
Entity lookup by primary key.
|
List<E> |
findByLike(E example,
int start,
int max,
javax.persistence.metamodel.SingularAttribute<E,?>... attributes)
Query by example - for a given object and a specific set of properties
using a like operator for Strings with support for pagination.
|
List<E> |
findByLike(E example,
javax.persistence.metamodel.SingularAttribute<E,?>... attributes)
Query by example - for a given object and a specific set of properties using a like operator for Strings.
|
attachAndRemove, flush, getPrimaryKey, refresh, remove, removeAndFlush, save, saveAndFlush, saveAndFlushAndRefreshcount, count, countLikeE findBy(PK primaryKey)
EntityManager.find(Class, Object).primaryKey - DB primary key.List<E> findAll()
<E>.List<E> findAll(int start, int max)
<E> with support for pagination.start - The starting position.max - The maximum number of results to returnList<E> findBy(E example, javax.persistence.metamodel.SingularAttribute<E,?>... attributes)
example - Sample entity. Query all like.attributes - Which attributes to consider for the query.List<E> findBy(E example, int start, int max, javax.persistence.metamodel.SingularAttribute<E,?>... attributes)
example - Sample entity. Query all like.start - The starting position.max - The maximum number of results to returnattributes - Which attributes to consider for the query.List<E> findByLike(E example, javax.persistence.metamodel.SingularAttribute<E,?>... attributes)
example - Sample entity. Query all like.attributes - Which attributes to consider for the query.List<E> findByLike(E example, int start, int max, javax.persistence.metamodel.SingularAttribute<E,?>... attributes)
example - Sample entity. Query all like.start - The starting position.max - The maximum number of results to returnattributes - Which attributes to consider for the query.Copyright © 2017 The Apache Software Foundation. All rights reserved.