Skip to content

Commit

Permalink
Merge branch 'release-1.3.x' into dev-save-1.3.x
Browse files Browse the repository at this point in the history
Signed-off-by: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com>
  • Loading branch information
GOKULRAJ136 authored Jan 23, 2025
2 parents c60c1a6 + 2eef256 commit 51ea37a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
package io.mosip.kernel.masterdata.entity;

import java.io.Serializable;
import java.time.LocalDate;

import io.mosip.kernel.masterdata.entity.id.HolidayID;
import jakarta.persistence.AttributeOverride;
import jakarta.persistence.AttributeOverrides;

//github.com/mosip/mosip.git

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;

import io.mosip.kernel.masterdata.entity.id.HolidayID;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;

/**
*
* @author Abhishek Kumar
Expand All @@ -43,13 +39,11 @@ public class Holiday extends BaseEntity implements Serializable {
@AttributeOverride(name = "holidayDate", column = @Column(name = "holiday_date", nullable = false)),
@AttributeOverride(name = "locationCode", column = @Column(name = "location_code", nullable = false, length = 36)),
@AttributeOverride(name = "langCode", column = @Column(name = "lang_code", nullable = false, length = 3)) })
@Column(name = "holiday_date", nullable = false)

private LocalDate holidayDate;

@Column(name = "location_code", nullable = false, length = 36)
private String locationCode;

@Column(name = "lang_code", nullable = false, length = 3)
private String langCode;

@Column(name = "holiday_name", nullable = false, length = 64)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import io.mosip.kernel.masterdata.dto.response.HolidaySearchDto;
import io.mosip.kernel.masterdata.dto.response.PageResponseDto;
import io.mosip.kernel.masterdata.dto.response.FilterResponseCodeDto;
import io.mosip.kernel.masterdata.dto.response.ColumnCodeValue;
import io.mosip.kernel.masterdata.dto.response.FilterResult;
import io.mosip.kernel.masterdata.dto.response.ColumnCodeValue;
import io.mosip.kernel.masterdata.entity.Holiday;
import io.mosip.kernel.masterdata.entity.Location;
import io.mosip.kernel.masterdata.exception.DataNotFoundException;
Expand Down Expand Up @@ -57,14 +57,14 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.List;
import java.util.Map;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Optional;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
import java.util.Objects;
import java.util.HashMap;
import java.util.Set;
import java.util.Optional;
import java.util.Objects;
import java.util.stream.Collectors;

/**
Expand Down Expand Up @@ -99,7 +99,7 @@ public class HolidayServiceImpl implements HolidayService {
@Autowired
private AuditUtil auditUtil;

private static final String UPDATE_HOLIDAY_QUERY = "UPDATE Holiday h SET h.updatedBy = :updatedBy , h.updatedDateTime = :updatedDateTime, h.holidayDesc = :holidayDesc,h.holidayId.holidayDate=:holidayDate,h.holidayId.holidayName = :holidayName WHERE h.holidayId.locationCode = :locationCode and h.holidayId.holidayId = :holidayId and h.holidayId.langCode = :langCode and (h.isDeleted is null or h.isDeleted = false)";
private static final String UPDATE_HOLIDAY_QUERY = "UPDATE Holiday h SET h.updatedBy = :updatedBy , h.updatedDateTime = :updatedDateTime, h.holidayDesc = :holidayDesc, h.holidayDate= :holidayDate, h.holidayName = :holidayName WHERE h.locationCode = :locationCode and h.holidayId = :holidayId and h.langCode = :langCode and (h.isDeleted is null or h.isDeleted = false)";
private static final int DEFAULT_HOLIDAY_ID = 2000001;

/*
Expand Down

0 comments on commit 51ea37a

Please sign in to comment.