public class CommentServiceImpl extends java.lang.Object implements CommentService
| Modifier and Type | Field and Description |
|---|---|
protected ProjectEndpoints |
endpoints |
protected org.codehaus.jackson.type.TypeReference<QueryResult<T>> |
queryResultTypeReference |
protected RequestFactory |
requestFactory |
protected org.codehaus.jackson.type.TypeReference<T> |
typeReference |
| Constructor and Description |
|---|
CommentServiceImpl(RequestFactory requestFactory,
ProjectEndpoints endpoints) |
| Modifier and Type | Method and Description |
|---|---|
QueryRequest<Comment> |
all()
Deprecated.
|
FetchRequest<Comment> |
byId(java.lang.String id)
Finds a comment by id.
|
protected CommandRequest<T> |
createCommandRequest(java.lang.String url,
Command command) |
CommandRequest<Comment> |
createComment(java.lang.String productId,
java.lang.String customerId,
java.lang.String authorName,
java.lang.String title,
java.lang.String text)
Creates a comment.
|
QueryRequest<Comment> |
forCustomer(java.lang.String customerId)
Queries all comments by given customer.
|
QueryRequest<Comment> |
forProduct(java.lang.String productId)
Queries all comments for a specific product.
|
QueryRequest<Comment> |
query()
Queries comments.
|
protected QueryRequest<T> |
queryImpl(java.lang.String url) |
CommandRequest<Comment> |
updateComment(VersionedId commentId,
CommentUpdate update)
Updates a comment.
|
protected ProjectEndpoints endpoints
protected RequestFactory requestFactory
protected org.codehaus.jackson.type.TypeReference<T> typeReference
protected org.codehaus.jackson.type.TypeReference<QueryResult<T>> queryResultTypeReference
public CommentServiceImpl(RequestFactory requestFactory, ProjectEndpoints endpoints)
public FetchRequest<Comment> byId(java.lang.String id)
CommentServicebyId in interface CommentService@Deprecated public QueryRequest<Comment> all()
CommentServiceall in interface CommentServicepublic QueryRequest<Comment> query()
CommentServicequery in interface CommentServicepublic QueryRequest<Comment> forCustomer(java.lang.String customerId)
CommentServiceforCustomer in interface CommentServicepublic QueryRequest<Comment> forProduct(java.lang.String productId)
CommentServiceforProduct in interface CommentServicepublic CommandRequest<Comment> createComment(java.lang.String productId, java.lang.String customerId, java.lang.String authorName, java.lang.String title, java.lang.String text)
CommentServicecreateComment in interface CommentServicepublic CommandRequest<Comment> updateComment(VersionedId commentId, CommentUpdate update)
CommentServiceupdateComment in interface CommentServiceprotected CommandRequest<T> createCommandRequest(java.lang.String url, Command command)
protected QueryRequest<T> queryImpl(java.lang.String url)