refactor(module-web,module-ejb): again refactor
This commit is contained in:
parent
fa9942c031
commit
8476fa70a1
@ -1,4 +1,4 @@
|
|||||||
package pl.myboardgames.boardgame.db;
|
package pl.myboardgames.db;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -8,7 +8,7 @@ import javax.persistence.EntityNotFoundException;
|
|||||||
import javax.persistence.PersistenceContext;
|
import javax.persistence.PersistenceContext;
|
||||||
import javax.persistence.Query;
|
import javax.persistence.Query;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.model.BoardGameEntity;
|
import pl.myboardgames.model.BoardGameEntity;
|
||||||
|
|
||||||
@Stateless
|
@Stateless
|
||||||
public class BoardGameDao {
|
public class BoardGameDao {
|
@ -1,4 +1,4 @@
|
|||||||
package pl.myboardgames.user.db;
|
package pl.myboardgames.db;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -8,8 +8,8 @@ import javax.persistence.EntityNotFoundException;
|
|||||||
import javax.persistence.PersistenceContext;
|
import javax.persistence.PersistenceContext;
|
||||||
import javax.persistence.Query;
|
import javax.persistence.Query;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.model.BoardGameEntity;
|
import pl.myboardgames.model.BoardGameEntity;
|
||||||
import pl.myboardgames.user.model.UserEntity;
|
import pl.myboardgames.model.UserEntity;
|
||||||
|
|
||||||
@Stateless
|
@Stateless
|
||||||
public class UserDao {
|
public class UserDao {
|
@ -1,4 +1,4 @@
|
|||||||
package pl.myboardgames.boardgame.model;
|
package pl.myboardgames.model;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -13,7 +13,6 @@ import javax.persistence.JoinTable;
|
|||||||
import javax.persistence.ManyToMany;
|
import javax.persistence.ManyToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
import pl.myboardgames.user.model.UserEntity;
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "boardgames")
|
@Table(name = "boardgames")
|
@ -3,7 +3,7 @@
|
|||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package pl.myboardgames.user.model;
|
package pl.myboardgames.model;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -15,7 +15,7 @@ import javax.persistence.Id;
|
|||||||
import javax.persistence.ManyToMany;
|
import javax.persistence.ManyToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.model.BoardGameEntity;
|
import pl.myboardgames.model.BoardGameEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -3,14 +3,13 @@
|
|||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package pl.myboardgames.boardgame.dto;
|
package pl.myboardgames.dto;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.model.BoardGameEntity;
|
import pl.myboardgames.model.BoardGameEntity;
|
||||||
import pl.myboardgames.user.dto.UserShortDto;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
@ -3,9 +3,9 @@
|
|||||||
* To change ret template file, choose Tools | Templates
|
* To change ret template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package pl.myboardgames.boardgame.dto;
|
package pl.myboardgames.dto;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.model.BoardGameEntity;
|
import pl.myboardgames.model.BoardGameEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -3,9 +3,9 @@
|
|||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package pl.myboardgames.boardgame.dto;
|
package pl.myboardgames.dto;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.model.BoardGameEntity;
|
import pl.myboardgames.model.BoardGameEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -3,14 +3,14 @@
|
|||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package pl.myboardgames.user.dto;
|
package pl.myboardgames.dto;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.dto.BoardGameShortDto;
|
import pl.myboardgames.dto.BoardGameShortDto;
|
||||||
import pl.myboardgames.user.model.UserEntity;
|
import pl.myboardgames.model.UserEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -3,9 +3,9 @@
|
|||||||
* To change ret template file, choose Tools | Templates
|
* To change ret template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package pl.myboardgames.user.dto;
|
package pl.myboardgames.dto;
|
||||||
|
|
||||||
import pl.myboardgames.user.model.UserEntity;
|
import pl.myboardgames.model.UserEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -3,9 +3,9 @@
|
|||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package pl.myboardgames.user.dto;
|
package pl.myboardgames.dto;
|
||||||
|
|
||||||
import pl.myboardgames.user.model.UserEntity;
|
import pl.myboardgames.model.UserEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package pl.myboardgames.boardgame.resources;
|
package pl.myboardgames.resources;
|
||||||
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.ejb.EJB;
|
import javax.ejb.EJB;
|
||||||
@ -13,11 +13,11 @@ import javax.ws.rs.PathParam;
|
|||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.db.BoardGameDao;
|
import pl.myboardgames.db.BoardGameDao;
|
||||||
import pl.myboardgames.boardgame.dto.BoardGameDto;
|
import pl.myboardgames.dto.BoardGameDto;
|
||||||
import pl.myboardgames.boardgame.dto.BoardGameMapper;
|
import pl.myboardgames.dto.BoardGameMapper;
|
||||||
import pl.myboardgames.boardgame.dto.BoardGameShortDto;
|
import pl.myboardgames.dto.BoardGameShortDto;
|
||||||
import pl.myboardgames.boardgame.model.BoardGameEntity;
|
import pl.myboardgames.model.BoardGameEntity;
|
||||||
|
|
||||||
@Path("/boardgame")
|
@Path("/boardgame")
|
||||||
@RequestScoped
|
@RequestScoped
|
@ -1,4 +1,4 @@
|
|||||||
package pl.myboardgames.user.resources;
|
package pl.myboardgames.resources;
|
||||||
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.ejb.EJB;
|
import javax.ejb.EJB;
|
||||||
@ -13,12 +13,12 @@ import javax.ws.rs.PathParam;
|
|||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
import pl.myboardgames.boardgame.dto.BoardGameShortDto;
|
import pl.myboardgames.dto.BoardGameShortDto;
|
||||||
import pl.myboardgames.user.db.UserDao;
|
import pl.myboardgames.db.UserDao;
|
||||||
import pl.myboardgames.user.dto.UserDto;
|
import pl.myboardgames.dto.UserDto;
|
||||||
import pl.myboardgames.user.dto.UserMapper;
|
import pl.myboardgames.dto.UserMapper;
|
||||||
import pl.myboardgames.user.dto.UserShortDto;
|
import pl.myboardgames.dto.UserShortDto;
|
||||||
import pl.myboardgames.user.model.UserEntity;
|
import pl.myboardgames.model.UserEntity;
|
||||||
|
|
||||||
@Path("/user")
|
@Path("/user")
|
||||||
@RequestScoped
|
@RequestScoped
|
Loading…
Reference in New Issue
Block a user