BAEL-21730: Migrate querydsl to com.baeldung
This commit is contained in:
parent
4d9d171bb8
commit
ee06ac88bd
|
@ -1,3 +1,3 @@
|
|||
### Relevant Articles:
|
||||
- [Intro to Querydsl](http://www.baeldung.com/intro-to-querydsl)
|
||||
- [A Guide to Querydsl with JPA](http://www.baeldung.com/querydsl-with-jpa-tutorial)
|
||||
- [Intro to Querydsl](https://www.baeldung.com/intro-to-querydsl)
|
||||
- [A Guide to Querydsl with JPA](https://www.baeldung.com/querydsl-with-jpa-tutorial)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.dao;
|
||||
package com.baeldung.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.baeldung.entity.Person;
|
||||
import com.baeldung.entity.Person;
|
||||
|
||||
public interface PersonDao {
|
||||
|
|
@ -1,17 +1,15 @@
|
|||
package org.baeldung.dao;
|
||||
package com.baeldung.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baeldung.entity.Person;
|
||||
import com.baeldung.entity.QPerson;
|
||||
import com.querydsl.core.group.GroupBy;
|
||||
import com.querydsl.jpa.impl.JPAQuery;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
|
||||
import org.baeldung.entity.Person;
|
||||
import org.baeldung.entity.QPerson;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.querydsl.core.group.GroupBy;
|
||||
import com.querydsl.jpa.impl.JPAQuery;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
public class PersonDaoImpl implements PersonDao {
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.entity;
|
||||
package com.baeldung.entity;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* (c) Центр ИТ, 2016. Все права защищены.
|
||||
*/
|
||||
package org.baeldung.querydsl.intro.entities;
|
||||
package com.baeldung.querydsl.intro.entities;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* (c) Центр ИТ, 2016. Все права защищены.
|
||||
*/
|
||||
package org.baeldung.querydsl.intro.entities;
|
||||
package com.baeldung.querydsl.intro.entities;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
|
@ -17,7 +17,7 @@
|
|||
</persistence-unit>
|
||||
|
||||
<!-- PersistenceUnit for Intro to QueryDSL -->
|
||||
<persistence-unit name="org.baeldung.querydsl.intro">
|
||||
<persistence-unit name="com.baeldung.querydsl.intro">
|
||||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||
<properties>
|
||||
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.baeldung.dao;
|
||||
package com.baeldung.dao;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.baeldung.entity.Person;
|
||||
import com.baeldung.entity.Person;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,17 +1,17 @@
|
|||
/*
|
||||
* (c) Центр ИТ, 2016. Все права защищены.
|
||||
*/
|
||||
package org.baeldung.querydsl.intro;
|
||||
package com.baeldung.querydsl.intro;
|
||||
|
||||
import com.baeldung.querydsl.intro.entities.BlogPost;
|
||||
import com.baeldung.querydsl.intro.entities.QBlogPost;
|
||||
import com.baeldung.querydsl.intro.entities.QUser;
|
||||
import com.baeldung.querydsl.intro.entities.User;
|
||||
import com.querydsl.core.Tuple;
|
||||
import com.querydsl.core.types.dsl.Expressions;
|
||||
import com.querydsl.core.types.dsl.NumberPath;
|
||||
import com.querydsl.jpa.JPAExpressions;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import org.baeldung.querydsl.intro.entities.BlogPost;
|
||||
import org.baeldung.querydsl.intro.entities.QBlogPost;
|
||||
import org.baeldung.querydsl.intro.entities.QUser;
|
||||
import org.baeldung.querydsl.intro.entities.User;
|
||||
import org.junit.*;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
|
@ -31,7 +31,7 @@ public class QueryDSLIntegrationTest {
|
|||
|
||||
@BeforeClass
|
||||
public static void populateDatabase() {
|
||||
emf = Persistence.createEntityManagerFactory("org.baeldung.querydsl.intro");
|
||||
emf = Persistence.createEntityManagerFactory("com.baeldung.querydsl.intro");
|
||||
EntityManager em = emf.createEntityManager();
|
||||
|
||||
em.getTransaction().begin();
|
|
@ -13,7 +13,7 @@
|
|||
>
|
||||
|
||||
<tx:annotation-driven />
|
||||
<context:component-scan base-package="org.baeldung" />
|
||||
<context:component-scan base-package="com.baeldung" />
|
||||
|
||||
<import resource="test-db.xml" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue