use of com.nixmash.blog.solr.model.PostDoc in project nixmash-blog by mintster.
the class SolrTestUtils method createPostDoc.
protected static PostDoc createPostDoc(int id) {
PostDoc postDoc = new PostDoc();
postDoc.setPostId(Integer.toString(id));
postDoc.setPostTitle("Post Title " + id);
postDoc.setPostAuthor("mintster");
postDoc.setPostName("post-title-" + id);
postDoc.setPostLink(id % 2 == 0 ? "" : "http://somewhere/" + id);
postDoc.setPostType(id % 2 == 0 ? "POST" : "LINK");
postDoc.setPostHTML("<strong>Post HTML</strong> " + id);
postDoc.setPostText("Post Content " + id);
postDoc.setPostSource(id % 2 == 0 ? "somewhere.com" : "NA");
postDoc.setTags(tags);
postDoc.setDocType(SolrDocType.POST);
return postDoc;
}
Aggregations