Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/core 421to423 final #202

Closed
wants to merge 12 commits into from
Closed

Conversation

fegrasso
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@babubabu babubabu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the implementation looks good to me and can be understood easily.

Although I think, some changes need to be done to make the code consistent to the already existing code.

  1. Some classes and tables seem to be misspelled with "synch" instead of "sync"
  2. I don't get, why mapstruct is introduced and used in this specific case. It seems to, as there are many manual mappings done. So we can just map it manual completely. In both ways, we need complete tests for this mappings, either with or without mapstruct
  3. Please consider using a @ConfigurationProperties class instead using "@value" configurations manually. Have a look at "DepartmentProperties"
  4. We have a version mismatch in the pom.xml. Please use the dependencies, that match the specific used spring-version.
  5. Please have a closer look at the commented classes, in case I missed any points in this summary

Thanks for your work!

backend/pom.xml Outdated
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>2.3.2.RELEASE</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this version to be set? This should be injected by parent.
Additionally we're on spring 2.4.X

backend/pom.xml Outdated
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.11.2</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this version to be set? This should be injected by parent.

@Setter(AccessLevel.NONE)
@RequiredArgsConstructor
@Component
public class SynchContacts {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo error: please remove "h"

private final @NonNull ContactsSyncReportRepository reports;
private final @NonNull ContactsSyncBacklogRepository backlog;

@org.springframework.beans.factory.annotation.Value("${quarano.sormas-integration.sormasurl:}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider to use a configuration-properties class and component as it is done with "DepartmentProperties"

public interface ContactsSyncBacklogRepository extends JpaRepository<ContactsSynchBacklog, Long> {
// Returns all modified or inserted records after specified date
@Query("select distinct b.id from ContactsSynchBacklog b where b.syncDate <= :syncDate")
ArrayList<UUID> findBySyncDate(Date syncDate);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider to use more general interface "List<>" or "Streamable<>"

@Slf4j
@NoArgsConstructor(force = true, access = AccessLevel.PUBLIC)
@AllArgsConstructor(access = AccessLevel.PUBLIC)
public class ContactsSynchBacklog {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in Word "Synch". please remove "h"

public interface IndexSyncBacklogRepository extends JpaRepository<IndexSynchBacklog, Long> {
// Returns all modified or inserted records after specified date
@Query("select distinct b.id from IndexSynchBacklog b where b.syncDate <= :syncDate")
ArrayList<UUID> findBySyncDate(Date syncDate);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider to use more general interface "List<>" or "Streamable<>"

@NoArgsConstructor(access = AccessLevel.PUBLIC)
public class SormasCase {
private String uuid;
private Date reportDate;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use new java.time ZonedDateTime or LocalDateTime

Copy link
Collaborator

@babubabu babubabu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better to me.

Please implement those empty tests in the Test class or remove them, if not needed.

@fegrasso fegrasso requested a review from babubabu March 25, 2021 17:29
@babubabu
Copy link
Collaborator

Looks good now. Please squash the commits and follow our merge instructions in slack to merge it

@fegrasso fegrasso closed this Mar 29, 2021
@fegrasso fegrasso deleted the feature/CORE-421to423Final branch March 29, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants