public class RepositoryMock<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>> extends Object implements org.jboss.pnc.spi.datastore.repositories.api.Repository<EntityType,Integer>
| Modifier and Type | Field and Description |
|---|---|
protected List<EntityType> |
data |
| Constructor and Description |
|---|
RepositoryMock() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
int |
count(Collection<org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>> andPredicates,
Collection<org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>> orPredicates) |
int |
count(org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>... predicates) |
void |
delete(Integer id) |
List<EntityType> |
queryAll() |
List<EntityType> |
queryAll(org.jboss.pnc.spi.datastore.repositories.api.PageInfo pageInfo,
org.jboss.pnc.spi.datastore.repositories.api.SortInfo sortInfo) |
EntityType |
queryById(Integer id) |
EntityType |
queryByPredicates(org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>... predicates) |
List<EntityType> |
queryWithPredicates(org.jboss.pnc.spi.datastore.repositories.api.PageInfo pageInfo,
org.jboss.pnc.spi.datastore.repositories.api.SortInfo sortInfo,
org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>... predicates) |
List<EntityType> |
queryWithPredicates(org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>... predicates) |
EntityType |
save(EntityType entity) |
protected final List<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>> data
public EntityType save(EntityType entity)
save in interface org.jboss.pnc.spi.datastore.repositories.api.Repository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public List<EntityType> queryAll()
queryAll in interface org.jboss.pnc.spi.datastore.repositories.api.ReadOnlyRepository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public List<EntityType> queryAll(org.jboss.pnc.spi.datastore.repositories.api.PageInfo pageInfo, org.jboss.pnc.spi.datastore.repositories.api.SortInfo sortInfo)
queryAll in interface org.jboss.pnc.spi.datastore.repositories.api.ReadOnlyRepository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public List<EntityType> queryWithPredicates(org.jboss.pnc.spi.datastore.repositories.api.PageInfo pageInfo, org.jboss.pnc.spi.datastore.repositories.api.SortInfo sortInfo, org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>... predicates)
queryWithPredicates in interface org.jboss.pnc.spi.datastore.repositories.api.ReadOnlyRepository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public List<EntityType> queryWithPredicates(org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>... predicates)
queryWithPredicates in interface org.jboss.pnc.spi.datastore.repositories.api.ReadOnlyRepository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public int count(org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>... predicates)
count in interface org.jboss.pnc.spi.datastore.repositories.api.ReadOnlyRepository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public int count(Collection<org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>> andPredicates, Collection<org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>> orPredicates)
count in interface org.jboss.pnc.spi.datastore.repositories.api.ReadOnlyRepository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public EntityType queryByPredicates(org.jboss.pnc.spi.datastore.repositories.api.Predicate<EntityType>... predicates)
queryByPredicates in interface org.jboss.pnc.spi.datastore.repositories.api.ReadOnlyRepository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public EntityType queryById(Integer id)
queryById in interface org.jboss.pnc.spi.datastore.repositories.api.ReadOnlyRepository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public void delete(Integer id)
delete in interface org.jboss.pnc.spi.datastore.repositories.api.Repository<EntityType extends org.jboss.pnc.model.GenericEntity<Integer>,Integer>public void clear()
Copyright © 2014–2020 JBoss by Red Hat. All rights reserved.