Closed alessandriniluca closed 3 years ago
FIRST PROBLEM I don't think it is a problem, because when you retrieve the list of product of the day, there are no lists related to it, And if a person cancel his questionnaire the product of the day exists, so, if I understand correctly the issue this is not a problem
FIRST PROBLEM Filter and retrieve all the answer to the questionnaire with a query, and if there are no reviews or reise an exception or return an empty list, do what you want :-)
SECOND PROBLEM (For marketing answer) All return me the answer and all the questions are related to the answer (For statistical answer) Return just the aswer, the
@alessandriniluca My point of view (point of view from the EJB). To clarify all.
Can I assume that the marketing question list of the product is not null (since I think that in the setting part there should be a check for this), or there could be a product with no marketing questions?
It is not specified if the product can have an empty number of marketing questions... So, we can soppose it must have at least one marketing question. (I need to update the EJB to perform such a control).
We assumed that in order to answer the statistical questions (which are fixed questions), the user selects between a multiple choice format output (or something like that), and then we memorize the number of the response, but we have no place in which we store the text.
Only the frontend knows what is the text of the question and of the answer. We only knows the "Integer" corresponding to the answer, but not the text.
I'll answer to both with one single comment: Perfect, now is more clear to me
I'm working on class ProductUserService, and I am facing two problems:
FIRST PROBLEM When you retrieve the questionnaire response to a specific product, you can face 3 cases:
I don't know how exactly @sam98uele managed this part, but since there exists also a class "ProductAdminService", I am assuming that the method that retrieves the deleted product for admins, should be in the class "ProductAdminService", hence I must return nothing in the third case (maybe I will create an exception for this case) because the generic user (not admin) has no permission to see the canceled questionnaires. Am I assuming right? (I'm asking because I cannot see the current implementation of ProductAdminService, hence I cannot see all the updated methods).
SECOND PROBLEM I need to retrieve the marketing questions and statistical questions, in order to pass them to the frontend in order to display together with the answers. Here I can divide my question into two more further questions: