Skip to content

Commit

Permalink
#813 | Remove common duplicate imports
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Dec 19, 2024
1 parent 738e4a9 commit 9b014a7
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.avni.server.dao;
import java.time.Instant;
import java.util.Date;

import org.avni.server.domain.Catchment;
import org.avni.server.domain.IdentifierSource;
import org.springframework.data.domain.Page;
Expand All @@ -12,7 +11,7 @@
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Repository;

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

@Repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.avni.server.domain.AddressLevelType;
import org.avni.server.domain.Catchment;
import org.avni.server.framework.security.UserContextHolder;
import org.avni.server.util.DateTimeUtil;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
Expand All @@ -19,10 +18,10 @@
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;

import jakarta.persistence.QueryHint;
import jakarta.validation.constraints.NotNull;

import java.util.*;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Optional;

@Repository
@RepositoryRestResource(collectionResourceRel = "locations", path = "locations")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.avni.server.domain.User;
import org.avni.server.framework.security.UserContextHolder;
import org.avni.server.service.exception.ConstraintViolationExceptionAcrossOrganisations;
import org.avni.server.util.DateTimeUtil;
import org.avni.server.util.JsonObjectUtil;
import org.hibernate.exception.ConstraintViolationException;
import org.springframework.dao.DataIntegrityViolationException;
Expand All @@ -20,8 +19,6 @@
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.NoRepositoryBean;

import jakarta.persistence.criteria.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.avni.server.dao;

import java.util.Date;
import org.avni.server.domain.User;
import org.avni.server.domain.Group;
import org.avni.server.domain.User;
import org.avni.server.domain.UserGroup;
Expand All @@ -13,7 +11,7 @@
import org.springframework.data.rest.core.annotation.RestResource;
import org.springframework.stereotype.Repository;

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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;

import java.time.Instant;
import java.util.Objects;

@MappedSuperclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import org.avni.server.util.DateTimeUtil;
import org.hibernate.annotations.BatchSize;
import org.joda.time.DateTime;

import jakarta.persistence.Column;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;

@Entity
@Table(name = "news")
@BatchSize(size = 100)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
import jakarta.validation.constraints.NotNull;
import org.avni.server.framework.hibernate.JSONObjectUserType;
import org.avni.server.framework.hibernate.JodaDateTimeConverter;
import org.avni.server.util.DateTimeUtil;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;

@Entity
@Table(name = "sync_telemetry")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
import org.avni.server.domain.OrganisationAwareEntity;
import org.avni.server.domain.Program;
import org.avni.server.framework.hibernate.ObservationCollectionUserType;
import org.avni.server.util.DateTimeUtil;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;

@Entity(name = "subject_program_eligibility")
public class SubjectProgramEligibility extends OrganisationAwareEntity {
@ManyToOne(targetEntity = Individual.class, fetch = FetchType.LAZY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@
import org.avni.server.domain.User;
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;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;

@Entity
@Table(name = "task")
@BatchSize(size = 100)
Expand Down

0 comments on commit 9b014a7

Please sign in to comment.