Skip to content

Commit

Permalink
#813 | Resolve merge issues for missed commits from java-upgrade to m…
Browse files Browse the repository at this point in the history
…aster
  • Loading branch information
himeshr committed Dec 19, 2024
1 parent 067b27a commit 738e4a9
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.avni.server.dao;

import org.avni.server.domain.ApprovalStatus;
import org.joda.time.DateTime;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.query.Param;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.stereotype.Repository;

import jakarta.persistence.criteria.*;

import java.time.Instant;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.stereotype.Repository;

import jakarta.persistence.criteria.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.avni.server.dao.sync.TransactionDataCriteriaBuilderUtil;
import org.avni.server.domain.*;
import org.avni.server.framework.security.UserContextHolder;
import org.joda.time.LocalDate;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
Expand All @@ -16,9 +17,8 @@
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Repository;

import jakarta.persistence.criteria.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Stream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.avni.server.domain.ProgramEnrolment;
import org.avni.server.framework.security.UserContextHolder;
import org.avni.server.projection.SearchSubjectEnrolledProgram;
import org.joda.time.DateTime;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.avni.server.domain.StandardReportCardType;
import org.avni.server.domain.StandardReportCardTypeType;
import org.joda.time.DateTime;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.query.Param;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.avni.server.dao;

import org.avni.server.domain.SyncTelemetry;
import org.joda.time.DateTime;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.avni.server.domain.User;
import org.avni.server.projection.UserWebProjection;
import org.avni.server.web.request.api.RequestUtils;
import org.joda.time.DateTime;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
Expand All @@ -16,8 +17,6 @@
import org.springframework.data.rest.core.annotation.RestResource;
import org.springframework.stereotype.Repository;

import jakarta.persistence.*;

import java.util.List;
import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.stereotype.Repository;

import jakarta.persistence.criteria.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.stereotype.Repository;

import jakarta.persistence.criteria.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.avni.server.domain.enums.ruleFailure.AppType;
import org.avni.server.domain.enums.ruleFailure.EntityType;
import org.avni.server.domain.enums.ruleFailure.SourceType;
import org.avni.server.util.DateTimeUtil;
import org.avni.server.framework.hibernate.JodaDateTimeConverter;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
Expand All @@ -17,7 +17,7 @@
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.time.Instant;
import java.util.Date;

@Entity
@Table(name = "rule_failure_telemetry")
Expand Down Expand Up @@ -65,10 +65,12 @@ public class RuleFailureTelemetry {
private String stacktrace;

@Column
private Instant closedDateTime;
@Convert(converter = JodaDateTimeConverter.class)
private DateTime closedDateTime;

@Column
private Instant errorDateTime;
@Convert(converter = JodaDateTimeConverter.class)
private DateTime errorDateTime;

@Column
private Boolean isClosed;
Expand All @@ -85,7 +87,8 @@ public class RuleFailureTelemetry {
private User createdBy;

@CreatedDate
private Instant createdDateTime;
@Convert(converter = JodaDateTimeConverter.class)
private Date createdDateTime;

@JsonIgnore
@JoinColumn(name = "last_modified_by_id")
Expand All @@ -96,7 +99,8 @@ public class RuleFailureTelemetry {
private User lastModifiedBy;

@LastModifiedDate
private Instant lastModifiedDateTime;
@Convert(converter = JodaDateTimeConverter.class)
private Date lastModifiedDateTime;

@Column(name = "version")
private int version;
Expand All @@ -106,7 +110,7 @@ public User getCreatedBy() {
}

public DateTime getCreatedDateTime() {
return DateTimeUtil.toJodaDateTime(createdDateTime);
return new DateTime(createdDateTime);
}

public User getLastModifiedBy() {
Expand Down Expand Up @@ -214,19 +218,19 @@ public void setStacktrace(String stacktrace) {
}

public DateTime getClosedDateTime() {
return DateTimeUtil.toJodaDateTime(closedDateTime);
return closedDateTime;
}

public void setClosedDateTime(DateTime closedDateTime) {
this.closedDateTime = DateTimeUtil.toInstant(closedDateTime);
this.closedDateTime = closedDateTime;
}

public DateTime getErrorDateTime() {
return DateTimeUtil.toJodaDateTime(errorDateTime);
return errorDateTime;
}

public void setErrorDateTime(DateTime errorDateTime) {
this.errorDateTime = DateTimeUtil.toInstant(errorDateTime);
this.errorDateTime = errorDateTime;
}

public Boolean getClosed() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package org.avni.server.domain.individualRelationship;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import org.avni.server.domain.Individual;
import org.avni.server.domain.ObservationCollection;
import org.avni.server.domain.OrganisationAwareEntity;
import org.avni.server.framework.hibernate.JodaDateTimeConverter;
import org.avni.server.framework.hibernate.ObservationCollectionUserType;
import org.avni.server.util.DateTimeUtil;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import org.avni.server.dao.AddressLevelTypeRepository;
import org.avni.server.dao.LocationRepository;
import org.avni.server.domain.AddressLevelType;
import org.avni.server.domain.CHSEntity;
import org.avni.server.domain.JsonObject;
import org.avni.server.domain.OrganisationConfig;
import org.avni.server.framework.security.UserContextHolder;
import org.avni.server.util.DateTimeUtil;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.avni.server.service;

import org.avni.server.dao.NewsRepository;
import org.avni.server.domain.CHSEntity;
import org.avni.server.domain.News;
import org.avni.server.domain.util.EntityUtil;
import org.avni.server.util.BadRequestError;
import org.avni.server.util.DateTimeUtil;
import org.avni.server.web.request.NewsContract;
import org.joda.time.DateTime;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.avni.server.service.ScopeBasedSyncService;
import org.avni.server.service.UserService;
import org.avni.server.service.accessControl.AccessControlService;
import org.avni.server.util.DateTimeUtil;
import org.avni.server.web.request.IndividualRelationshipRequest;
import org.avni.server.web.response.slice.SlicedResources;
import org.joda.time.DateTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jakarta.transaction.Transactional;
import org.avni.server.common.AbstractControllerIntegrationTest;
import org.avni.server.dao.GeneralRepository;
import org.avni.server.dao.GroupRoleRepository;
import org.avni.server.dao.UserRepository;
import org.avni.server.dao.UserSubjectAssignmentRepository;
Expand All @@ -20,7 +21,6 @@
import org.avni.server.web.request.syncAttribute.UserSyncSettings;
import org.joda.time.DateTime;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
Expand Down

0 comments on commit 738e4a9

Please sign in to comment.