-
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.
- Loading branch information
Showing
79 changed files
with
5,220 additions
and
58 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
27 changes: 21 additions & 6 deletions
27
backend-el/src/main/java/ca/bc/gov/nrs/environment/fta/el/FtaRstExporterApplication.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,17 +1,32 @@ | ||
package ca.bc.gov.nrs.environment.fta.el; | ||
|
||
import ca.bc.gov.nrs.environment.fta.el.services.ApplicationService; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.boot.CommandLineRunner; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.retry.annotation.EnableRetry; | ||
import org.springframework.scheduling.annotation.EnableScheduling; | ||
|
||
@SpringBootApplication | ||
@EnableScheduling | ||
@EnableRetry | ||
public class FtaRstExporterApplication { | ||
public class FtaRstExporterApplication implements CommandLineRunner { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(FtaRstExporterApplication.class, args); | ||
} | ||
private final ApplicationService applicationService; | ||
private static final Logger logger = LoggerFactory | ||
.getLogger(FtaRstExporterApplication.class); | ||
|
||
public FtaRstExporterApplication(ApplicationService applicationService) { | ||
this.applicationService = applicationService; | ||
} | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(FtaRstExporterApplication.class, args); | ||
} | ||
|
||
@Override | ||
public void run(String... args) { | ||
this.applicationService.extractAndUploadCSVToS3(); | ||
} | ||
|
||
} |
128 changes: 128 additions & 0 deletions
128
backend-el/src/main/java/ca/bc/gov/nrs/environment/fta/el/entities/RecreationComment.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 |
---|---|---|
@@ -0,0 +1,128 @@ | ||
package ca.bc.gov.nrs.environment.fta.el.entities; | ||
|
||
import jakarta.persistence.*; | ||
import org.hibernate.annotations.ColumnDefault; | ||
import org.springframework.data.annotation.Immutable; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "RECREATION_COMMENT", schema = "THE") | ||
@Immutable | ||
@IdClass(RecreationCommentId.class) | ||
public class RecreationComment { | ||
@Id | ||
@Column(name = "RECREATION_COMMENT_ID", nullable = false) | ||
private Long recreationCommentId; | ||
|
||
@Id | ||
@Column(name = "FOREST_FILE_ID", nullable = false, length = 10) | ||
private String forestFileId; | ||
|
||
|
||
@ColumnDefault("'N'") | ||
@Column(name = "CLOSURE_IND", nullable = false, length = 1) | ||
private String closureInd; | ||
|
||
@Column(name = "PROJECT_COMMENT", nullable = false, length = 2000) | ||
private String projectComment; | ||
|
||
@Column(name = "COMMENT_DATE") | ||
private LocalDateTime commentDate; | ||
|
||
@Column(name = "REVISION_COUNT", nullable = false) | ||
private Integer revisionCount; | ||
|
||
@Column(name = "ENTRY_USERID", nullable = false, length = 30) | ||
private String entryUserid; | ||
|
||
@Column(name = "ENTRY_TIMESTAMP", nullable = false) | ||
private LocalDateTime entryTimestamp; | ||
|
||
@Column(name = "UPDATE_USERID", nullable = false, length = 30) | ||
private String updateUserid; | ||
|
||
@Column(name = "UPDATE_TIMESTAMP", nullable = false) | ||
private LocalDateTime updateTimestamp; | ||
|
||
public Long getRecreationCommentId() { | ||
return recreationCommentId; | ||
} | ||
|
||
public void setRecreationCommentId(Long recreationCommentId) { | ||
this.recreationCommentId = recreationCommentId; | ||
} | ||
|
||
public String getForestFileId() { | ||
return forestFileId; | ||
} | ||
|
||
public void setForestFileId(String forestFileId) { | ||
this.forestFileId = forestFileId; | ||
} | ||
|
||
public String getClosureInd() { | ||
return closureInd; | ||
} | ||
|
||
public void setClosureInd(String closureInd) { | ||
this.closureInd = closureInd; | ||
} | ||
|
||
public String getProjectComment() { | ||
return projectComment; | ||
} | ||
|
||
public void setProjectComment(String projectComment) { | ||
this.projectComment = projectComment; | ||
} | ||
|
||
public LocalDateTime getCommentDate() { | ||
return commentDate; | ||
} | ||
|
||
public void setCommentDate(LocalDateTime commentDate) { | ||
this.commentDate = commentDate; | ||
} | ||
|
||
public Integer getRevisionCount() { | ||
return revisionCount; | ||
} | ||
|
||
public void setRevisionCount(Integer revisionCount) { | ||
this.revisionCount = revisionCount; | ||
} | ||
|
||
public String getEntryUserid() { | ||
return entryUserid; | ||
} | ||
|
||
public void setEntryUserid(String entryUserid) { | ||
this.entryUserid = entryUserid; | ||
} | ||
|
||
public LocalDateTime getEntryTimestamp() { | ||
return entryTimestamp; | ||
} | ||
|
||
public void setEntryTimestamp(LocalDateTime entryTimestamp) { | ||
this.entryTimestamp = entryTimestamp; | ||
} | ||
|
||
public String getUpdateUserid() { | ||
return updateUserid; | ||
} | ||
|
||
public void setUpdateUserid(String updateUserid) { | ||
this.updateUserid = updateUserid; | ||
} | ||
|
||
public LocalDateTime getUpdateTimestamp() { | ||
return updateTimestamp; | ||
} | ||
|
||
public void setUpdateTimestamp(LocalDateTime updateTimestamp) { | ||
this.updateTimestamp = updateTimestamp; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
backend-el/src/main/java/ca/bc/gov/nrs/environment/fta/el/entities/RecreationCommentId.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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package ca.bc.gov.nrs.environment.fta.el.entities; | ||
|
||
import org.hibernate.Hibernate; | ||
|
||
import java.io.Serial; | ||
import java.io.Serializable; | ||
import java.util.Objects; | ||
|
||
public class RecreationCommentId implements Serializable { | ||
@Serial | ||
private static final long serialVersionUID = -3501419533934602098L; | ||
private Long recreationCommentId; | ||
|
||
private String forestFileId; | ||
|
||
public Long getRecreationCommentId() { | ||
return recreationCommentId; | ||
} | ||
|
||
public void setRecreationCommentId(Long recreationCommentId) { | ||
this.recreationCommentId = recreationCommentId; | ||
} | ||
|
||
public String getForestFileId() { | ||
return forestFileId; | ||
} | ||
|
||
public void setForestFileId(String forestFileId) { | ||
this.forestFileId = forestFileId; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false; | ||
RecreationCommentId entity = (RecreationCommentId) o; | ||
return Objects.equals(this.forestFileId, entity.forestFileId) && | ||
Objects.equals(this.recreationCommentId, entity.recreationCommentId); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(forestFileId, recreationCommentId); | ||
} | ||
|
||
} |
71 changes: 71 additions & 0 deletions
71
.../src/main/java/ca/bc/gov/nrs/environment/fta/el/entities/RecreationControlAccessCode.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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package ca.bc.gov.nrs.environment.fta.el.entities; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import org.springframework.data.annotation.Immutable; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "RECREATION_CONTROL_ACCESS_CODE", schema = "THE") | ||
@Immutable | ||
public class RecreationControlAccessCode { | ||
@Id | ||
@Column(name = "RECREATION_CONTROL_ACCESS_CODE", nullable = false, length = 1) | ||
private String recreationControlAccessCode; | ||
|
||
@Column(name = "DESCRIPTION", nullable = false, length = 120) | ||
private String description; | ||
|
||
@Column(name = "EFFECTIVE_DATE", nullable = false) | ||
private LocalDateTime effectiveDate; | ||
|
||
@Column(name = "EXPIRY_DATE", nullable = false) | ||
private LocalDateTime expiryDate; | ||
|
||
@Column(name = "UPDATE_TIMESTAMP", nullable = false) | ||
private LocalDateTime updateTimestamp; | ||
|
||
public String getRecreationControlAccessCode() { | ||
return recreationControlAccessCode; | ||
} | ||
|
||
public void setRecreationControlAccessCode(String recreationControlAccessCode) { | ||
this.recreationControlAccessCode = recreationControlAccessCode; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public LocalDateTime getEffectiveDate() { | ||
return effectiveDate; | ||
} | ||
|
||
public void setEffectiveDate(LocalDateTime effectiveDate) { | ||
this.effectiveDate = effectiveDate; | ||
} | ||
|
||
public LocalDateTime getExpiryDate() { | ||
return expiryDate; | ||
} | ||
|
||
public void setExpiryDate(LocalDateTime expiryDate) { | ||
this.expiryDate = expiryDate; | ||
} | ||
|
||
public LocalDateTime getUpdateTimestamp() { | ||
return updateTimestamp; | ||
} | ||
|
||
public void setUpdateTimestamp(LocalDateTime updateTimestamp) { | ||
this.updateTimestamp = updateTimestamp; | ||
} | ||
} |
Oops, something went wrong.