Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    sanjeet215
    @sanjeet215

    plugins {
    id 'org.springframework.boot' version '2.5.1'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
    id 'com.netflix.dgs.codegen' version '5.0.4'
    }

    group = 'com.iot.platform'
    version = '0.0.1-SNAPSHOT'
    sourceCompatibility = '11'

    apply plugin: 'application'
    mainClassName = 'com.iot.platform.devicemanager.DeviceManagerApplication'

    configurations {
    compileOnly {
    extendsFrom annotationProcessor
    }
    }

    repositories {
    mavenCentral()
    }

    ext {
    set('springCloudVersion', "2020.0.3")
    }

    dependencies {
    implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:latest.release"))
    implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter'
    implementation 'com.netflix.graphql.dgs:graphql-dgs-extended-scalars'
    implementation 'com.fasterxml.jackson.datatype:jackson-datatype-joda'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-cache'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.cloud:spring-cloud-starter-config'
    compileOnly "com.speedment.jpastreamer.integration.spring:spring-boot-jpastreamer-autoconfigure:1.0.2"
    compileOnly 'org.projectlombok:lombok'
    developmentOnly 'org.springframework.boot:spring-boot-devtools'
    testRuntimeOnly 'com.h2database:h2'
    runtimeOnly 'org.postgresql:postgresql'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    }

    dependencyManagement {
    imports {
    mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
    }

    test {
    useJUnitPlatform()
    }

    generateJava {
    //schemaPaths = ["${projectDir}/src/main/resources/schema"] // List of directories containing schema files
    packageName = 'com.example.packagename' // The package name to use to generate sources
    generateClient = true // Enable generating the type safe query API
    typeMapping = [
    "BigInteger" : "java.math.BigInteger",
    "BigDecimal": "java.math.BigDecimal"
    ]
    }

    Could anyone suggest on this ?
    sanjeet215
    @sanjeet215
    @quocnna_twitter : could you please suggest ?
    Per-Åke Minborg
    @minborg
    JPAStreamer has it own annotation processor. Try mention it as an “annotationProcessor"
    Partha Nath
    @pnath:matrix.org
    [m]
    Hello. I am new to JPA streamer. I have a requirement to build dynamic query based on optional request parameters being passed from URI. I think what the design I am coming up with, is to create predicates for each optional request parameter and apply that in the .filter() method.
    List<Entity> collection = jpaStreamer.stream(Entity.class)
    .skip(offSetter)
    .limit(lim)
    .sorted(Entity$.name)
    .filter(predicate1.and(predicate2).and(predicate3))
    .toList();
    But this filter should not be applied when I dont pass any request param from the URI
    Is there any approach to get this type of solution done in JPA steamer like creating a dynamic query builder kind of thing
    Per-Åke Minborg
    @minborg
    So you can create an initial stream with jpaStreamer.stream(Entity.class and then create a second stream with all the predicates (0-N). Then you appy a reduce() on the second stream providing the first stream as the “identity” value
    Tokazio
    @tokazio
    Hello, trying to use JPAStreamer in Eclipse with ivy. When i open the jar in the package explorer, i'm only seeing a Foo.class and some folder... Eclipse can't find JPAStreamer as a class. I think to a module issue but how can i configure JPAStreamer for my classpath please ?
    Per-Åke Minborg
    @minborg
    Strange. If you “jar xvf jpa-streamer.jar” what do you see?
    Tokazio
    @tokazio
    image.png
    this is what i'm seeing in Eclipse when importing with ivy : '<dependency org="com.speedment.jpastreamer" name="jpastreamer-core" rev="1.0.2"/>'
    image.png
    and this is what i'm seeing in IJ as the source code
    Per-Åke Minborg
    @minborg
    I think you must use “import"
    Tokazio
    @tokazio
    i think the ivy system does not get the sub dependencies
    Per-Åke Minborg
    @minborg
    Yep. Probably. Any tips from StackOverflow?
    Partha Nath
    @ParthaNath28
    Hello. Is there any documentation of using @EmbeddedId while using the .filter method
    Per-Åke Minborg
    @minborg
    Are you unsing a composite key?
    using
    Partha Nath
    @ParthaNath28
    yes
    Per-Åke Minborg
    @minborg
    .filter() can take any column
    and you can combine predicates using .and()
    e.g. col1.equals(a).and(col2.equals(b))
    Partha Nath
    @ParthaNath28
    I was wondering what would be syntax of using an identifier which would be not in the Entity class but will be inside one level at @EmbeddedId class
    Per-Åke Minborg
    @minborg
    How does your class look like?
    Partha Nath
    @ParthaNath28
    I d share the details
    @Table(name = "UCL_V_APIMOD_DELIVERY_V2")
    @Immutable
    @NoArgsConstructor
    public class ModuleDeliveryEntity {
    @EmbeddedId
    private ModuleDeliveryId moduleDeliveryId;

    public class ModuleDeliveryId implements Serializable {

    private String moduleDeliveryIdentifier;
    private String assessmentComponentTitle;
    private Integer assessmentComponentWeight;

    }

    I want to do an operation like select * from UCL_V_APIMOD_DELIVERY_V2 where moduleDeliveryIdentifier = 'xyz'
    Per-Åke Minborg
    @minborg
    I see what you mean. Not sure if JpaStreamer supports that constuct.
    Partha Nath
    @ParthaNath28
    so the moduleDeliveryIdentifier now resides inside ModuleDeliveryId , not in @Entity class
                        .filter(ModuleDeliveryEntity$. <not sure from here>
    Per-Åke Minborg
    @minborg
    Can you raise an issue on GitHub with the example above please?
    Partha Nath
    @ParthaNath28
    I have created one github issue
    Per-Åke Minborg
    @minborg
    Thanks. I think this is a feature that needs to be devlopled.
    Could you also please add the examples above so it will be easer for the one fixing the issue?
    Partha Nath
    @ParthaNath28
    yes
    I can
    let me make something up quickly
    Partha Nath
    @ParthaNath28
    I have updated my comments
    I have added an example on the requirement
    Per-Åke Minborg
    @minborg
    Great! Thanks!
    Kai
    @SchlauFuchs
    i was curious to try jpa-streamer, but failed to get it working with JPA entities written in kotlin. the gradle build does not generate code, or I was not able to find it. anyone having some hints on this?
    Per-Åke Minborg
    @minborg
    Here is an issue for @SchlauFuchs question for those of you that want to follow the discussion: speedment/jpa-streamer#213
    Kai
    @SchlauFuchs
    yes, that's me crossposting :P
    Per-Åke Minborg
    @minborg
    Always good to get attenttion :-)