generated from hmcts/spring-boot-template
-
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
1 parent
fa3144e
commit 4b2e7f2
Showing
25 changed files
with
430 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/main/java/uk/gov/hmcts/opal/dto/search/ApplicationFunctionSearchDto.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,13 @@ | ||
package uk.gov.hmcts.opal.dto.search; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import uk.gov.hmcts.opal.dto.ToJsonString; | ||
|
||
@Data | ||
@Builder | ||
public class ApplicationFunctionSearchDto implements ToJsonString { | ||
|
||
private String applicationFunctionId; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/uk/gov/hmcts/opal/dto/search/BusinessUnitUserSearchDto.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,13 @@ | ||
package uk.gov.hmcts.opal.dto.search; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import uk.gov.hmcts.opal.dto.ToJsonString; | ||
|
||
@Data | ||
@Builder | ||
public class BusinessUnitUserSearchDto implements ToJsonString { | ||
|
||
private String businessUnitUserId; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/uk/gov/hmcts/opal/dto/search/TemplateMappingSearchDto.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,13 @@ | ||
package uk.gov.hmcts.opal.dto.search; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import uk.gov.hmcts.opal.dto.ToJsonString; | ||
|
||
@Data | ||
@Builder | ||
public class TemplateMappingSearchDto implements ToJsonString { | ||
|
||
private String templateMappingId; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/uk/gov/hmcts/opal/dto/search/TemplateSearchDto.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,13 @@ | ||
package uk.gov.hmcts.opal.dto.search; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import uk.gov.hmcts.opal.dto.ToJsonString; | ||
|
||
@Data | ||
@Builder | ||
public class TemplateSearchDto implements ToJsonString { | ||
|
||
private String templateId; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/uk/gov/hmcts/opal/dto/search/UserEntitlementSearchDto.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,13 @@ | ||
package uk.gov.hmcts.opal.dto.search; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import uk.gov.hmcts.opal.dto.ToJsonString; | ||
|
||
@Data | ||
@Builder | ||
public class UserEntitlementSearchDto implements ToJsonString { | ||
|
||
private String userEntitlementId; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/uk/gov/hmcts/opal/dto/search/UserSearchDto.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,13 @@ | ||
package uk.gov.hmcts.opal.dto.search; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import uk.gov.hmcts.opal.dto.ToJsonString; | ||
|
||
@Data | ||
@Builder | ||
public class UserSearchDto implements ToJsonString { | ||
|
||
private String userId; | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/uk/gov/hmcts/opal/entity/ApplicationFunctionEntity.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,33 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.SequenceGenerator; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "application_functions") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class ApplicationFunctionEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "application_function_id_seq_generator") | ||
@SequenceGenerator(name = "application_function_id_seq_generator", sequenceName = "application_function_id_seq", | ||
allocationSize = 1) | ||
@Column(name = "application_function_id") | ||
private Long applicationFunctionId; | ||
|
||
@Column(name = "function_name", length = 200) | ||
private String functionName; | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/uk/gov/hmcts/opal/entity/BusinessUnitUserEntity.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,30 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "business_unit_users") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class BusinessUnitUserEntity { | ||
|
||
@Id | ||
@Column(name = "business_unit_user_id", length = 6) | ||
private String businessUnitUserId; | ||
|
||
@Column(name = "business_unit_id") | ||
private Short businessUnitId; | ||
|
||
@Column(name = "user_id", length = 100) | ||
private String userId; | ||
|
||
} |
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
32 changes: 32 additions & 0 deletions
32
src/main/java/uk/gov/hmcts/opal/entity/TemplateEntity.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,32 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.SequenceGenerator; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "templates") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class TemplateEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "template_id_seq_generator") | ||
@SequenceGenerator(name = "template_id_seq_generator", sequenceName = "template_id_seq", allocationSize = 1) | ||
@Column(name = "template_id") | ||
private Long templateId; | ||
|
||
@Column(name = "template_name", length = 100) | ||
private String templateName; | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/uk/gov/hmcts/opal/entity/TemplateMappingEntity.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,42 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.IdClass; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
@Entity | ||
@IdClass(TemplateMappingEntity.MappingId.class) | ||
@Table(name = "template_mappings") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class TemplateMappingEntity { | ||
|
||
@Id | ||
@Column(name = "template_id") | ||
private Long templateId; | ||
|
||
@Id | ||
@Column(name = "application_function_id") | ||
private Long applicationFunctionId; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public static class MappingId implements Serializable { | ||
|
||
public Long templateId; | ||
|
||
public Long applicationFunctionId; | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/uk/gov/hmcts/opal/entity/UserEntitlementEntity.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,35 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.SequenceGenerator; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "user_entitlements") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class UserEntitlementEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "user_entitlement_id_seq_generator") | ||
@SequenceGenerator(name = "user_entitlement_id_seq_generator", sequenceName = "user_entitlement_id_seq", | ||
allocationSize = 1) | ||
@Column(name = "user_entitlement_id") | ||
private Long userEntitlementId; | ||
|
||
@Column(name = "business_unit_user_id", length = 6) | ||
private String businessUnitUserId; | ||
|
||
@Column(name = "application_function_id") | ||
private Long applicationFunctionId; | ||
} |
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,33 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "users") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class UserEntity { | ||
|
||
@Id | ||
@Column(name = "user_id", length = 100) | ||
private String userId; | ||
|
||
@Column(name = "username", length = 100) | ||
private String username; | ||
|
||
@Column(name = "password", length = 1000) | ||
private String password; | ||
|
||
@Column(name = "description", length = 100) | ||
private String description; | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/uk/gov/hmcts/opal/repository/ApplicationFunctionRepository.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,11 @@ | ||
package uk.gov.hmcts.opal.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
import org.springframework.stereotype.Repository; | ||
import uk.gov.hmcts.opal.entity.ApplicationFunctionEntity; | ||
|
||
@Repository | ||
public interface ApplicationFunctionRepository extends JpaRepository<ApplicationFunctionEntity, Long>, | ||
JpaSpecificationExecutor<ApplicationFunctionEntity> { | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/uk/gov/hmcts/opal/repository/BusinessUnitUserRepository.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,11 @@ | ||
package uk.gov.hmcts.opal.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
import org.springframework.stereotype.Repository; | ||
import uk.gov.hmcts.opal.entity.BusinessUnitUserEntity; | ||
|
||
@Repository | ||
public interface BusinessUnitUserRepository extends JpaRepository<BusinessUnitUserEntity, String>, | ||
JpaSpecificationExecutor<BusinessUnitUserEntity> { | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/uk/gov/hmcts/opal/repository/TemplateMappingRepository.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,11 @@ | ||
package uk.gov.hmcts.opal.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
import org.springframework.stereotype.Repository; | ||
import uk.gov.hmcts.opal.entity.TemplateMappingEntity; | ||
|
||
@Repository | ||
public interface TemplateMappingRepository extends JpaRepository<TemplateMappingEntity, | ||
TemplateMappingEntity.MappingId>, JpaSpecificationExecutor<TemplateMappingEntity> { | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/uk/gov/hmcts/opal/repository/TemplateRepository.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,11 @@ | ||
package uk.gov.hmcts.opal.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
import org.springframework.stereotype.Repository; | ||
import uk.gov.hmcts.opal.entity.TemplateEntity; | ||
|
||
@Repository | ||
public interface TemplateRepository extends JpaRepository<TemplateEntity, Long>, | ||
JpaSpecificationExecutor<TemplateEntity> { | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/uk/gov/hmcts/opal/repository/UserEntitlementRepository.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,11 @@ | ||
package uk.gov.hmcts.opal.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
import org.springframework.stereotype.Repository; | ||
import uk.gov.hmcts.opal.entity.UserEntitlementEntity; | ||
|
||
@Repository | ||
public interface UserEntitlementRepository extends JpaRepository<UserEntitlementEntity, Long>, | ||
JpaSpecificationExecutor<UserEntitlementEntity> { | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/uk/gov/hmcts/opal/repository/UserRepository.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,11 @@ | ||
package uk.gov.hmcts.opal.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
import org.springframework.stereotype.Repository; | ||
import uk.gov.hmcts.opal.entity.UserEntity; | ||
|
||
@Repository | ||
public interface UserRepository extends JpaRepository<UserEntity, String>, | ||
JpaSpecificationExecutor<UserEntity> { | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/uk/gov/hmcts/opal/service/ApplicationFunctionServiceInterface.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,13 @@ | ||
package uk.gov.hmcts.opal.service; | ||
|
||
import uk.gov.hmcts.opal.dto.search.ApplicationFunctionSearchDto; | ||
import uk.gov.hmcts.opal.entity.ApplicationFunctionEntity; | ||
|
||
import java.util.List; | ||
|
||
public interface ApplicationFunctionServiceInterface { | ||
|
||
ApplicationFunctionEntity getApplicationFunction(long applicationFunctionId); | ||
|
||
List<ApplicationFunctionEntity> searchApplicationFunctions(ApplicationFunctionSearchDto criteria); | ||
} |
Oops, something went wrong.