name change

This commit is contained in:
eugenp 2013-05-18 17:15:36 +03:00
parent 2bde87bef2
commit f50f4eb6a6
6 changed files with 20 additions and 20 deletions

View File

@ -1,8 +1,8 @@
package org.baeldung.spring.persistence.dao; package org.baeldung.spring.persistence.dao;
import org.baeldung.spring.persistence.dao.common.IOperations; import org.baeldung.spring.persistence.dao.common.IOperations;
import org.baeldung.spring.persistence.model.Owner; import org.baeldung.spring.persistence.model.Parent;
public interface IOwnerDao extends IOperations<Owner> { public interface IParentDao extends IOperations<Parent> {
// //
} }

View File

@ -1,22 +1,22 @@
package org.baeldung.spring.persistence.dao.impl; package org.baeldung.spring.persistence.dao.impl;
import org.baeldung.spring.persistence.dao.IOwnerDao; import org.baeldung.spring.persistence.dao.IParentDao;
import org.baeldung.spring.persistence.dao.common.AbstractHibernateDao; import org.baeldung.spring.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.spring.persistence.model.Owner; import org.baeldung.spring.persistence.model.Parent;
import org.hibernate.SessionFactory; import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
public class OwnerDao extends AbstractHibernateDao<Owner> implements IOwnerDao { public class ParentDao extends AbstractHibernateDao<Parent> implements IParentDao {
@Autowired @Autowired
private SessionFactory sessionFactory; private SessionFactory sessionFactory;
public OwnerDao() { public ParentDao() {
super(); super();
setClazz(Owner.class); setClazz(Parent.class);
} }
// API // API

View File

@ -7,13 +7,13 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
@Entity @Entity
public class Owner implements Serializable { public class Parent implements Serializable {
@Id @Id
@GeneratedValue @GeneratedValue
private long id; private long id;
public Owner() { public Parent() {
super(); super();
} }

View File

@ -1,8 +1,8 @@
package org.baeldung.spring.persistence.service; package org.baeldung.spring.persistence.service;
import org.baeldung.spring.persistence.dao.common.IOperations; import org.baeldung.spring.persistence.dao.common.IOperations;
import org.baeldung.spring.persistence.model.Owner; import org.baeldung.spring.persistence.model.Parent;
public interface IOwnerService extends IOperations<Owner> { public interface IParentService extends IOperations<Parent> {
// //
} }

View File

@ -1,27 +1,27 @@
package org.baeldung.spring.persistence.service.impl; package org.baeldung.spring.persistence.service.impl;
import org.baeldung.spring.persistence.dao.IOwnerDao; import org.baeldung.spring.persistence.dao.IParentDao;
import org.baeldung.spring.persistence.dao.common.IOperations; import org.baeldung.spring.persistence.dao.common.IOperations;
import org.baeldung.spring.persistence.model.Owner; import org.baeldung.spring.persistence.model.Parent;
import org.baeldung.spring.persistence.service.IOwnerService; import org.baeldung.spring.persistence.service.IParentService;
import org.baeldung.spring.persistence.service.common.AbstractService; import org.baeldung.spring.persistence.service.common.AbstractService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
public class OwnerService extends AbstractService<Owner> implements IOwnerService { public class ParentService extends AbstractService<Parent> implements IParentService {
@Autowired @Autowired
private IOwnerDao dao; private IParentDao dao;
public OwnerService() { public ParentService() {
super(); super();
} }
// API // API
@Override @Override
protected IOperations<Owner> getDao() { protected IOperations<Parent> getDao() {
return dao; return dao;
} }

View File

@ -10,10 +10,10 @@ import org.springframework.test.context.support.AnnotationConfigContextLoader;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class) @ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class)
public class OwnerServicePersistenceIntegrationTest { public class ParentServicePersistenceIntegrationTest {
@Autowired @Autowired
private IOwnerService service; private IParentService service;
@Autowired @Autowired
private IChildService childService; private IChildService childService;