-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/backend: Create initial ER model for CLIENT (with new goal). Part …
- Loading branch information
1 parent
38b55d8
commit 1963cd9
Showing
16 changed files
with
435 additions
and
61 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
6 changes: 1 addition & 5 deletions
6
backend/src/main/java/ca/bc/gov/app/m/om/service/OpenMapsService.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,13 +1,9 @@ | ||
package ca.bc.gov.app.m.om.service; | ||
|
||
import java.util.List; | ||
|
||
import ca.bc.gov.app.m.om.vo.FirstNationBandVidationVO; | ||
|
||
public interface OpenMapsService { | ||
|
||
String BEAN_NAME = "openMapsService"; | ||
|
||
List<FirstNationBandVidationVO> validateFirstNationBand(); | ||
//List<FirstNationBandVidationVO> validateFirstNationBand(); | ||
|
||
} |
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
16 changes: 7 additions & 9 deletions
16
.../src/main/java/ca/bc/gov/app/m/oracle/legacyclient/repository/ForestClientRepository.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,21 +1,19 @@ | ||
package ca.bc.gov.app.m.oracle.legacyclient.repository; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import ca.bc.gov.app.core.repository.CoreRepository; | ||
import ca.bc.gov.app.m.oracle.legacyclient.entity.ForestClientEntity; | ||
import ca.bc.gov.app.m.postgres.client.entity.ClientStatusCodeEntity; | ||
import ca.bc.gov.app.m.postgres.client.entity.ClientTypeCodeEntity; | ||
|
||
@Repository | ||
public interface ForestClientRepository extends CoreRepository<ForestClientEntity> { | ||
|
||
@Query("select x from ForestClientEntity x " + | ||
"where x.clientTypeCode = '" + ClientTypeCodeEntity.FIRST_NATION_BAND + "' "+ | ||
"and x.clientStatusCode = '" + ClientStatusCodeEntity.ACTIVE + "'") | ||
List<ForestClientEntity> findAllFirstNationBandClients(); | ||
//Commented out as it is not needed for now | ||
/* | ||
* @Query("select x from ForestClientEntity x " + "where x.clientTypeCode = '" + | ||
* ClientTypeCodeEntity.FIRST_NATION_BAND + "' "+ "and x.clientStatusCode = '" + | ||
* ClientStatusCodeEntity.ACTIVE + "'") List<ForestClientEntity> | ||
* findAllFirstNationBandClients(); | ||
*/ | ||
|
||
} |
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
167 changes: 167 additions & 0 deletions
167
backend/src/main/java/ca/bc/gov/app/m/postgres/client/entity/SubmissionDetailEntity.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,167 @@ | ||
package ca.bc.gov.app.m.postgres.client.entity; | ||
|
||
import java.util.Date; | ||
import java.util.Objects; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.ManyToOne; | ||
import javax.persistence.OneToOne; | ||
import javax.persistence.SequenceGenerator; | ||
import javax.persistence.Table; | ||
|
||
import org.springframework.context.annotation.Scope; | ||
import org.springframework.stereotype.Component; | ||
|
||
import ca.bc.gov.app.core.configuration.PostgresPersistenceConfiguration; | ||
import ca.bc.gov.app.core.entity.AbstractEntity; | ||
import ca.bc.gov.app.core.misc.scope.ScopeConstant; | ||
|
||
@Entity | ||
@Table(name = "SUBMISSION_DETAIL", schema = PostgresPersistenceConfiguration.POSTGRES_ATTRIBUTE_SCHEMA) | ||
@Component(SubmissionDetailEntity.BEAN_NAME) | ||
@Scope(ScopeConstant.PROTOTYPE) | ||
public class SubmissionDetailEntity implements AbstractEntity { | ||
|
||
private static final long serialVersionUID = -8966248654104607818L; | ||
|
||
public static final String BEAN_NAME = "submissionEntity"; | ||
|
||
@Id | ||
@GeneratedValue(generator = "SEQ_SUBMISSION_DETAIL") | ||
@SequenceGenerator(name = "SEQ_SUBMISSION_DETAIL", | ||
sequenceName = PostgresPersistenceConfiguration.POSTGRES_ATTRIBUTE_SCHEMA_QUALIFIER + "SUBMISSION_DETAIL_ID_SEQ", | ||
allocationSize = 1) | ||
@Column(name = "SUBMISSION_DETAIL_ID", nullable = false, precision = 10, scale = 0) | ||
private Long submissionDetailId; | ||
|
||
@OneToOne | ||
@JoinColumn(name = "SUBMISSION_ID") | ||
private SubmissionEntity submissionEntity; | ||
|
||
@Column(name = "INCORPORATION_NUMBER") | ||
private String incorporationNumber; | ||
|
||
@Column(name = "ORGANIZATION_NAME") | ||
private Date organizationName; | ||
|
||
@Column(name = "FIRST_NAME") | ||
private String firstName; | ||
|
||
@Column(name = "MIDDLE_NAME") | ||
private String middleName; | ||
|
||
@Column(name = "LAST_NAME") | ||
private String lastName; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "CLIENT_TYPE_CODE") | ||
private ClientTypeCodeEntity clientTypeCodeEntity; | ||
|
||
@Column(name = "DATE_OF_BIRTH") | ||
private Date dateOfBirth; | ||
|
||
@Column(name = "CLIENT_COMMENT") | ||
private String clientComment; | ||
|
||
public Long getSubmissionDetailId() { | ||
return submissionDetailId; | ||
} | ||
|
||
public void setSubmissionDetailId(Long submissionDetailId) { | ||
this.submissionDetailId = submissionDetailId; | ||
} | ||
|
||
public SubmissionEntity getSubmissionEntity() { | ||
return submissionEntity; | ||
} | ||
|
||
public void setSubmissionEntity(SubmissionEntity submissionEntity) { | ||
this.submissionEntity = submissionEntity; | ||
} | ||
|
||
public String getIncorporationNumber() { | ||
return incorporationNumber; | ||
} | ||
|
||
public void setIncorporationNumber(String incorporationNumber) { | ||
this.incorporationNumber = incorporationNumber; | ||
} | ||
|
||
public Date getOrganizationName() { | ||
return organizationName; | ||
} | ||
|
||
public void setOrganizationName(Date organizationName) { | ||
this.organizationName = organizationName; | ||
} | ||
|
||
public String getFirstName() { | ||
return firstName; | ||
} | ||
|
||
public void setFirstName(String firstName) { | ||
this.firstName = firstName; | ||
} | ||
|
||
public String getMiddleName() { | ||
return middleName; | ||
} | ||
|
||
public void setMiddleName(String middleName) { | ||
this.middleName = middleName; | ||
} | ||
|
||
public String getLastName() { | ||
return lastName; | ||
} | ||
|
||
public void setLastName(String lastName) { | ||
this.lastName = lastName; | ||
} | ||
|
||
public ClientTypeCodeEntity getClientTypeCodeEntity() { | ||
return clientTypeCodeEntity; | ||
} | ||
|
||
public void setClientTypeCodeEntity(ClientTypeCodeEntity clientTypeCodeEntity) { | ||
this.clientTypeCodeEntity = clientTypeCodeEntity; | ||
} | ||
|
||
public Date getDateOfBirth() { | ||
return dateOfBirth; | ||
} | ||
|
||
public void setDateOfBirth(Date dateOfBirth) { | ||
this.dateOfBirth = dateOfBirth; | ||
} | ||
|
||
public String getClientComment() { | ||
return clientComment; | ||
} | ||
|
||
public void setClientComment(String clientComment) { | ||
this.clientComment = clientComment; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(submissionDetailId); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
SubmissionDetailEntity other = (SubmissionDetailEntity) obj; | ||
return Objects.equals(submissionDetailId, other.submissionDetailId); | ||
} | ||
|
||
} |
Oops, something went wrong.