diff --git a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/IOwnerDao.java b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/IParentDao.java similarity index 51% rename from spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/IOwnerDao.java rename to spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/IParentDao.java index beda164935..1b35ba9f01 100644 --- a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/IOwnerDao.java +++ b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/IParentDao.java @@ -1,8 +1,8 @@ package org.baeldung.spring.persistence.dao; 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 { +public interface IParentDao extends IOperations { // } diff --git a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/impl/OwnerDao.java b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/impl/ParentDao.java similarity index 60% rename from spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/impl/OwnerDao.java rename to spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/impl/ParentDao.java index a9156d06cf..6604c7a774 100644 --- a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/impl/OwnerDao.java +++ b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/dao/impl/ParentDao.java @@ -1,22 +1,22 @@ 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.model.Owner; +import org.baeldung.spring.persistence.model.Parent; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository -public class OwnerDao extends AbstractHibernateDao implements IOwnerDao { +public class ParentDao extends AbstractHibernateDao implements IParentDao { @Autowired private SessionFactory sessionFactory; - public OwnerDao() { + public ParentDao() { super(); - setClazz(Owner.class); + setClazz(Parent.class); } // API diff --git a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/model/Owner.java b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/model/Parent.java similarity index 85% rename from spring-hibernate4/src/main/java/org/baeldung/spring/persistence/model/Owner.java rename to spring-hibernate4/src/main/java/org/baeldung/spring/persistence/model/Parent.java index d2f8d36f44..2fb6367fee 100644 --- a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/model/Owner.java +++ b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/model/Parent.java @@ -7,13 +7,13 @@ import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity -public class Owner implements Serializable { +public class Parent implements Serializable { @Id @GeneratedValue private long id; - public Owner() { + public Parent() { super(); } diff --git a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/IOwnerService.java b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/IParentService.java similarity index 51% rename from spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/IOwnerService.java rename to spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/IParentService.java index 66e647b253..6d37d75354 100644 --- a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/IOwnerService.java +++ b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/IParentService.java @@ -1,8 +1,8 @@ package org.baeldung.spring.persistence.service; 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 { +public interface IParentService extends IOperations { // } diff --git a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/impl/OwnerService.java b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/impl/ParentService.java similarity index 52% rename from spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/impl/OwnerService.java rename to spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/impl/ParentService.java index e3f2f7a04f..84d4277299 100644 --- a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/impl/OwnerService.java +++ b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/impl/ParentService.java @@ -1,27 +1,27 @@ 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.model.Owner; -import org.baeldung.spring.persistence.service.IOwnerService; +import org.baeldung.spring.persistence.model.Parent; +import org.baeldung.spring.persistence.service.IParentService; import org.baeldung.spring.persistence.service.common.AbstractService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service -public class OwnerService extends AbstractService implements IOwnerService { +public class ParentService extends AbstractService implements IParentService { @Autowired - private IOwnerDao dao; + private IParentDao dao; - public OwnerService() { + public ParentService() { super(); } // API @Override - protected IOperations getDao() { + protected IOperations getDao() { return dao; } diff --git a/spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/OwnerServicePersistenceIntegrationTest.java b/spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/ParentServicePersistenceIntegrationTest.java similarity index 89% rename from spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/OwnerServicePersistenceIntegrationTest.java rename to spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/ParentServicePersistenceIntegrationTest.java index 4b668777a8..11d13eba60 100644 --- a/spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/OwnerServicePersistenceIntegrationTest.java +++ b/spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/ParentServicePersistenceIntegrationTest.java @@ -10,10 +10,10 @@ import org.springframework.test.context.support.AnnotationConfigContextLoader; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class) -public class OwnerServicePersistenceIntegrationTest { +public class ParentServicePersistenceIntegrationTest { @Autowired - private IOwnerService service; + private IParentService service; @Autowired private IChildService childService;