Merge pull request #123 from Doha2012/master

delete user service
This commit is contained in:
Eugen 2015-01-28 19:27:28 +02:00
commit d000971c19
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);
}
}