public class OwnedEntityRepositoryDecorator extends AbstractRepositoryDecorator<Entity>
Ensures that when an Entity is created the owner is set to the current user, users can only view, update, delete their own entities.
Admins are not effected.
| Constructor and Description |
|---|
OwnedEntityRepositoryDecorator(Repository<Entity> decoratedRepo) |
close, getCapabilities, getEntityType, getName, getQueryOperatorsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachBatchedforEach, spliteratorpublic OwnedEntityRepositoryDecorator(Repository<Entity> decoratedRepo)
protected Repository<Entity> delegate()
delegate in class AbstractRepositoryDecorator<Entity>public Query<Entity> query()
query in interface Repository<Entity>query in class AbstractRepositoryDecorator<Entity>public void forEachBatched(Fetch fetch, java.util.function.Consumer<List<Entity>> consumer, int batchSize)
forEachBatched in interface Repository<Entity>forEachBatched in class AbstractRepositoryDecorator<Entity>public long count()
count in interface Repository<Entity>count in class AbstractRepositoryDecorator<Entity>public long count(Query<Entity> q)
count in interface Repository<Entity>count in class AbstractRepositoryDecorator<Entity>public java.util.stream.Stream<Entity> findAll(Query<Entity> q)
findAll in interface Repository<Entity>findAll in class AbstractRepositoryDecorator<Entity>public Entity findOne(Query<Entity> q)
findOne in interface Repository<Entity>findOne in class AbstractRepositoryDecorator<Entity>public Entity findOneById(Object id)
findOneById in interface Repository<Entity>findOneById in class AbstractRepositoryDecorator<Entity>public Entity findOneById(Object id, Fetch fetch)
findOneById in interface Repository<Entity>findOneById in class AbstractRepositoryDecorator<Entity>public java.util.stream.Stream<Entity> findAll(java.util.stream.Stream<Object> ids)
findAll in interface Repository<Entity>findAll in class AbstractRepositoryDecorator<Entity>public java.util.stream.Stream<Entity> findAll(java.util.stream.Stream<Object> ids, Fetch fetch)
findAll in interface Repository<Entity>findAll in class AbstractRepositoryDecorator<Entity>public AggregateResult aggregate(AggregateQuery aggregateQuery)
aggregate in interface Repository<Entity>aggregate in class AbstractRepositoryDecorator<Entity>public void update(Entity entity)
update in interface Repository<Entity>update in class AbstractRepositoryDecorator<Entity>public void update(java.util.stream.Stream<Entity> entities)
update in interface Repository<Entity>update in class AbstractRepositoryDecorator<Entity>public void delete(Entity entity)
delete in interface Repository<Entity>delete in class AbstractRepositoryDecorator<Entity>public void delete(java.util.stream.Stream<Entity> entities)
delete in interface Repository<Entity>delete in class AbstractRepositoryDecorator<Entity>public void deleteById(Object id)
deleteById in interface Repository<Entity>deleteById in class AbstractRepositoryDecorator<Entity>public void deleteAll(java.util.stream.Stream<Object> ids)
deleteAll in interface Repository<Entity>deleteAll in class AbstractRepositoryDecorator<Entity>public void deleteAll()
deleteAll in interface Repository<Entity>deleteAll in class AbstractRepositoryDecorator<Entity>public void add(Entity entity)
add in interface Repository<Entity>add in class AbstractRepositoryDecorator<Entity>public Integer add(java.util.stream.Stream<Entity> entities)
add in interface Repository<Entity>add in class AbstractRepositoryDecorator<Entity>Copyright © 2017. All Rights Reserved.