added repo and service classes for unit
This commit is contained in:
parent
27a1566309
commit
c9bf2561cd
src/main/java/se/su/dsv/scipro/springdata
@ -0,0 +1,17 @@
|
||||
package se.su.dsv.scipro.springdata.repos;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import se.su.dsv.scipro.data.dataobjects.Unit;
|
||||
|
||||
/**
|
||||
* @author: fred-fri
|
||||
* date: 2012 03 26
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public interface UnitRepo extends JpaRepository<Unit, Long>, QueryDslPredicateExecutor<Unit> {
|
||||
|
||||
//nothing here yet
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package se.su.dsv.scipro.springdata.serviceimpls;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import se.su.dsv.scipro.data.dataobjects.Unit;
|
||||
import se.su.dsv.scipro.springdata.repos.UnitRepo;
|
||||
import se.su.dsv.scipro.springdata.services.UnitService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author: fred-fri
|
||||
* date: 2012 03 26
|
||||
*/
|
||||
@Service ( "unitService" )
|
||||
@Transactional ( readOnly = true )
|
||||
public class UnitServiceImpl extends AbstractQueryService<Unit, Long> implements UnitService {
|
||||
|
||||
@Resource
|
||||
private UnitRepo unitRepo;
|
||||
|
||||
@Autowired
|
||||
public UnitServiceImpl(
|
||||
@Qualifier("unitRepo")
|
||||
UnitRepo unitRepo) {
|
||||
super(unitRepo, unitRepo);
|
||||
System.out.println("UnitServiceImpl instantiating...");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package se.su.dsv.scipro.springdata.services;
|
||||
|
||||
import se.su.dsv.scipro.data.dataobjects.Unit;
|
||||
|
||||
/**
|
||||
* @author: fred-fri
|
||||
* date: 2012 03 26
|
||||
*/
|
||||
public interface UnitService extends GenericService<Unit, Long>, QueryService<Unit, Long> {
|
||||
|
||||
//nothing here yet
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user