-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from fronzec/feature/fr-batch-service/migrate-…
…to-spring-boot-3 Feature/fr batch service/migrate to spring boot 3
- Loading branch information
Showing
18 changed files
with
747 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#-------------------------------------------------------------------------------# | ||
# Qodana analysis is configured by qodana.yaml file # | ||
# https://www.jetbrains.com/help/qodana/qodana-yaml.html # | ||
#-------------------------------------------------------------------------------# | ||
version: "1.0" | ||
|
||
#Specify inspection profile for code analysis | ||
profile: | ||
name: qodana.starter | ||
|
||
#Enable inspections | ||
#include: | ||
# - name: <SomeEnabledInspectionId> | ||
|
||
#Disable inspections | ||
#exclude: | ||
# - name: <SomeDisabledInspectionId> | ||
# paths: | ||
# - <path/where/not/run/inspection> | ||
|
||
projectJDK: 22 #(Applied in CI/CD pipeline) | ||
|
||
#Execute shell command before Qodana execution (Applied in CI/CD pipeline) | ||
#bootstrap: sh ./prepare-qodana.sh | ||
|
||
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) | ||
#plugins: | ||
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com) | ||
|
||
#Specify Qodana linter for analysis (Applied in CI/CD pipeline) | ||
linter: jetbrains/qodana-jvm:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
fr-batch-service/src/main/java/com/fronzec/frbatchservice/batchjobs/JobsManagerService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
199 changes: 100 additions & 99 deletions
199
...ain/java/com/fronzec/frbatchservice/batchjobs/dispatchedgroups/DispatchedGroupEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,112 @@ | ||
/* 2024 */ | ||
package com.fronzec.frbatchservice.batchjobs.dispatchedgroups; | ||
|
||
import jakarta.persistence.Basic; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import java.time.LocalDateTime; | ||
import java.util.Objects; | ||
import javax.persistence.Basic; | ||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.EnumType; | ||
import javax.persistence.Enumerated; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.GenerationType; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
import org.hibernate.annotations.CreationTimestamp; | ||
import org.hibernate.annotations.UpdateTimestamp; | ||
|
||
@Entity | ||
@Table(name = "dispatched_group") | ||
public class DispatchedGroupEntity { | ||
|
||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Id | ||
@Column(name = "id", nullable = false) | ||
private long id; | ||
|
||
@Basic | ||
@Column(name = "uuid_v4", nullable = false, length = 36) | ||
private String uuidV4; | ||
|
||
@Column(name = "dispatch_status", nullable = false, length = 10) | ||
@Enumerated(EnumType.STRING) | ||
private DispatchStatus dispatchStatus = DispatchStatus.UNKNOWN; | ||
|
||
@Basic | ||
@Column(name = "records_included", nullable = false) | ||
private int recordsIncluded = 0; | ||
|
||
@CreationTimestamp | ||
@Column(name = "created_at", nullable = false) | ||
private LocalDateTime createdAt; | ||
|
||
@UpdateTimestamp | ||
@Column(name = "updated_at", nullable = false) | ||
private LocalDateTime updatedAt; | ||
|
||
public long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getUuidV4() { | ||
return uuidV4; | ||
} | ||
|
||
public void setUuidV4(String uuidV4) { | ||
this.uuidV4 = uuidV4; | ||
} | ||
|
||
public DispatchStatus getDispatchStatus() { | ||
return dispatchStatus; | ||
} | ||
|
||
public void setDispatchStatus(DispatchStatus dispatchStatus) { | ||
this.dispatchStatus = dispatchStatus; | ||
} | ||
|
||
public int getRecordsIncluded() { | ||
return recordsIncluded; | ||
} | ||
|
||
public void setRecordsIncluded(int recordsIncluded) { | ||
this.recordsIncluded = recordsIncluded; | ||
} | ||
|
||
public LocalDateTime getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(LocalDateTime createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public LocalDateTime getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(LocalDateTime updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
DispatchedGroupEntity that = (DispatchedGroupEntity) o; | ||
return (id == that.id | ||
&& uuidV4.equals(that.uuidV4) | ||
&& dispatchStatus.equals(that.dispatchStatus) | ||
&& recordsIncluded == that.recordsIncluded | ||
&& createdAt.equals(that.createdAt) | ||
&& updatedAt.equals(that.updatedAt)); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, uuidV4, dispatchStatus, recordsIncluded, createdAt, updatedAt); | ||
} | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Id | ||
@Column(name = "id", nullable = false) | ||
private long id; | ||
|
||
@Basic | ||
@Column(name = "uuid_v4", nullable = false, length = 36) | ||
private String uuidV4; | ||
|
||
@Column(name = "dispatch_status", nullable = false, length = 10) | ||
@Enumerated(EnumType.STRING) | ||
private DispatchStatus dispatchStatus = DispatchStatus.UNKNOWN; | ||
|
||
@Basic | ||
@Column(name = "records_included", nullable = false) | ||
private int recordsIncluded = 0; | ||
|
||
@CreationTimestamp | ||
@Column(name = "created_at", nullable = false) | ||
private LocalDateTime createdAt; | ||
|
||
@UpdateTimestamp | ||
@Column(name = "updated_at", nullable = false) | ||
private LocalDateTime updatedAt; | ||
|
||
public long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getUuidV4() { | ||
return uuidV4; | ||
} | ||
|
||
public void setUuidV4(String uuidV4) { | ||
this.uuidV4 = uuidV4; | ||
} | ||
|
||
public DispatchStatus getDispatchStatus() { | ||
return dispatchStatus; | ||
} | ||
|
||
public void setDispatchStatus(DispatchStatus dispatchStatus) { | ||
this.dispatchStatus = dispatchStatus; | ||
} | ||
|
||
public int getRecordsIncluded() { | ||
return recordsIncluded; | ||
} | ||
|
||
public void setRecordsIncluded(int recordsIncluded) { | ||
this.recordsIncluded = recordsIncluded; | ||
} | ||
|
||
public LocalDateTime getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(LocalDateTime createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public LocalDateTime getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(LocalDateTime updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
DispatchedGroupEntity that = (DispatchedGroupEntity) o; | ||
return (id == that.id | ||
&& uuidV4.equals(that.uuidV4) | ||
&& dispatchStatus.equals(that.dispatchStatus) | ||
&& recordsIncluded == that.recordsIncluded | ||
&& createdAt.equals(that.createdAt) | ||
&& updatedAt.equals(that.updatedAt)); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, uuidV4, dispatchStatus, recordsIncluded, createdAt, updatedAt); | ||
} | ||
} |
Oops, something went wrong.