BAEL-4453 (#3304)
This commit is contained in:
parent
91be3244f2
commit
b5c7ffeb19
|
@ -36,12 +36,16 @@
|
|||
<artifactId>katharsis-servlet</artifactId>
|
||||
<version>${katharsis.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>0.9.10</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<properties>
|
||||
<katharsis.version>1.0.1</katharsis.version>
|
||||
<katharsis.version>2.1.3</katharsis.version>
|
||||
<cargo-maven2-plugin.version>1.6.1</cargo-maven2-plugin.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.persistence.katharsis;
|
||||
|
||||
import io.katharsis.queryParams.RequestParams;
|
||||
import io.katharsis.queryParams.QueryParams;
|
||||
import io.katharsis.repository.ResourceRepository;
|
||||
|
||||
import org.baeldung.persistence.dao.RoleRepository;
|
||||
|
@ -15,17 +15,17 @@ public class RoleResourceRepository implements ResourceRepository<Role, Long> {
|
|||
private RoleRepository roleRepository;
|
||||
|
||||
@Override
|
||||
public Role findOne(Long id, RequestParams params) {
|
||||
public Role findOne(Long id, QueryParams params) {
|
||||
return roleRepository.findOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Role> findAll(RequestParams params) {
|
||||
public Iterable<Role> findAll(QueryParams params) {
|
||||
return roleRepository.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Role> findAll(Iterable<Long> ids, RequestParams params) {
|
||||
public Iterable<Role> findAll(Iterable<Long> ids, QueryParams params) {
|
||||
return roleRepository.findAll(ids);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.persistence.katharsis;
|
||||
|
||||
import io.katharsis.queryParams.RequestParams;
|
||||
import io.katharsis.queryParams.QueryParams;
|
||||
import io.katharsis.repository.ResourceRepository;
|
||||
|
||||
import org.baeldung.persistence.dao.UserRepository;
|
||||
|
@ -15,17 +15,17 @@ public class UserResourceRepository implements ResourceRepository<User, Long> {
|
|||
private UserRepository userRepository;
|
||||
|
||||
@Override
|
||||
public User findOne(Long id, RequestParams params) {
|
||||
public User findOne(Long id, QueryParams params) {
|
||||
return userRepository.findOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<User> findAll(RequestParams params) {
|
||||
public Iterable<User> findAll(QueryParams params) {
|
||||
return userRepository.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<User> findAll(Iterable<Long> ids, RequestParams params) {
|
||||
public Iterable<User> findAll(Iterable<Long> ids, QueryParams params) {
|
||||
return userRepository.findAll(ids);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.persistence.katharsis;
|
||||
|
||||
import io.katharsis.queryParams.RequestParams;
|
||||
import io.katharsis.queryParams.QueryParams;
|
||||
import io.katharsis.repository.RelationshipRepository;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
@ -52,13 +52,13 @@ public class UserToRoleRelationshipRepository implements RelationshipRepository<
|
|||
}
|
||||
|
||||
@Override
|
||||
public Role findOneTarget(Long sourceId, String fieldName, RequestParams requestParams) {
|
||||
public Role findOneTarget(Long sourceId, String fieldName, QueryParams QueryParams) {
|
||||
// not for many-to-many
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Role> findManyTargets(Long sourceId, String fieldName, RequestParams requestParams) {
|
||||
public Iterable<Role> findManyTargets(Long sourceId, String fieldName, QueryParams QueryParams) {
|
||||
final User user = userRepository.findOne(sourceId);
|
||||
return user.getRoles();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue