refactored addUnexistingUnitsAsKeywords method to use new Unit entity
This commit is contained in:
parent
18780cf425
commit
4ee2837c72
src/main/java/se/su/dsv/scipro
io/facade
springdata
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,6 @@ import se.su.dsv.scipro.data.dataobjects.Unit;
|
||||
@Transactional(readOnly = true)
|
||||
public interface UnitRepo extends JpaRepository<Unit, Long>, QueryDslPredicateExecutor<Unit> {
|
||||
|
||||
//nothing here yet
|
||||
public Unit findByIdentifier(Long identifier);
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ import se.su.dsv.scipro.springdata.repos.UnitRepo;
|
||||
import se.su.dsv.scipro.springdata.services.UnitService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author: fred-fri
|
||||
@ -29,4 +31,13 @@ public class UnitServiceImpl extends AbstractQueryService<Unit, Long> implements
|
||||
System.out.println("UnitServiceImpl instantiating...");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit findByIdentifier(Long identifier) {
|
||||
return unitRepo.findByIdentifier(identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Unit> findAllAsSet() {
|
||||
return new HashSet<Unit>(unitRepo.findAll());
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,15 @@ package se.su.dsv.scipro.springdata.services;
|
||||
|
||||
import se.su.dsv.scipro.data.dataobjects.Unit;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author: fred-fri
|
||||
* date: 2012 03 26
|
||||
*/
|
||||
public interface UnitService extends GenericService<Unit, Long>, QueryService<Unit, Long> {
|
||||
|
||||
//nothing here yet
|
||||
public Unit findByIdentifier(Long identifier);
|
||||
public Set<Unit> findAllAsSet();
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user