-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using IndividualBulkResponse class in egov-hrms
- Loading branch information
1 parent
50d6167
commit e7a51b8
Showing
3 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
core-services/egov-hrms/src/main/java/org/egov/hrms/web/models/IndividualBulkResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package org.egov.hrms.web.models; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.egov.common.contract.response.ResponseInfo; | ||
import org.egov.common.models.individual.Individual; | ||
import org.springframework.validation.annotation.Validated; | ||
|
||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* IndividualBulkResponse | ||
*/ | ||
@Validated | ||
|
||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class IndividualBulkResponse { | ||
|
||
@JsonProperty("ResponseInfo") | ||
@NotNull | ||
@Valid | ||
private ResponseInfo responseInfo = null; | ||
|
||
@JsonProperty("TotalCount") | ||
@Valid | ||
@Builder.Default | ||
private Long totalCount = 0L; | ||
|
||
@JsonProperty("Individual") | ||
@Valid | ||
private List<Individual> individual = null; | ||
|
||
public IndividualBulkResponse addIndividualItem(Individual individualItem) { | ||
if (this.individual == null) { | ||
this.individual = new ArrayList<>(); | ||
} | ||
this.individual.add(individualItem); | ||
return this; | ||
} | ||
|
||
} |