This commit is contained in:
krishan-gandhi2 2017-12-30 15:49:08 +05:30 committed by Grzegorz Piwowarek
parent 91be3244f2
commit b5c7ffeb19
4 changed files with 17 additions and 13 deletions

View File

@ -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>

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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();
}