Skip to content

Commit

Permalink
add more scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Oct 16, 2023
1 parent e12d102 commit 9b8f836
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
package io.holunda.polyflow.example.process.approval.service.impl.datajpa

import org.springframework.data.repository.CrudRepository
import org.springframework.data.repository.PagingAndSortingRepository
import java.util.*

/**
* Spring Data JPA repository.
*/
interface RequestEntityRepository : PagingAndSortingRepository<RequestEntity, String> {

fun save(requestEntity: RequestEntity): RequestEntity
fun findAll(): List<RequestEntity>
fun findById(id: String): Optional<RequestEntity>
fun existsById(id: String): Boolean
}

interface RequestEntityRepository : PagingAndSortingRepository<RequestEntity, String>, CrudRepository<RequestEntity, String>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.hibernate.service.ServiceRegistry
import org.hibernate.type.descriptor.sql.internal.DdlTypeImpl
import java.sql.Types

@Suppress("unused") // used in application.yaml
class FixedH2Dialect(info: DialectResolutionInfo) : H2Dialect(info) {

override fun registerColumnTypes(typeContributions: TypeContributions, serviceRegistry: ServiceRegistry) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.hibernate.type.descriptor.jdbc.BinaryJdbcType
import org.hibernate.type.descriptor.sql.internal.DdlTypeImpl
import java.sql.Types

@Suppress("unused") // used in application.yaml
class NoToastPostgresSQLDialect(info: DialectResolutionInfo) : PostgreSQLDialect(info) {

override fun registerColumnTypes(typeContributions: TypeContributions, serviceRegistry: ServiceRegistry) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class BusinessDataEntriesResource(
user = user,
page = page,
size = size,
sort = sort ?: "",
sort = sort?.let { sortParameter -> listOf(sortParameter) } ?: listOf(),
filters ?: listOf()
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ class TaskServiceGateway(
.query(
TasksWithDataEntriesForUserQuery(
user = user,
assignedToMeOnly = false,
page = page,
size = size,
sort = sort ?: "",
sort = sort?.let { sortParam -> listOf(sortParam) } ?: listOf(),
filters = filters
)
).join() ?: throw ElementNotFoundException()
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<kotlin.version>1.9.10</kotlin.version>
<kotlin.compiler.jvmTarget>${java.version}</kotlin.compiler.jvmTarget>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
<kotlin-logging.version>3.0.4</kotlin-logging.version>
<kotlin-logging.version>3.0.5</kotlin-logging.version>

<!-- Never deploy examples -->
<maven.deploy.skip>true</maven.deploy.skip>
Expand All @@ -49,10 +49,10 @@
<version.camunda.spin>1.22.0</version.camunda.spin>
<camunda-bpm-data.version>1.4.0</camunda-bpm-data.version>
<springdoc.version>1.7.0</springdoc.version>
<org.mapstruct.version>1.5.2.Final</org.mapstruct.version>
<org.mapstruct.version>1.5.5.Final</org.mapstruct.version>
<mockito-kotlin.version>5.1.0</mockito-kotlin.version>
<jackson-databind-nullable.version>0.2.6</jackson-databind-nullable.version>
<junit-jupiter.version>5.9.2</junit-jupiter.version>
<junit-jupiter.version>5.10.0</junit-jupiter.version>

</properties>

Expand Down Expand Up @@ -259,8 +259,8 @@
<version>${kotlin.version}</version>
<configuration>
<jvmTarget>${java.version}</jvmTarget>
<languageVersion>1.6</languageVersion>
<apiVersion>1.6</apiVersion>
<languageVersion>1.9</languageVersion>
<apiVersion>1.9</apiVersion>
<compilerPlugins>
<plugin>spring</plugin>
<plugin>jpa</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP SEQUENCE hibernate_sequence;

CREATE SEQUENCE association_value_entry_seq START WITH 1 INCREMENT BY 50;

CREATE SEQUENCE domain_event_entry_seq START WITH 1 INCREMENT BY 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP SEQUENCE hibernate_sequence;

CREATE SEQUENCE association_value_entry_seq START WITH 1 INCREMENT BY 50;

CREATE SEQUENCE domain_event_entry_seq START WITH 1 INCREMENT BY 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP SEQUENCE hibernate_sequence;

CREATE SEQUENCE association_value_entry_seq START WITH 1 INCREMENT BY 50;

CREATE SEQUENCE domain_event_entry_seq START WITH 1 INCREMENT BY 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP SEQUENCE hibernate_sequence;

CREATE SEQUENCE association_value_entry_seq START WITH 1 INCREMENT BY 50;

CREATE SEQUENCE domain_event_entry_seq START WITH 1 INCREMENT BY 50;

0 comments on commit 9b8f836

Please sign in to comment.