-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/bcgov/nr-bcws-wfprev into f…
…ix_token_validation_test
- Loading branch information
Showing
18 changed files
with
1,050 additions
and
149 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
3 changes: 3 additions & 0 deletions
3
db/scripts/01_00_02/00/ddl/sequences/WFPREV.project_number_seq.sql
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,3 @@ | ||
CREATE SEQUENCE "wfprev"."project_number_seq" INCREMENT BY 1 START WITH 1000 MAXVALUE 9999999999 MINVALUE 1000 NO CYCLE; | ||
|
||
GRANT USAGE ON SEQUENCE "wfprev"."project_number_seq" TO PROXY_WF1_PREV_REST; |
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 @@ | ||
ALTER TABLE "wfprev"."project" ALTER COLUMN "project_number" SET DEFAULT nextval('wfprev.project_number_seq'); |
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,5 +1,7 @@ | ||
services: | ||
api: | ||
profiles: | ||
- api | ||
build: | ||
context: . | ||
dockerfile: server/wfprev-api/Dockerfile.graalvm | ||
|
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
54 changes: 54 additions & 0 deletions
54
...rc/main/java/ca/bc/gov/nrs/wfprev/data/assemblers/ProjectStatusCodeResourceAssembler.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,54 @@ | ||
package ca.bc.gov.nrs.wfprev.data.assemblers; | ||
|
||
import ca.bc.gov.nrs.wfprev.controllers.CodesController; | ||
import ca.bc.gov.nrs.wfprev.data.entities.ProjectStatusCodeEntity; | ||
import ca.bc.gov.nrs.wfprev.data.models.ProjectStatusCodeModel; | ||
import org.springframework.hateoas.server.mvc.RepresentationModelAssemblerSupport; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class ProjectStatusCodeResourceAssembler extends RepresentationModelAssemblerSupport<ProjectStatusCodeEntity, ProjectStatusCodeModel> { | ||
public ProjectStatusCodeResourceAssembler() { | ||
super(CodesController.class, ProjectStatusCodeModel.class); | ||
} | ||
|
||
@Override | ||
public ProjectStatusCodeModel toModel(ProjectStatusCodeEntity entity) { | ||
ProjectStatusCodeModel model = instantiateModel(entity); | ||
|
||
model.setProjectStatusCode(entity.getProjectStatusCode()); | ||
model.setDescription(entity.getDescription()); | ||
model.setDisplayOrder(entity.getDisplayOrder()); | ||
model.setEffectiveDate(entity.getEffectiveDate()); | ||
model.setExpiryDate(entity.getExpiryDate()); | ||
model.setDisplayOrder(entity.getDisplayOrder()); | ||
model.setCreateDate(entity.getCreateDate()); | ||
model.setCreateUser(entity.getCreateUser()); | ||
model.setUpdateDate(entity.getUpdateDate()); | ||
model.setUpdateUser(entity.getUpdateUser()); | ||
model.setRevisionCount(entity.getRevisionCount()); | ||
|
||
return model; | ||
} | ||
|
||
public ProjectStatusCodeEntity toEntity(ProjectStatusCodeModel model) { | ||
if (model == null) { | ||
return null; | ||
} | ||
|
||
ProjectStatusCodeEntity entity = new ProjectStatusCodeEntity(); | ||
|
||
entity.setProjectStatusCode(model.getProjectStatusCode()); | ||
entity.setDescription(model.getDescription()); | ||
entity.setDisplayOrder(model.getDisplayOrder()); | ||
entity.setEffectiveDate(model.getEffectiveDate()); | ||
entity.setExpiryDate(model.getExpiryDate()); | ||
entity.setCreateDate(model.getCreateDate()); | ||
entity.setCreateUser(model.getCreateUser()); | ||
entity.setUpdateDate(model.getUpdateDate()); | ||
entity.setUpdateUser(model.getUpdateUser()); | ||
entity.setRevisionCount(model.getRevisionCount()); | ||
|
||
return entity; | ||
} | ||
} |
Oops, something went wrong.