Package com.patreonshout.jpa
Class PostsRepositoryImpl
java.lang.Object
com.patreonshout.rest.BaseSvc
com.patreonshout.jpa.PostsRepositoryImpl
@Repository public class PostsRepositoryImpl extends BaseSvc
Implementation of custom Spring Data Repository for custom SQL functionality not automatically provided in
JpaRepository
-
Field Summary
Fields Modifier and Type Field Description private javax.persistence.EntityManager
em
em is theEntityManager
that handles all the transactions with our database -
Constructor Summary
Constructors Constructor Description PostsRepositoryImpl()
-
Method Summary
Modifier and Type Method Description java.util.List<PostBean>
getExistingPosts(java.util.List<PostBean> pbList)
getExistingPosts() checks what posts in thePostBean
object list are already in the databaseprivate java.lang.String
getUrlList(java.util.List<PostBean> pbList)
Gets the existing posts from a particular content creatorMethods inherited from class com.patreonshout.rest.BaseSvc
catchCustomException, catchSQLIntegrityConstraintViolationException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
em
private javax.persistence.EntityManager emem is theEntityManager
that handles all the transactions with our database
-
-
Constructor Details
-
PostsRepositoryImpl
public PostsRepositoryImpl()
-
-
Method Details
-
getExistingPosts
getExistingPosts() checks what posts in thePostBean
object list are already in the database -
getUrlList
Gets the existing posts from a particular content creator- Parameters:
pbList
- is the list ofPostBean
objects that we want to check the database for- Returns:
- a list of urls from the pbList provided
-