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 StringDATABASE_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)PostcreatePost(Post post)PostcreatePost(Post post, Connection conn)voiddeletePost(boolean admin, String author, long id)static SocialLocalServicegetInstance(GlobalContext globalContext)PostgetPost(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)longgetPostListSize(String group)longgetPostListSize(SocialFilter socialFilter, String username, String group, boolean admin, boolean needCheck)List<Post>getReplies(SocialFilter socialFilter, String username, boolean admin, boolean needCheck, long mainPost)SocialStatgetSocialStat(int year)SocialStatgetSocialStat(LocalDate date)longgetUnvalidedPostListSize(String group)static voidmain(String[] args)protected PostrsToPost(Connection conn, ResultSet rs, String authors, boolean admin, boolean needCheck)voidupdatePost(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)
-
-