Rename package to conform to standards

This commit is contained in:
David Morley 2016-01-20 21:04:35 -06:00
parent 825940ba7c
commit 226e23b603
75 changed files with 1096 additions and 1097 deletions

View File

@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.baeldung</groupId>
<groupId>com.baeldung</groupId>
<artifactId>spring-hibernate4</artifactId>
<version>0.1-SNAPSHOT</version>

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.dao;
import com.baeldung.persistence.dao.common.IAuditOperations;
import com.baeldung.persistence.model.Bar;
public interface IBarAuditableDao extends IBarDao, IAuditOperations<Bar> {
//
}

View File

@ -1,8 +1,8 @@
package org.baeldung.persistence.dao;
package com.baeldung.persistence.dao;
import java.io.Serializable;
import org.baeldung.persistence.model.Bar;
import com.baeldung.persistence.model.Bar;
import org.springframework.data.repository.CrudRepository;
public interface IBarCrudRepository extends CrudRepository<Bar, Serializable> {

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.dao;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.model.Bar;
public interface IBarDao extends IOperations<Bar> {
//
}

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.dao;
import com.baeldung.persistence.model.Child;
import com.baeldung.persistence.dao.common.IOperations;
public interface IChildDao extends IOperations<Child> {
//
}

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.dao;
import com.baeldung.persistence.dao.common.IAuditOperations;
import com.baeldung.persistence.model.Foo;
public interface IFooAuditableDao extends IFooDao, IAuditOperations<Foo> {
//
}

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.dao;
import com.baeldung.persistence.model.Foo;
import com.baeldung.persistence.dao.common.IOperations;
public interface IFooDao extends IOperations<Foo> {
//
}

View File

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

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.dao.common;
package com.baeldung.persistence.dao.common;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.dao.common;
package com.baeldung.persistence.dao.common;
import java.io.Serializable;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.dao.common;
package com.baeldung.persistence.dao.common;
import java.io.Serializable;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.dao.common;
package com.baeldung.persistence.dao.common;
import java.io.Serializable;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.dao.common;
package com.baeldung.persistence.dao.common;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.dao.common;
package com.baeldung.persistence.dao.common;
import java.io.Serializable;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.dao.common;
package com.baeldung.persistence.dao.common;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.dao.common;
package com.baeldung.persistence.dao.common;
import java.io.Serializable;
import java.util.List;

View File

@ -1,10 +1,10 @@
package org.baeldung.persistence.dao.impl;
package com.baeldung.persistence.dao.impl;
import java.util.List;
import org.baeldung.persistence.dao.IBarAuditableDao;
import org.baeldung.persistence.dao.common.AbstractHibernateAuditableDao;
import org.baeldung.persistence.model.Bar;
import com.baeldung.persistence.dao.IBarAuditableDao;
import com.baeldung.persistence.dao.common.AbstractHibernateAuditableDao;
import com.baeldung.persistence.model.Bar;
public class BarAuditableDao extends AbstractHibernateAuditableDao<Bar> implements IBarAuditableDao {

View File

@ -1,8 +1,8 @@
package org.baeldung.persistence.dao.impl;
package com.baeldung.persistence.dao.impl;
import org.baeldung.persistence.dao.IBarDao;
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.persistence.model.Bar;
import com.baeldung.persistence.dao.common.AbstractHibernateDao;
import com.baeldung.persistence.dao.IBarDao;
import com.baeldung.persistence.model.Bar;
import org.springframework.stereotype.Repository;
@Repository

View File

@ -1,8 +1,8 @@
package org.baeldung.persistence.dao.impl;
package com.baeldung.persistence.dao.impl;
import org.baeldung.persistence.dao.IBarDao;
import org.baeldung.persistence.dao.common.AbstractJpaDao;
import org.baeldung.persistence.model.Bar;
import com.baeldung.persistence.dao.IBarDao;
import com.baeldung.persistence.dao.common.AbstractJpaDao;
import com.baeldung.persistence.model.Bar;
import org.springframework.stereotype.Repository;
@Repository

View File

@ -0,0 +1,19 @@
package com.baeldung.persistence.dao.impl;
import com.baeldung.persistence.dao.common.AbstractHibernateDao;
import com.baeldung.persistence.model.Child;
import com.baeldung.persistence.dao.IChildDao;
import org.springframework.stereotype.Repository;
@Repository
public class ChildDao extends AbstractHibernateDao<Child> implements IChildDao {
public ChildDao() {
super();
setClazz(Child.class);
}
// API
}

View File

@ -0,0 +1,17 @@
package com.baeldung.persistence.dao.impl;
import com.baeldung.persistence.dao.common.AbstractHibernateAuditableDao;
import com.baeldung.persistence.model.Foo;
import com.baeldung.persistence.dao.IFooAuditableDao;
public class FooAuditableDao extends AbstractHibernateAuditableDao<Foo> implements IFooAuditableDao {
public FooAuditableDao() {
super();
setClazz(Foo.class);
}
// API
}

View File

@ -1,8 +1,8 @@
package org.baeldung.persistence.dao.impl;
package com.baeldung.persistence.dao.impl;
import org.baeldung.persistence.dao.IFooDao;
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.persistence.model.Foo;
import com.baeldung.persistence.dao.common.AbstractHibernateDao;
import com.baeldung.persistence.dao.IFooDao;
import com.baeldung.persistence.model.Foo;
import org.springframework.stereotype.Repository;
@Repository

View File

@ -0,0 +1,19 @@
package com.baeldung.persistence.dao.impl;
import com.baeldung.persistence.dao.IParentDao;
import com.baeldung.persistence.dao.common.AbstractHibernateDao;
import com.baeldung.persistence.model.Parent;
import org.springframework.stereotype.Repository;
@Repository
public class ParentDao extends AbstractHibernateDao<Parent> implements IParentDao {
public ParentDao() {
super();
setClazz(Parent.class);
}
// API
}

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.model;
package com.baeldung.persistence.model;
import java.io.Serializable;
import java.util.Date;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.model;
package com.baeldung.persistence.model;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.model;
package com.baeldung.persistence.model;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.model;
package com.baeldung.persistence.model;
import java.io.Serializable;

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.service;
import com.baeldung.persistence.dao.common.IAuditOperations;
import com.baeldung.persistence.model.Bar;
public interface IBarAuditableService extends IBarService, IAuditOperations<Bar> {
}

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.service;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.model.Bar;
public interface IBarService extends IOperations<Bar> {
//
}

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.service;
import com.baeldung.persistence.model.Child;
import com.baeldung.persistence.dao.common.IOperations;
public interface IChildService extends IOperations<Child> {
//
}

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.service;
import com.baeldung.persistence.dao.common.IAuditOperations;
import com.baeldung.persistence.model.Foo;
public interface IFooAuditableService extends IFooService, IAuditOperations<Foo> {
//
}

View File

@ -0,0 +1,8 @@
package com.baeldung.persistence.service;
import com.baeldung.persistence.model.Foo;
import com.baeldung.persistence.dao.common.IOperations;
public interface IFooService extends IOperations<Foo> {
//
}

View File

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

View File

@ -1,10 +1,10 @@
package org.baeldung.persistence.service.common;
package com.baeldung.persistence.service.common;
import java.io.Serializable;
import java.util.List;
import org.baeldung.persistence.dao.common.IAuditOperations;
import org.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.dao.common.IAuditOperations;
import com.baeldung.persistence.dao.common.IOperations;
import org.springframework.transaction.annotation.Transactional;
@Transactional(value = "hibernateTransactionManager")

View File

@ -1,9 +1,9 @@
package org.baeldung.persistence.service.common;
package com.baeldung.persistence.service.common;
import java.io.Serializable;
import java.util.List;
import org.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.dao.common.IOperations;
import org.springframework.transaction.annotation.Transactional;
@Transactional(value = "hibernateTransactionManager")

View File

@ -1,9 +1,9 @@
package org.baeldung.persistence.service.common;
package com.baeldung.persistence.service.common;
import java.io.Serializable;
import java.util.List;
import org.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.dao.common.IOperations;
import org.springframework.transaction.annotation.Transactional;
@Transactional(value = "jpaTransactionManager")

View File

@ -1,9 +1,9 @@
package org.baeldung.persistence.service.common;
package com.baeldung.persistence.service.common;
import java.io.Serializable;
import java.util.List;
import org.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.dao.common.IOperations;
public abstract class AbstractService<T extends Serializable> implements IOperations<T> {

View File

@ -1,9 +1,9 @@
package org.baeldung.persistence.service.common;
package com.baeldung.persistence.service.common;
import java.io.Serializable;
import java.util.List;
import org.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.dao.common.IOperations;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;

View File

@ -1,12 +1,12 @@
package org.baeldung.persistence.service.impl;
package com.baeldung.persistence.service.impl;
import org.baeldung.persistence.dao.IBarAuditableDao;
import org.baeldung.persistence.dao.IBarDao;
import org.baeldung.persistence.dao.common.IAuditOperations;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.service.IBarAuditableService;
import org.baeldung.persistence.service.common.AbstractHibernateAuditableService;
import com.baeldung.persistence.dao.common.IAuditOperations;
import com.baeldung.persistence.service.common.AbstractHibernateAuditableService;
import com.baeldung.persistence.dao.IBarAuditableDao;
import com.baeldung.persistence.dao.IBarDao;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.model.Bar;
import com.baeldung.persistence.service.IBarAuditableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

View File

@ -1,10 +1,10 @@
package org.baeldung.persistence.service.impl;
package com.baeldung.persistence.service.impl;
import org.baeldung.persistence.dao.IBarDao;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.service.IBarService;
import org.baeldung.persistence.service.common.AbstractJpaService;
import com.baeldung.persistence.dao.IBarDao;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.model.Bar;
import com.baeldung.persistence.service.IBarService;
import com.baeldung.persistence.service.common.AbstractJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

View File

@ -1,10 +1,10 @@
package org.baeldung.persistence.service.impl;
package com.baeldung.persistence.service.impl;
import org.baeldung.persistence.dao.IBarDao;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.service.IBarService;
import org.baeldung.persistence.service.common.AbstractHibernateService;
import com.baeldung.persistence.dao.IBarDao;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.model.Bar;
import com.baeldung.persistence.service.IBarService;
import com.baeldung.persistence.service.common.AbstractHibernateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

View File

@ -1,11 +1,11 @@
package org.baeldung.persistence.service.impl;
package com.baeldung.persistence.service.impl;
import java.io.Serializable;
import org.baeldung.persistence.dao.IBarCrudRepository;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.service.IBarService;
import org.baeldung.persistence.service.common.AbstractSpringDataJpaService;
import com.baeldung.persistence.service.common.AbstractSpringDataJpaService;
import com.baeldung.persistence.dao.IBarCrudRepository;
import com.baeldung.persistence.model.Bar;
import com.baeldung.persistence.service.IBarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.CrudRepository;

View File

@ -1,10 +1,10 @@
package org.baeldung.persistence.service.impl;
package com.baeldung.persistence.service.impl;
import org.baeldung.persistence.dao.IChildDao;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Child;
import org.baeldung.persistence.service.IChildService;
import org.baeldung.persistence.service.common.AbstractHibernateService;
import com.baeldung.persistence.model.Child;
import com.baeldung.persistence.service.IChildService;
import com.baeldung.persistence.dao.IChildDao;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.service.common.AbstractHibernateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -1,12 +1,12 @@
package org.baeldung.persistence.service.impl;
package com.baeldung.persistence.service.impl;
import org.baeldung.persistence.dao.IFooAuditableDao;
import org.baeldung.persistence.dao.IFooDao;
import org.baeldung.persistence.dao.common.IAuditOperations;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Foo;
import org.baeldung.persistence.service.IFooAuditableService;
import org.baeldung.persistence.service.common.AbstractHibernateAuditableService;
import com.baeldung.persistence.dao.common.IAuditOperations;
import com.baeldung.persistence.service.IFooAuditableService;
import com.baeldung.persistence.service.common.AbstractHibernateAuditableService;
import com.baeldung.persistence.dao.IFooAuditableDao;
import com.baeldung.persistence.dao.IFooDao;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.model.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

View File

@ -1,10 +1,10 @@
package org.baeldung.persistence.service.impl;
package com.baeldung.persistence.service.impl;
import org.baeldung.persistence.dao.IFooDao;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Foo;
import org.baeldung.persistence.service.IFooService;
import org.baeldung.persistence.service.common.AbstractHibernateService;
import com.baeldung.persistence.dao.IFooDao;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.model.Foo;
import com.baeldung.persistence.service.IFooService;
import com.baeldung.persistence.service.common.AbstractHibernateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

View File

@ -1,10 +1,10 @@
package org.baeldung.persistence.service.impl;
package com.baeldung.persistence.service.impl;
import org.baeldung.persistence.dao.IParentDao;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Parent;
import org.baeldung.persistence.service.IParentService;
import org.baeldung.persistence.service.common.AbstractHibernateService;
import com.baeldung.persistence.model.Parent;
import com.baeldung.persistence.service.IParentService;
import com.baeldung.persistence.dao.IParentDao;
import com.baeldung.persistence.dao.common.IOperations;
import com.baeldung.persistence.service.common.AbstractHibernateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -1,28 +1,28 @@
package org.baeldung.spring;
package com.baeldung.spring;
import java.util.Properties;
import javax.sql.DataSource;
import com.baeldung.persistence.dao.impl.BarDao;
import com.baeldung.persistence.dao.impl.FooDao;
import com.baeldung.persistence.service.IBarAuditableService;
import com.baeldung.persistence.service.IFooAuditableService;
import com.baeldung.persistence.service.IFooService;
import org.apache.tomcat.dbcp.dbcp.BasicDataSource;
import org.baeldung.persistence.dao.IBarAuditableDao;
import org.baeldung.persistence.dao.IBarDao;
import org.baeldung.persistence.dao.IFooAuditableDao;
import org.baeldung.persistence.dao.IFooDao;
import org.baeldung.persistence.dao.impl.BarAuditableDao;
import org.baeldung.persistence.dao.impl.BarDao;
import org.baeldung.persistence.dao.impl.BarJpaDao;
import org.baeldung.persistence.dao.impl.FooAuditableDao;
import org.baeldung.persistence.dao.impl.FooDao;
import org.baeldung.persistence.service.IBarAuditableService;
import org.baeldung.persistence.service.IBarService;
import org.baeldung.persistence.service.IFooAuditableService;
import org.baeldung.persistence.service.IFooService;
import org.baeldung.persistence.service.impl.BarAuditableService;
import org.baeldung.persistence.service.impl.BarJpaService;
import org.baeldung.persistence.service.impl.BarSpringDataJpaService;
import org.baeldung.persistence.service.impl.FooAuditableService;
import org.baeldung.persistence.service.impl.FooService;
import com.baeldung.persistence.dao.IBarAuditableDao;
import com.baeldung.persistence.dao.IBarDao;
import com.baeldung.persistence.dao.IFooAuditableDao;
import com.baeldung.persistence.dao.IFooDao;
import com.baeldung.persistence.dao.impl.BarAuditableDao;
import com.baeldung.persistence.dao.impl.BarJpaDao;
import com.baeldung.persistence.dao.impl.FooAuditableDao;
import com.baeldung.persistence.service.IBarService;
import com.baeldung.persistence.service.impl.BarAuditableService;
import com.baeldung.persistence.service.impl.BarJpaService;
import com.baeldung.persistence.service.impl.BarSpringDataJpaService;
import com.baeldung.persistence.service.impl.FooAuditableService;
import com.baeldung.persistence.service.impl.FooService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@ -45,10 +45,10 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(basePackages = { "org.baeldung.persistence" }, transactionManagerRef = "jpaTransactionManager")
@EnableJpaRepositories(basePackages = { "com.baeldung.persistence" }, transactionManagerRef = "jpaTransactionManager")
@EnableJpaAuditing
@PropertySource({ "classpath:persistence-mysql.properties" })
@ComponentScan({ "org.baeldung.persistence" })
@ComponentScan({ "com.baeldung.persistence" })
public class PersistenceConfig {
@Autowired
@ -62,7 +62,7 @@ public class PersistenceConfig {
public LocalSessionFactoryBean sessionFactory() {
final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSource(restDataSource());
sessionFactory.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
sessionFactory.setPackagesToScan(new String[] { "com.baeldung.persistence.model" });
sessionFactory.setHibernateProperties(hibernateProperties());
return sessionFactory;
@ -72,7 +72,7 @@ public class PersistenceConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
emf.setDataSource(restDataSource());
emf.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
emf.setPackagesToScan(new String[] { "com.baeldung.persistence.model" });
final JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
emf.setJpaVendorAdapter(vendorAdapter);

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@ -7,7 +7,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@EnableTransactionManagement
@ComponentScan({ "org.baeldung.persistence.dao", "org.baeldung.persistence.service" })
@ComponentScan({ "com.baeldung.persistence.dao", "com.baeldung.persistence.service" })
@ImportResource({ "classpath:hibernate4Config.xml" })
public class PersistenceXmlConfig {

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.dao;
import org.baeldung.persistence.dao.common.IAuditOperations;
import org.baeldung.persistence.model.Bar;
public interface IBarAuditableDao extends IBarDao, IAuditOperations<Bar> {
//
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.dao;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Bar;
public interface IBarDao extends IOperations<Bar> {
//
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.dao;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Child;
public interface IChildDao extends IOperations<Child> {
//
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.dao;
import org.baeldung.persistence.dao.common.IAuditOperations;
import org.baeldung.persistence.model.Foo;
public interface IFooAuditableDao extends IFooDao, IAuditOperations<Foo> {
//
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.dao;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Foo;
public interface IFooDao extends IOperations<Foo> {
//
}

View File

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

View File

@ -1,19 +0,0 @@
package org.baeldung.persistence.dao.impl;
import org.baeldung.persistence.dao.IChildDao;
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.persistence.model.Child;
import org.springframework.stereotype.Repository;
@Repository
public class ChildDao extends AbstractHibernateDao<Child>implements IChildDao {
public ChildDao() {
super();
setClazz(Child.class);
}
// API
}

View File

@ -1,17 +0,0 @@
package org.baeldung.persistence.dao.impl;
import org.baeldung.persistence.dao.IFooAuditableDao;
import org.baeldung.persistence.dao.common.AbstractHibernateAuditableDao;
import org.baeldung.persistence.model.Foo;
public class FooAuditableDao extends AbstractHibernateAuditableDao<Foo> implements IFooAuditableDao {
public FooAuditableDao() {
super();
setClazz(Foo.class);
}
// API
}

View File

@ -1,19 +0,0 @@
package org.baeldung.persistence.dao.impl;
import org.baeldung.persistence.dao.IParentDao;
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.persistence.model.Parent;
import org.springframework.stereotype.Repository;
@Repository
public class ParentDao extends AbstractHibernateDao<Parent>implements IParentDao {
public ParentDao() {
super();
setClazz(Parent.class);
}
// API
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.service;
import org.baeldung.persistence.dao.common.IAuditOperations;
import org.baeldung.persistence.model.Bar;
public interface IBarAuditableService extends IBarService, IAuditOperations<Bar> {
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.service;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Bar;
public interface IBarService extends IOperations<Bar> {
//
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.service;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Child;
public interface IChildService extends IOperations<Child> {
//
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.service;
import org.baeldung.persistence.dao.common.IAuditOperations;
import org.baeldung.persistence.model.Foo;
public interface IFooAuditableService extends IFooService, IAuditOperations<Foo> {
//
}

View File

@ -1,8 +0,0 @@
package org.baeldung.persistence.service;
import org.baeldung.persistence.dao.common.IOperations;
import org.baeldung.persistence.model.Foo;
public interface IFooService extends IOperations<Foo> {
//
}

View File

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

View File

@ -9,7 +9,7 @@
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="packagesToScan" value="org.baeldung.persistence.model"/>
<property name="packagesToScan" value="com.baeldung.persistence.model"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>

View File

@ -1,10 +1,10 @@
package org.baeldung.persistence;
package com.baeldung.persistence;
import org.baeldung.persistence.hibernate.FooPaginationPersistenceIntegrationTest;
import org.baeldung.persistence.hibernate.FooSortingPersistenceServiceTest;
import org.baeldung.persistence.service.FooServiceBasicPersistenceIntegrationTest;
import org.baeldung.persistence.service.FooServicePersistenceIntegrationTest;
import org.baeldung.persistence.service.ParentServicePersistenceIntegrationTest;
import com.baeldung.persistence.hibernate.FooPaginationPersistenceIntegrationTest;
import com.baeldung.persistence.hibernate.FooSortingPersistenceServiceTest;
import com.baeldung.persistence.service.FooServicePersistenceIntegrationTest;
import com.baeldung.persistence.service.FooServiceBasicPersistenceIntegrationTest;
import com.baeldung.persistence.service.ParentServicePersistenceIntegrationTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.audit;
package com.baeldung.persistence.audit;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

View File

@ -1,15 +1,15 @@
package org.baeldung.persistence.audit;
package com.baeldung.persistence.audit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.util.List;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.model.Foo;
import org.baeldung.persistence.service.IBarAuditableService;
import org.baeldung.persistence.service.IFooAuditableService;
import org.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Foo;
import com.baeldung.persistence.service.IBarAuditableService;
import com.baeldung.persistence.service.IFooAuditableService;
import com.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Bar;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.junit.After;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.audit;
package com.baeldung.persistence.audit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@ -7,10 +7,10 @@ import static org.junit.Assert.assertTrue;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.model.Bar.OPERATION;
import org.baeldung.persistence.service.IBarService;
import org.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Bar;
import com.baeldung.persistence.model.Bar.OPERATION;
import com.baeldung.persistence.service.IBarService;
import com.baeldung.spring.PersistenceConfig;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.audit;
package com.baeldung.persistence.audit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@ -6,9 +6,9 @@ import static org.junit.Assert.assertTrue;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.service.IBarService;
import org.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Bar;
import com.baeldung.persistence.service.IBarService;
import com.baeldung.spring.PersistenceConfig;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;

View File

@ -1,9 +1,9 @@
package org.baeldung.persistence.hibernate;
package com.baeldung.persistence.hibernate;
import java.util.List;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.model.Foo;
import com.baeldung.persistence.model.Foo;
import com.baeldung.persistence.model.Bar;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.hibernate;
package com.baeldung.persistence.hibernate;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
import static org.hamcrest.Matchers.hasSize;
@ -7,9 +7,9 @@ import static org.junit.Assert.assertThat;
import java.util.List;
import org.baeldung.persistence.model.Foo;
import org.baeldung.persistence.service.IFooService;
import org.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Foo;
import com.baeldung.persistence.service.IFooService;
import com.baeldung.spring.PersistenceConfig;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.ScrollMode;

View File

@ -1,13 +1,13 @@
package org.baeldung.persistence.hibernate;
package com.baeldung.persistence.hibernate;
import static org.junit.Assert.assertNull;
import java.util.List;
import java.util.Set;
import org.baeldung.persistence.model.Bar;
import org.baeldung.persistence.model.Foo;
import org.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Bar;
import com.baeldung.persistence.model.Foo;
import com.baeldung.spring.PersistenceConfig;
import org.hibernate.Criteria;
import org.hibernate.NullPrecedence;
import org.hibernate.Query;

View File

@ -1,10 +1,9 @@
package org.baeldung.persistence.service;
package com.baeldung.persistence.service;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
import org.baeldung.persistence.model.Foo;
import org.baeldung.persistence.service.IFooService;
import org.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Foo;
import com.baeldung.spring.PersistenceConfig;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.junit.After;

View File

@ -1,9 +1,9 @@
package org.baeldung.persistence.service;
package com.baeldung.persistence.service;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
import org.baeldung.persistence.model.Foo;
import org.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Foo;
import com.baeldung.spring.PersistenceConfig;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,8 +1,8 @@
package org.baeldung.persistence.service;
package com.baeldung.persistence.service;
import org.baeldung.persistence.model.Child;
import org.baeldung.persistence.model.Parent;
import org.baeldung.spring.PersistenceConfig;
import com.baeldung.persistence.model.Child;
import com.baeldung.persistence.model.Parent;
import com.baeldung.spring.PersistenceConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;