@Service
@Transactional
public class PostService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private AuthService |
authService |
private GuildRepo |
guildRepo |
private PostMapper |
postMapper |
private PostRepo |
postRepository |
private UserRepo |
userRepository |
Constructor and Description |
---|
PostService() |
Modifier and Type | Method and Description |
---|---|
java.util.List<PostResponse> |
getAllPosts() |
PostResponse |
getPost(java.lang.Long id) |
java.util.List<PostResponse> |
getPostsByGuild(java.lang.Long guildId) |
java.util.List<PostResponse> |
getPostsByUsername(java.lang.String username) |
void |
save(PostRequest postRequest) |
private final PostRepo postRepository
private final GuildRepo guildRepo
private final UserRepo userRepository
private final AuthService authService
private final PostMapper postMapper
@Transactional(readOnly=true) public PostResponse getPost(java.lang.Long id)
@Transactional(readOnly=true) public java.util.List<PostResponse> getAllPosts()
public void save(PostRequest postRequest)
@Transactional(readOnly=true) public java.util.List<PostResponse> getPostsByGuild(java.lang.Long guildId)
@Transactional(readOnly=true) public java.util.List<PostResponse> getPostsByUsername(java.lang.String username)