general cleanup and improvements

This commit is contained in:
eugenp 2013-06-01 14:53:31 +03:00
parent 6d68242ff7
commit 044e6a3312
45 changed files with 143 additions and 158 deletions

View File

@ -7,7 +7,6 @@
</configSuffixes>
<enableImports><![CDATA[false]]></enableImports>
<configs>
<config>src/main/webapp/WEB-INF/mvc-servlet.xml</config>
</configs>
<configSets>
</configSets>

View File

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

View File

@ -1,6 +1,6 @@
package org.baeldung.spring.persistence.dao;
package org.baeldung.persistence.dao;
import org.baeldung.spring.persistence.model.Foo;
import org.baeldung.persistence.model.Foo;
import org.springframework.stereotype.Repository;
@Repository

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
package org.baeldung.spring.persistence.service;
package org.baeldung.persistence.service;
import org.baeldung.spring.persistence.dao.IFooDao;
import org.baeldung.spring.persistence.model.Foo;
import org.baeldung.persistence.dao.IFooDao;
import org.baeldung.persistence.model.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.persistence.config;
package org.baeldung.spring;
import java.util.Properties;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.persistence.config;
package org.baeldung.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;

View File

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

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd" >
</beans>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Spring MVC Application</display-name>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Spring Hibernate 3 Application</display-name>
<context-param>
<param-name>contextClass</param-name>
<param-value>
@ -9,7 +10,7 @@
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>org.baeldung.spring.persistence.config</param-value>
<param-value>org.baeldung.spring</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

View File

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

View File

@ -7,7 +7,6 @@
</configSuffixes>
<enableImports><![CDATA[false]]></enableImports>
<configs>
<config>src/main/webapp/WEB-INF/mvc-servlet.xml</config>
</configs>
<configSets>
</configSets>

View File

@ -0,0 +1,8 @@
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

@ -0,0 +1,8 @@
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

@ -0,0 +1,8 @@
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,4 +1,4 @@
package org.baeldung.spring.persistence.dao.common;
package org.baeldung.persistence.dao.common;
import java.io.Serializable;
import java.util.List;

View File

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

View File

@ -1,8 +1,8 @@
package org.baeldung.spring.persistence.dao.impl;
package org.baeldung.persistence.dao.impl;
import org.baeldung.spring.persistence.dao.IChildDao;
import org.baeldung.spring.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.spring.persistence.model.Child;
import org.baeldung.persistence.dao.IChildDao;
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.persistence.model.Child;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

View File

@ -1,8 +1,8 @@
package org.baeldung.spring.persistence.dao.impl;
package org.baeldung.persistence.dao.impl;
import org.baeldung.spring.persistence.dao.IFooDao;
import org.baeldung.spring.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.spring.persistence.model.Foo;
import org.baeldung.persistence.dao.IFooDao;
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.persistence.model.Foo;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

View File

@ -1,8 +1,8 @@
package org.baeldung.spring.persistence.dao.impl;
package org.baeldung.persistence.dao.impl;
import org.baeldung.spring.persistence.dao.IParentDao;
import org.baeldung.spring.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.spring.persistence.model.Parent;
import org.baeldung.persistence.dao.IParentDao;
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
import org.baeldung.persistence.model.Parent;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

View File

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

View File

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

View File

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

View File

@ -0,0 +1,8 @@
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

@ -0,0 +1,8 @@
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

@ -0,0 +1,8 @@
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

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

View File

@ -1,10 +1,10 @@
package org.baeldung.spring.persistence.service.impl;
package org.baeldung.persistence.service.impl;
import org.baeldung.spring.persistence.dao.IChildDao;
import org.baeldung.spring.persistence.dao.common.IOperations;
import org.baeldung.spring.persistence.model.Child;
import org.baeldung.spring.persistence.service.IChildService;
import org.baeldung.spring.persistence.service.common.AbstractService;
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.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -1,10 +1,10 @@
package org.baeldung.spring.persistence.service.impl;
package org.baeldung.persistence.service.impl;
import org.baeldung.spring.persistence.dao.IFooDao;
import org.baeldung.spring.persistence.dao.common.IOperations;
import org.baeldung.spring.persistence.model.Foo;
import org.baeldung.spring.persistence.service.IFooService;
import org.baeldung.spring.persistence.service.common.AbstractService;
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.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -1,10 +1,10 @@
package org.baeldung.spring.persistence.service.impl;
package org.baeldung.persistence.service.impl;
import org.baeldung.spring.persistence.dao.IParentDao;
import org.baeldung.spring.persistence.dao.common.IOperations;
import org.baeldung.spring.persistence.model.Parent;
import org.baeldung.spring.persistence.service.IParentService;
import org.baeldung.spring.persistence.service.common.AbstractService;
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.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.persistence.config;
package org.baeldung.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.persistence.config;
package org.baeldung.spring;
import java.util.Properties;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd" >
</beans>

View File

@ -1,7 +0,0 @@
<html>
<head></head>
<body>
<h1>This is the body of the sample view</h1>
</body>
</html>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Spring MVC Application</display-name>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Spring Hibernate 4 Application</display-name>
<context-param>
<param-name>contextClass</param-name>
<param-value>
@ -9,7 +10,7 @@
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>org.baeldung.spring.persistence.config</param-value>
<param-value>org.baeldung.spring</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

View File

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

View File

@ -1,8 +1,10 @@
package org.baeldung.spring.persistence.service;
import org.baeldung.spring.persistence.config.PersistenceConfig;
import org.baeldung.spring.persistence.model.Child;
import org.baeldung.spring.persistence.model.Parent;
import org.baeldung.persistence.model.Child;
import org.baeldung.persistence.model.Parent;
import org.baeldung.persistence.service.IChildService;
import org.baeldung.persistence.service.IParentService;
import org.baeldung.spring.PersistenceConfig;
import org.hibernate.SessionFactory;
import org.junit.Test;
import org.junit.runner.RunWith;