Package org.javlo.social
Class SocialLocalService
- java.lang.Object
-
- org.javlo.social.SocialLocalService
-
public class SocialLocalService extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATABASE_NAME
-
Constructor Summary
Constructors Constructor Description SocialLocalService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
__getPostListSize(SocialFilter socialFilter, String username, String group, boolean admin, boolean needCheck)
Post
createPost(Post post)
Post
createPost(Post post, Connection conn)
void
deletePost(boolean admin, String author, long id)
static SocialLocalService
getInstance(GlobalContext globalContext)
Post
getPost(Long id, String author, boolean admin, boolean needCheck)
List<Post>
getPost(String group)
List<Post>
getPost(SocialFilter socialFilter, boolean admin, boolean needCheck, String username, String group, int size, int index)
List<Post>
getPostByAuthor(String group, String author)
long
getPostListSize(String group)
long
getPostListSize(SocialFilter socialFilter, String username, String group, boolean admin, boolean needCheck)
List<Post>
getReplies(SocialFilter socialFilter, String username, boolean admin, boolean needCheck, long mainPost)
SocialStat
getSocialStat(int year)
SocialStat
getSocialStat(LocalDate date)
long
getUnvalidedPostListSize(String group)
static void
main(String[] args)
protected Post
rsToPost(Connection conn, ResultSet rs, String authors, boolean admin, boolean needCheck)
void
updatePost(Post post)
-
-
-
Field Detail
-
DATABASE_NAME
public static final String DATABASE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static SocialLocalService getInstance(GlobalContext globalContext) throws Exception
- Throws:
Exception
-
getPostByAuthor
public List<Post> getPostByAuthor(String group, String author) throws Exception
- Throws:
Exception
-
getSocialStat
public SocialStat getSocialStat(LocalDate date) throws Exception
- Throws:
Exception
-
getSocialStat
public SocialStat getSocialStat(int year) throws Exception
- Throws:
Exception
-
__getPostListSize
public long __getPostListSize(SocialFilter socialFilter, String username, String group, boolean admin, boolean needCheck) throws Exception
- Throws:
Exception
-
getPostListSize
public long getPostListSize(SocialFilter socialFilter, String username, String group, boolean admin, boolean needCheck) throws Exception
- Throws:
Exception
-
getUnvalidedPostListSize
public long getUnvalidedPostListSize(String group) throws Exception
- Throws:
Exception
-
getPost
public List<Post> getPost(SocialFilter socialFilter, boolean admin, boolean needCheck, String username, String group, int size, int index) throws Exception
- Throws:
Exception
-
getPost
public Post getPost(Long id, String author, boolean admin, boolean needCheck) throws Exception
- Throws:
Exception
-
getReplies
public List<Post> getReplies(SocialFilter socialFilter, String username, boolean admin, boolean needCheck, long mainPost) throws Exception
- Throws:
Exception
-
rsToPost
protected Post rsToPost(Connection conn, ResultSet rs, String authors, boolean admin, boolean needCheck) throws Exception
- Throws:
Exception
-
createPost
public Post createPost(Post post, Connection conn) throws Exception
- Throws:
Exception
-
deletePost
public void deletePost(boolean admin, String author, long id) throws Exception
- Throws:
Exception
-
main
public static void main(String[] args)
-
-