VictorPavfurious commented on code in PR #4640: URL: https://github.com/apache/fineract/pull/4640#discussion_r2137317313
########## fineract-client/src/main/java/org/apache/fineract/client/models/SurveyResponseData.java: ########## @@ -0,0 +1,75 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.fineract.client.models; + +import com.google.gson.annotations.SerializedName; +import java.util.Objects; +import lombok.Getter; +import lombok.Setter; + +/** + * Model representing a survey response option + */ +@Setter +@Getter +public class SurveyResponseData { + + @SerializedName("text") Review Comment: Are you sure that @SerializedName is needed? Try to avoid using GSON where possible, we have mission go to Jackson ########## fineract-provider/src/main/java/org/apache/fineract/spm/data/ResponseData.java: ########## @@ -18,50 +18,62 @@ */ package org.apache.fineract.spm.data; +import java.util.Objects; +import lombok.Getter; +import lombok.Setter; + +/** + * Model representing a survey response option for internal mapping + */ +@Getter +@Setter public class ResponseData { private Long id; private String text; private Integer value; private Integer sequenceNo; - public ResponseData() { - - } + public ResponseData() {} Review Comment: Use lombok in this class, for constructor, set values fields ########## fineract-client/src/main/java/org/apache/fineract/client/models/SurveyResponseData.java: ########## @@ -0,0 +1,75 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.fineract.client.models; + +import com.google.gson.annotations.SerializedName; +import java.util.Objects; +import lombok.Getter; +import lombok.Setter; + +/** + * Model representing a survey response option + */ +@Setter +@Getter +public class SurveyResponseData { + + @SerializedName("text") + private String text; + + @SerializedName("value") + private Integer value; + + @SerializedName("sequenceNo") + private Integer sequenceNo; + + public SurveyResponseData text(String text) { + this.text = text; + return this; + } + + public SurveyResponseData value(Integer value) { Review Comment: Hm, I think we can replace it to @Accessors(chain = true)... But are you sure that logic is needed? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
