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.EntityManageremem is theEntityManagerthat 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 thePostBeanobject list are already in the databaseprivate java.lang.StringgetUrlList(java.util.List<PostBean> pbList)Gets the existing posts from a particular content creatorMethods inherited from class com.patreonshout.rest.BaseSvc
catchCustomException, catchSQLIntegrityConstraintViolationExceptionMethods 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 theEntityManagerthat handles all the transactions with our database
-
-
Constructor Details
-
PostsRepositoryImpl
public PostsRepositoryImpl()
-
-
Method Details
-
getExistingPosts
getExistingPosts() checks what posts in thePostBeanobject list are already in the database -
getUrlList
Gets the existing posts from a particular content creator- Parameters:
pbList- is the list ofPostBeanobjects that we want to check the database for- Returns:
- a list of urls from the pbList provided
-