Skip to content

Commit

Permalink
Gave format
Browse files Browse the repository at this point in the history
  • Loading branch information
mamartinezmejia committed Jan 16, 2024
1 parent a5755cf commit 9935679
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions legacy/src/main/java/ca/bc/gov/app/dto/ForestClientDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,31 @@
import org.springframework.data.annotation.Transient;

public record ForestClientDto(
String clientNumber,
String clientName,
String legalFirstName,
String legalMiddleName,
String clientStatusCode,
String clientTypeCode,
LocalDate birthdate,
String clientIdTypeCode,
String clientIdentification,
String registryCompanyTypeCode,
String corpRegnNmbr,
String clientComment,
String createdBy,
String updatedBy,
Long orgUnit
) {
String clientNumber,
String clientName,
String legalFirstName,
String legalMiddleName,
String clientStatusCode,
String clientTypeCode,
LocalDate birthdate,
String clientIdTypeCode,
String clientIdentification,
String registryCompanyTypeCode,
String corpRegnNmbr,
String clientComment,
String createdBy,
String updatedBy,
Long orgUnit) {

@Transient
public String name(){
if(Objects.equals(this.clientTypeCode, "I")){
return Stream.of(this.legalFirstName, this.legalMiddleName, this.clientName)
.filter(Objects::nonNull)
.collect(Collectors.joining(" "));
}else{
return this.clientName;
}
}
@Transient
public String name() {
if (Objects.equals(this.clientTypeCode, "I")) {
return Stream.of(this.legalFirstName, this.legalMiddleName, this.clientName)
.filter(Objects::nonNull)
.collect(Collectors.joining(" "));
} else {
return this.clientName;
}
}

}

0 comments on commit 9935679

Please sign in to comment.