delete user service

This commit is contained in:
DOHA 2015-01-28 18:54:52 +02:00
parent 86ad9c9bff
commit 5d14d554d6
1 changed files with 0 additions and 36 deletions

View File

@ -1,36 +0,0 @@
package org.baeldung.persistence.service.impl;
import java.util.List;
import org.baeldung.persistence.dao.MyUserPredicatesBuilder;
import org.baeldung.persistence.dao.MyUserRepository;
import org.baeldung.persistence.model.MyUser;
import org.baeldung.web.util.SearchCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.mysema.query.types.expr.BooleanExpression;
@Service
@Transactional
public class MyUserService {
@Autowired
private MyUserRepository repository;
public MyUserService() {
super();
}
public Iterable<MyUser> search(final List<SearchCriteria> params) {
final BooleanExpression predicate = MyUserPredicatesBuilder.buildUserPredicates(params);
if (predicate == null)
return repository.findAll();
return repository.findAll(predicate);
}
public void save(final MyUser user) {
repository.save(user);
}
}